Update README.md
Browse files
README.md
CHANGED
|
@@ -138,9 +138,17 @@ Baselines were evaluated using their respective chat-template and system prompts
|
|
| 138 |
|
| 139 |
### Usage
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
#### Instruction format
|
| 142 |
|
| 143 |
```python
|
|
|
|
|
|
|
|
|
|
| 144 |
prompt = """<|im_start|>system
|
| 145 |
You are a helpful assistant.<eos>
|
| 146 |
<|im_start|>user
|
|
@@ -151,7 +159,7 @@ Hi there, how can I help?<eos>"""
|
|
| 151 |
# <|im_start|> is not a special token.
|
| 152 |
# Transformers chat_template should be consistent with vLLM format below.
|
| 153 |
|
| 154 |
-
# ! ENSURE 1 and only 1 bos `<
|
| 155 |
print(tokenizer.convert_ids_to_tokens(tokenizer.encode(prompt)))
|
| 156 |
|
| 157 |
"""
|
|
|
|
| 138 |
|
| 139 |
### Usage
|
| 140 |
|
| 141 |
+
**IMPORTANT NOTICE for using the model**
|
| 142 |
+
|
| 143 |
+
* `<bos>` must be at start of prompt, ff your code's tokenizer does not prepend `<bos>` by default, you MUST prepend <bos> into the prompt yourself, otherwise, it would not work!
|
| 144 |
+
* Repitition penalty (e.g: in llama.cpp, ollama, LM-studio) must be set to **1** , otherwise will lead to degeneration!
|
| 145 |
+
|
| 146 |
#### Instruction format
|
| 147 |
|
| 148 |
```python
|
| 149 |
+
# ! WARNING, if your code's tokenizer does not prepend <bos> by default,
|
| 150 |
+
# You MUST prepend <bos> into the prompt yourself, otherwise, it would not work!
|
| 151 |
+
|
| 152 |
prompt = """<|im_start|>system
|
| 153 |
You are a helpful assistant.<eos>
|
| 154 |
<|im_start|>user
|
|
|
|
| 159 |
# <|im_start|> is not a special token.
|
| 160 |
# Transformers chat_template should be consistent with vLLM format below.
|
| 161 |
|
| 162 |
+
# ! ENSURE 1 and only 1 bos `<bos>` at the beginning of sequence
|
| 163 |
print(tokenizer.convert_ids_to_tokens(tokenizer.encode(prompt)))
|
| 164 |
|
| 165 |
"""
|