AkimfromParis commited on
Commit
0349568
1 Parent(s): fbea8b5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -15
README.md CHANGED
@@ -14,7 +14,7 @@ base_model:
14
 
15
  # Hinoki-Sak-Sta-slerp-7B
16
 
17
- Hinoki-Sak-slerp-7B is a merge of the following models using using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing) of [Maxime Labonne](https://huggingface.co/mlabonne) powered by [MergeKit](https://github.com/arcee-ai/mergekit) of [Arcee AI](https://www.arcee.ai):
18
  * [SakanaAI/EvoLLM-JP-A-v1-7B](https://huggingface.co/SakanaAI/EvoLLM-JP-A-v1-7B) (Base model)
19
  * [stabilityai/japanese-stablelm-base-gamma-7b](https://huggingface.co/stabilityai/japanese-stablelm-base-gamma-7b)
20
 
@@ -44,24 +44,20 @@ dtype: bfloat16
44
  ```python
45
  !pip install -qU transformers accelerate
46
 
47
- from transformers import AutoTokenizer
48
- import transformers
49
  import torch
50
 
51
- model = "AkimfromParis/Hinoki-Sak-Sta-slerp-7B"
52
- messages = [{"role": "user", "content": "What is a large language model?"}]
53
-
54
  tokenizer = AutoTokenizer.from_pretrained(model)
55
- prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
56
- pipeline = transformers.pipeline(
57
- "text-generation",
58
- model=model,
59
- torch_dtype=torch.float16,
60
- device_map="auto",
61
- )
 
62
 
63
- outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
64
- print(outputs[0]["generated_text"])
65
  ```
66
  # Citation
67
  ```
 
14
 
15
  # Hinoki-Sak-Sta-slerp-7B
16
 
17
+ Hinoki-Sak-Sta-slerp-7B is a merge of the following models using the [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing) of [Maxime Labonne](https://huggingface.co/mlabonne) powered by [MergeKit](https://github.com/arcee-ai/mergekit) of [Arcee AI](https://www.arcee.ai):
18
  * [SakanaAI/EvoLLM-JP-A-v1-7B](https://huggingface.co/SakanaAI/EvoLLM-JP-A-v1-7B) (Base model)
19
  * [stabilityai/japanese-stablelm-base-gamma-7b](https://huggingface.co/stabilityai/japanese-stablelm-base-gamma-7b)
20
 
 
44
  ```python
45
  !pip install -qU transformers accelerate
46
 
47
+ from transformers import AutoTokenizer, AutoModelForCausalLM
 
48
  import torch
49
 
 
 
 
50
  tokenizer = AutoTokenizer.from_pretrained(model)
51
+ model = AutoModelForCausalLM.from_pretrained("AkimfromParis/Hinoki-Sak-Sta-slerp-7B")
52
+
53
+ pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
54
+
55
+ messages = [{"role": "system", "content": "あなたはAIアシスタントです。"}]
56
+ messages.append({"role": "user", "content": "大谷翔平選手について教えてください"})
57
+
58
+ prompt = tokenizer.apply_chat_template(conversation=messages, add_generation_prompt=True, tokenize=False)
59
 
60
+ pipeline(prompt, max_new_tokens=256, do_sample=False, temperature=0.0, return_full_text=False)
 
61
  ```
62
  # Citation
63
  ```