Update README.md
Browse files
README.md
CHANGED
@@ -195,4 +195,40 @@ The benchmarks and corresponding scores listed in the table below are taken dire
|
|
195 |
|MBPP|0-shot|53.9|62.2|60.3|+11.87%|-3.05%|
|
196 |
|MBPP+|0-shot|44.4|50.6|50.8|+14.41%|+0.40%|
|
197 |
|MultiPL-E|0-shot|22.6|34.9|-|-|-|
|
198 |
-
|||||**Average**|**+18.55%**|**+1.12%**|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
|MBPP|0-shot|53.9|62.2|60.3|+11.87%|-3.05%|
|
196 |
|MBPP+|0-shot|44.4|50.6|50.8|+14.41%|+0.40%|
|
197 |
|MultiPL-E|0-shot|22.6|34.9|-|-|-|
|
198 |
+
|||||**Average**|**+18.55%**|**+1.12%**|
|
199 |
+
|
200 |
+
|
201 |
+
## How to use
|
202 |
+
```python
|
203 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
204 |
+
|
205 |
+
model = AutoModelForCausalLM.from_pretrained(
|
206 |
+
"Motif-Technologies/Motif-2.6B",
|
207 |
+
trust_remote_code = True,
|
208 |
+
_attn_implementation = "eager", # also supports flash_attention_2
|
209 |
+
).cuda()
|
210 |
+
|
211 |
+
query = "hello. how are you?"
|
212 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
213 |
+
"Motif-Technologies/Motif-2.6B",
|
214 |
+
trust_remote_code = True,
|
215 |
+
)
|
216 |
+
|
217 |
+
input_ids = tokenizer.apply_chat_template(
|
218 |
+
[
|
219 |
+
{'role': 'system', 'content': 'you are an helpful assistant'},
|
220 |
+
{'role': 'system', 'content': query},
|
221 |
+
],
|
222 |
+
add_generation_prompt = True,
|
223 |
+
return_tensors='pt',
|
224 |
+
).cuda()
|
225 |
+
|
226 |
+
res = model.generate(input_ids)[0]
|
227 |
+
print(tokenizer.decode(res[input_ids.shape[-1]:], skip_special_tokens = True))
|
228 |
+
|
229 |
+
"""
|
230 |
+
Hello! It seems there might be a bit of a mix-up. I am an AI assistant designed to help answer questions and provide information. If you have any questions or need assistance with something, feel free to ask, and I'll do my best to help you out!
|
231 |
+
|
232 |
+
Regarding your initial question, if you were asking about the weather or a specific topic, please provide more details so I can give you an accurate response. If you meant to ask something else, feel free to clarify, and I'll be happy to assist you further.
|
233 |
+
"""
|
234 |
+
```
|