[Hotfix] lmdeploy temp (#1674)

* fix pip version

* fix pip version

* hotfix
This commit is contained in:
bittersweet1999 2024-11-12 16:10:16 +08:00 committed by GitHub
parent a0ef2fd3b4
commit 17b5e52f6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,7 @@ class TurboMindModelwithChatTemplate(BaseModel):
gen_config = copy.deepcopy(DEFAULT_GEN_CONFIG)
gen_config.update(self.gen_config)
if do_sample:
if do_sample or self.gen_config['do_sample']:
gen_config['top_k'] = 40
gen_config['temperature'] = temperature
else: