Update README.md
Browse files
README.md
CHANGED
@@ -57,7 +57,8 @@ text = tokenizer.apply_chat_template(
|
|
57 |
tokenize=False,
|
58 |
add_generation_prompt=True
|
59 |
)
|
60 |
-
model_inputs = tokenizer([text], return_tensors="pt")
|
|
|
61 |
|
62 |
generated_ids = model.generate(
|
63 |
**model_inputs,
|
|
|
57 |
tokenize=False,
|
58 |
add_generation_prompt=True
|
59 |
)
|
60 |
+
model_inputs = tokenizer([text], return_tensors="pt")
|
61 |
+
#if you don't use "load_in_4bit", you should do "model_inputs = tokenizer([text], return_tensors="pt").to(model.device)"
|
62 |
|
63 |
generated_ids = model.generate(
|
64 |
**model_inputs,
|