wenbopan commited on
Commit
3a088cb
1 Parent(s): 9bab0d3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -0
README.md CHANGED
@@ -52,6 +52,7 @@ messages = [
52
  {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
53
  {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
54
  ]
 
55
  input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
56
  generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
57
  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. ...
 
52
  {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
53
  {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
54
  ]
55
+
56
  input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
57
  generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
58
  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. ...