Update README.md
Browse files
README.md
CHANGED
|
@@ -61,6 +61,32 @@ We used LightEval for evaluation, with custom tasks for the French benchmarks. T
|
|
| 61 |
| arc-chall-en | 36.09 | 42.32 | 41.04 | <u>42.24</u> |
|
| 62 |
| hellaswag-en | 46.96 | <u>66.94</u> | 64.48 | 58.55 |
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
## Citation
|
| 65 |
|
| 66 |
```bibtex
|
|
|
|
| 61 |
| arc-chall-en | 36.09 | 42.32 | 41.04 | <u>42.24</u> |
|
| 62 |
| hellaswag-en | 46.96 | <u>66.94</u> | 64.48 | 58.55 |
|
| 63 |
|
| 64 |
+
## Code Example
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 68 |
+
|
| 69 |
+
tokenizer = AutoTokenizer.from_pretrained("kurakurai/Luth-1.7B-Instruct")
|
| 70 |
+
model = AutoModelForCausalLM.from_pretrained("kurakurai/Luth-1.7B-Instruct")
|
| 71 |
+
messages = [
|
| 72 |
+
{"role": "user", "content": "Quelle est la capitale de la France?"},
|
| 73 |
+
]
|
| 74 |
+
inputs = tokenizer.apply_chat_template(
|
| 75 |
+
messages,
|
| 76 |
+
add_generation_prompt=True,
|
| 77 |
+
tokenize=True,
|
| 78 |
+
return_dict=True,
|
| 79 |
+
return_tensors="pt",
|
| 80 |
+
).to(model.device)
|
| 81 |
+
|
| 82 |
+
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 83 |
+
print(
|
| 84 |
+
tokenizer.decode(
|
| 85 |
+
outputs[0][inputs["input_ids"].shape[-1] :], skip_special_tokens=True
|
| 86 |
+
)
|
| 87 |
+
)
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
## Citation
|
| 91 |
|
| 92 |
```bibtex
|