nroggendorff commited on
Commit
88df154
1 Parent(s): 06f748d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -42,7 +42,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
42
  model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config)
43
 
44
  question = "What color is the sky?"
45
- prompt = tokenizer.apply_chat_template([{"role": "user", "content": question}])
46
  inputs = tokenizer(prompt, return_tensors="pt")
47
 
48
  outputs = model.generate(**inputs, max_new_tokens=32)
 
42
  model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config)
43
 
44
  question = "What color is the sky?"
45
+ prompt = tokenizer.apply_chat_template([{"role": "user", "content": question}], tokenize=False)
46
  inputs = tokenizer(prompt, return_tensors="pt")
47
 
48
  outputs = model.generate(**inputs, max_new_tokens=32)