Update README.md
Browse files
README.md
CHANGED
|
@@ -2,9 +2,26 @@
|
|
| 2 |
license: mit
|
| 3 |
language:
|
| 4 |
- fr
|
| 5 |
-
- en
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
datasets:
|
| 8 |
- MaxLSB/LeCarnet
|
| 9 |
---
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
language:
|
| 4 |
- fr
|
|
|
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
datasets:
|
| 7 |
- MaxLSB/LeCarnet
|
| 8 |
---
|
| 9 |
+
Model Trained on the [LeCarnet](https://huggingface.co/datasets/MaxLSB/LeCarnet) Dataset.
|
| 10 |
+
|
| 11 |
+
All data generation, training, and evaluation pipelines are available on [Github](https://github.com/MaxLSB/LeCarnet).
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
# Example Code
|
| 15 |
+
|
| 16 |
+
```
|
| 17 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 18 |
+
|
| 19 |
+
model = AutoModelForCausalLM.from_pretrained("MaxLSB/LeCarnet-3M")
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained("MaxLSB/LeCarnet-3M")
|
| 21 |
+
|
| 22 |
+
prompt = "Il était une fois"
|
| 23 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
| 24 |
+
|
| 25 |
+
output = model.generate(input_ids, max_length=512)
|
| 26 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 27 |
+
```
|