mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Hotfix] Hotfix (#1683)
* fix pip version * fix pip version * fix lint * hotfix
This commit is contained in:
parent
a9d6b6461f
commit
aca8ec3c6a
@ -123,7 +123,7 @@ class TurboMindModelwithChatTemplate(BaseModel):
|
||||
|
||||
gen_config = copy.deepcopy(DEFAULT_GEN_CONFIG)
|
||||
gen_config.update(self.gen_config)
|
||||
if do_sample or self.gen_config['do_sample']:
|
||||
if do_sample or ('do_sample' in self.gen_config and self.gen_config['do_sample']):
|
||||
gen_config['top_k'] = 40
|
||||
gen_config['temperature'] = temperature
|
||||
else:
|
||||
|
@ -101,7 +101,11 @@ class VLLM(BaseModel):
|
||||
if not self.lora_path:
|
||||
outputs = self.model.generate(inputs, sampling_kwargs)
|
||||
else:
|
||||
outputs = self.model.generate(inputs, sampling_kwargs, lora_request=LoRARequest("sql_adapter", 1, self.lora_path))
|
||||
outputs = self.model.generate(inputs,
|
||||
sampling_kwargs,
|
||||
lora_request=LoRARequest(
|
||||
'sql_adapter', 1,
|
||||
self.lora_path))
|
||||
|
||||
prompt_list, output_strs = [], []
|
||||
for output in outputs:
|
||||
|
Loading…
Reference in New Issue
Block a user