We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b82b5d commit 1f7e05cCopy full SHA for 1f7e05c
swift/llm/infer.py
@@ -141,7 +141,7 @@ def prepare_model_template(args: InferArguments,
141
else:
142
print(f'device_count: {torch.cuda.device_count()}')
143
model_kwargs = {}
144
- if device_map is not None:
+ if device_map is None:
145
device_map = get_default_device_map()
146
model_kwargs['device_map'] = device_map
147
if device_map == 'auto':
0 commit comments