mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
Update tuner.py
Former-commit-id: 5f72439a1d1f5cd9ade8bd30056c0dfb6059c1bd
This commit is contained in:
parent
17975fefd7
commit
4781b63edb
@ -65,7 +65,7 @@ def export_model(args: Optional[Dict[str, Any]] = None) -> None:
|
||||
raise ValueError("The model is not a `PreTrainedModel`, export aborted.")
|
||||
|
||||
if getattr(model, "quantization_method", None) is None: # cannot convert dtype of a quantized model
|
||||
output_dtype = torch.float16
|
||||
output_dtype = getattr(model.config, "torch_dtype", torch.float16)
|
||||
setattr(model.config, "torch_dtype", output_dtype)
|
||||
model = model.to(output_dtype)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user