wenbopan commited on
Commit
f16d3ef
1 Parent(s): d8eaa5d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -54,6 +54,7 @@ messages = [
54
  {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
55
  {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
56
  ]
 
57
  input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
58
  generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
59
  response = tokenizer.decode(generated_ids[0], skip_special_tokens=True) # Aye, matey! The Pythagorean theorem is a nautical rule that helps us find the length of the third side of a triangle. ...
 
54
  {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
55
  {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
56
  ]
57
+
58
  input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
59
  generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
60
  response = tokenizer.decode(generated_ids[0], skip_special_tokens=True) # Aye, matey! The Pythagorean theorem is a nautical rule that helps us find the length of the third side of a triangle. ...