fix from_pretrained when device_map=None (#10361)
* pr trigger * fix error when device_map=None * fix device_map=None
This commit is contained in:
parent
d7b765fd3f
commit
a425eaabfc
2 changed files with 2 additions and 2 deletions
2
.github/workflows/llm-harness-evaluation.yml
vendored
2
.github/workflows/llm-harness-evaluation.yml
vendored
|
|
@ -185,7 +185,7 @@ jobs:
|
|||
|
||||
# set --limit if it's pr-triggered to accelerate pr action
|
||||
if ${{github.event_name == 'pull_request'}}; then
|
||||
export LIMIT="--limit 4"
|
||||
export LIMIT="--limit 6"
|
||||
fi
|
||||
|
||||
python run_llb.py \
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class _BaseAutoModelClass:
|
|||
invalidInputError(model_hub in ["huggingface", "modelscope"],
|
||||
"The parameter `model_hub` is supposed to be `huggingface` or "
|
||||
f"`modelscope`, but got {model_hub}.")
|
||||
invalidInputError(not ('device_map' in kwargs and 'xpu' in kwargs['device_map']),
|
||||
invalidInputError(not (kwargs.get('device_map') and 'xpu' in kwargs['device_map']),
|
||||
"Please do not use `device_map` "
|
||||
"with `xpu` value as an argument. "
|
||||
"Use model.to('xpu') instead.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue