Update README.md
Browse files
README.md
CHANGED
@@ -67,9 +67,4 @@ model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float
|
|
67 |
inputs = tokenizer("I am so tired I could sleep right now. -> Je suis si fatigué que je pourrais m'endormir maintenant.\nHe is heading to the market. -> Il va au marché.\nWe are running on the beach. ->", return_tensors="pt").to(model.device)
|
68 |
tokens = model.generate(**inputs, max_length=100, do_sample=True, top_p=0.95, top_k=60, temperature=0.3)
|
69 |
print(tokenizer.decode(tokens[0]))
|
70 |
-
|
71 |
-
# remove bos token
|
72 |
-
inputs = tokenizer("Capitales: France -> Paris, Italie -> Rome, Allemagne -> Berlin, Espagne ->", return_tensors="pt", add_special_tokens=True).to(model.device)
|
73 |
-
tokens = model.generate(**inputs, max_length=100, do_sample=True, top_p=0.95, top_k=60)
|
74 |
-
print(tokenizer.decode(tokens[0]))
|
75 |
```
|
|
|
67 |
inputs = tokenizer("I am so tired I could sleep right now. -> Je suis si fatigué que je pourrais m'endormir maintenant.\nHe is heading to the market. -> Il va au marché.\nWe are running on the beach. ->", return_tensors="pt").to(model.device)
|
68 |
tokens = model.generate(**inputs, max_length=100, do_sample=True, top_p=0.95, top_k=60, temperature=0.3)
|
69 |
print(tokenizer.decode(tokens[0]))
|
|
|
|
|
|
|
|
|
|
|
70 |
```
|