mingdali commited on
Commit
35a32fb
1 Parent(s): 621a691

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -0
README.md CHANGED
@@ -33,6 +33,9 @@ tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
33
  # use cuda device
34
  model = AutoModelForCausalLM.from_pretrained(model_path, device_map="cuda", trust_remote_code=True).eval()
35
 
 
 
 
36
  query = tokenizer.from_list_format([
37
  {'image': 'demo.jpeg'},
38
  {'text': '图片中的文字是什么'},
 
33
  # use cuda device
34
  model = AutoModelForCausalLM.from_pretrained(model_path, device_map="cuda", trust_remote_code=True).eval()
35
 
36
+ model.generation_config = GenerationConfig.from_pretrained(checkpoint, trust_remote_code=True)
37
+ model.generation_config.top_p = 0.01
38
+
39
  query = tokenizer.from_list_format([
40
  {'image': 'demo.jpeg'},
41
  {'text': '图片中的文字是什么'},