fix optimize_model not working (#9995)
This commit is contained in:
parent
9bff84e6fd
commit
86055d76d5
1 changed files with 2 additions and 2 deletions
|
|
@ -47,8 +47,8 @@ class BigDLLM(AutoCausalLM):
|
||||||
if k not in self.AutoCausalLM_ARGS:
|
if k not in self.AutoCausalLM_ARGS:
|
||||||
self.bigdl_llm_kwargs[k] = kwargs.pop(k)
|
self.bigdl_llm_kwargs[k] = kwargs.pop(k)
|
||||||
|
|
||||||
self.bigdl_llm_kwargs['use_cache'] = kwargs.get('use_cache', True)
|
self.bigdl_llm_kwargs['use_cache'] = self.bigdl_llm_kwargs.get('use_cache', True)
|
||||||
self.bigdl_llm_kwargs['optimize_model'] = kwargs.get('optimize_model', True)
|
self.bigdl_llm_kwargs['optimize_model'] = self.bigdl_llm_kwargs.get('optimize_model', True)
|
||||||
AutoModelForCausalLM.from_pretrained = partial(AutoModelForCausalLM.from_pretrained, **self.bigdl_llm_kwargs)
|
AutoModelForCausalLM.from_pretrained = partial(AutoModelForCausalLM.from_pretrained, **self.bigdl_llm_kwargs)
|
||||||
|
|
||||||
kwargs['trust_remote_code'] = kwargs.get('trust_remote_code', True)
|
kwargs['trust_remote_code'] = kwargs.get('trust_remote_code', True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue