Update README.md
Browse files
README.md
CHANGED
@@ -170,7 +170,12 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
170 |
message = [ { "role": "user", "content": text } ]
|
171 |
date_string = datetime.today().strftime('%Y-%m-%d')
|
172 |
|
173 |
-
prompt = tokenizer.apply_chat_template(
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
|
176 |
outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=200)
|
|
|
170 |
message = [ { "role": "user", "content": text } ]
|
171 |
date_string = datetime.today().strftime('%Y-%m-%d')
|
172 |
|
173 |
+
prompt = tokenizer.apply_chat_template(
|
174 |
+
message,
|
175 |
+
tokenize=False,
|
176 |
+
add_generation_prompt=True,
|
177 |
+
date_string=date_string
|
178 |
+
)
|
179 |
|
180 |
inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
|
181 |
outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=200)
|