Commit
•
54caa11
1
Parent(s):
ded0f4c
Update README.md
Browse files
README.md
CHANGED
@@ -174,7 +174,7 @@ stopping_criteria_list = StoppingCriteriaList([stopping_criteria])
|
|
174 |
|
175 |
#EXAMPLE #1
|
176 |
input_text = """James Buchanan es el único presidente que nunca se casó.”"""
|
177 |
-
targets_traslate= "en"
|
178 |
|
179 |
txt=f"""<bos><start_of_turn>system
|
180 |
You are a helpful AI assistant.
|
@@ -193,13 +193,13 @@ lista de codigos linguisticos disponibles: ["es", "en", "fr", "de"].<end_of_turn
|
|
193 |
inputs = tokenizer.encode(txt,
|
194 |
return_tensors="pt",
|
195 |
add_special_tokens=False).to("cuda:0")
|
196 |
-
max_new_tokens=
|
197 |
generation_config = GenerationConfig(
|
198 |
max_new_tokens=max_new_tokens,
|
199 |
-
temperature=0.
|
200 |
#top_p=0.9,
|
201 |
-
|
202 |
-
repetition_penalty=1
|
203 |
do_sample=True,
|
204 |
)
|
205 |
outputs = model.generate(generation_config=generation_config,
|
|
|
174 |
|
175 |
#EXAMPLE #1
|
176 |
input_text = """James Buchanan es el único presidente que nunca se casó.”"""
|
177 |
+
targets_traslate= "en" # response english.
|
178 |
|
179 |
txt=f"""<bos><start_of_turn>system
|
180 |
You are a helpful AI assistant.
|
|
|
193 |
inputs = tokenizer.encode(txt,
|
194 |
return_tensors="pt",
|
195 |
add_special_tokens=False).to("cuda:0")
|
196 |
+
max_new_tokens=200
|
197 |
generation_config = GenerationConfig(
|
198 |
max_new_tokens=max_new_tokens,
|
199 |
+
temperature=0.32,
|
200 |
#top_p=0.9,
|
201 |
+
top_k=45,
|
202 |
+
repetition_penalty=1.,
|
203 |
do_sample=True,
|
204 |
)
|
205 |
outputs = model.generate(generation_config=generation_config,
|