Update README.md
Browse files
README.md
CHANGED
|
@@ -20,6 +20,7 @@ model-index:
|
|
| 20 |
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
|
| 21 |
|
| 22 |
>>> print(tokenizer.decode(tokens[0]))
|
|
|
|
| 23 |
<s><|im_start|> system
|
| 24 |
You are a helpful assistant.<|im_end|>
|
| 25 |
<|im_start|> user
|
|
@@ -28,6 +29,25 @@ En 1975, la localité comptait 90 habitants, des Guiziga et lors du recensement
|
|
| 28 |
<|im_start|> assistant
|
| 29 |
When the town had 90 inhabitants in 1975, it was called Guizaga and during the census of 2005, there were x inhabitants.<|im_end|>
|
| 30 |
</s>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
>>>
|
| 32 |
```
|
| 33 |
|
|
|
|
| 20 |
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
|
| 21 |
|
| 22 |
>>> print(tokenizer.decode(tokens[0]))
|
| 23 |
+
|
| 24 |
<s><|im_start|> system
|
| 25 |
You are a helpful assistant.<|im_end|>
|
| 26 |
<|im_start|> user
|
|
|
|
| 29 |
<|im_start|> assistant
|
| 30 |
When the town had 90 inhabitants in 1975, it was called Guizaga and during the census of 2005, there were x inhabitants.<|im_end|>
|
| 31 |
</s>
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
>>> chat_input = "<|im_start|> system\nYou are a helpful assistant.<|im_end|> \n<|im_start|> user\nCorrige les fautes dans ce texte : \nEn 1975, la localité comptait 90 habitant, des Guiziga et lors du recensement de 2005, on y a dénombrer 56 habitants.<|im_end|> \n<|im_start|> assistant\n"
|
| 35 |
+
|
| 36 |
+
>>> inputs = tokenizer(chat_input, return_tensors="pt").to(model.device)
|
| 37 |
+
|
| 38 |
+
>>> tokens = model.generate(**inputs, **generation_args)
|
| 39 |
+
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
|
| 40 |
+
|
| 41 |
+
>>> print(tokenizer.decode(tokens[0]))
|
| 42 |
+
<s><|im_start|> system
|
| 43 |
+
You are a helpful assistant.<|im_end|>
|
| 44 |
+
<|im_start|> user
|
| 45 |
+
Corrige les fautes dans ce texte :
|
| 46 |
+
En 1975, la localité comptait 90 habitant, des Guiziga et lors du recensement de 2005, on y a dénombrer 56 habitants.<|im_end|>
|
| 47 |
+
|
| 48 |
+
<|im_start|> assistant
|
| 49 |
+
En 1975, la commune comptait 90 habitants dont des Guizigas et au recensement de 2005, elle en compte 56.<|im_end|>
|
| 50 |
+
</s>
|
| 51 |
>>>
|
| 52 |
```
|
| 53 |
|