jxu124 commited on
Commit
5c119e9
·
1 Parent(s): f116497

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -31,7 +31,7 @@ text = " #instruction: guess what i want? \n #context: \"human: look that man in
31
  with torch.no_grad():
32
  pt_txt = tokenizer([text], return_tensors="pt").input_ids.cuda()
33
  pt_img = image_processor([image], return_tensors="pt").pixel_values.to(torch.float16).cuda()
34
- gen = _model.generate(pt_txt, patch_images=pt_img, top_p=0.9, do_sample=True, no_repeat_ngram_size=3, max_length=256)
35
  print(tokenizer.batch_decode(gen, skip_special_tokens=True))
36
  # e.g. [' is he the one who just threw the ball?'] # Due to the generator, different results may be output
37
  ```
 
31
  with torch.no_grad():
32
  pt_txt = tokenizer([text], return_tensors="pt").input_ids.cuda()
33
  pt_img = image_processor([image], return_tensors="pt").pixel_values.to(torch.float16).cuda()
34
+ gen = model.generate(pt_txt, patch_images=pt_img, top_p=0.5, do_sample=True, no_repeat_ngram_size=3, max_length=256)
35
  print(tokenizer.batch_decode(gen, skip_special_tokens=True))
36
  # e.g. [' is he the one who just threw the ball?'] # Due to the generator, different results may be output
37
  ```