[Fix] Fix dict update in minigpt4. (#1709)

pull/1670/head
Yixiao Fang 2023-07-28 15:30:30 +08:00 committed by GitHub
parent 0b96dcaa67
commit 1f99279657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -155,8 +155,8 @@ class MiniGPT4(BaseModel):
top_p=0.9,
repetition_penalty=1.0,
length_penalty=1.0,
temperature=1.0,
**generation_cfg)
temperature=1.0)
self.generation_cfg.update(**generation_cfg)
if hasattr(self, 'register_load_state_dict_post_hook'):
self.register_load_state_dict_post_hook(self._load_llama_proj_hook)