Skip to content

Commit fb1f693

Browse files
authored
fix dtype='AUTO' -> 'bf16' bug (#755)
1 parent 877508f commit fb1f693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/llm/utils/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def select_dtype(
119119
raise ValueError(f'args.dtype: {self.dtype}')
120120
# cuda, npu
121121
if self.dtype == 'AUTO':
122-
if is_torch_bf16_gpu_available():
122+
if not is_torch_bf16_gpu_available():
123123
self.dtype = 'fp16'
124124
else:
125125
model_torch_dtype = MODEL_MAPPING[self.model_type].get(

0 commit comments

Comments
 (0)