Skip to content

Commit

Permalink
Fix bug when loading 4bit checkpoint quantized in INC (#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
xin3he authored and regisss committed Oct 29, 2024
1 parent 7e0deeb commit 95ea921
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/text-generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ def setup_model(args, model_dtype, model_kwargs, logger):
original_model=org_model,
**model_kwargs,
)
# TODO: This will be removed in v1.19 Synapse release
# the loaded model should have the same dtype as original_model
model = model.to(model_kwargs["torch_dtype"])
else:
if args.assistant_model is not None:
assistant_model = AutoModelForCausalLM.from_pretrained(
Expand Down

0 comments on commit 95ea921

Please sign in to comment.