mfarre HF staff orrzohar commited on
Commit
41348c8
·
verified ·
1 Parent(s): 54cb403

Fix dtype processing in README example (#5)

Browse files

- Fix dtype processing in README example (5e12bdc378a11643e58065dada60fce07beee680)


Co-authored-by: Orr Zohar <[email protected]>

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -173,7 +173,7 @@ inputs = processor.apply_chat_template(
173
  tokenize=True,
174
  return_dict=True,
175
  return_tensors="pt",
176
- ).to(model.device)
177
 
178
  generated_ids = model.generate(**inputs, do_sample=False, max_new_tokens=64)
179
  generated_texts = processor.batch_decode(
 
173
  tokenize=True,
174
  return_dict=True,
175
  return_tensors="pt",
176
+ ).to(model.device, dtype=torch.bfloat16)
177
 
178
  generated_ids = model.generate(**inputs, do_sample=False, max_new_tokens=64)
179
  generated_texts = processor.batch_decode(