mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
Added an assertion for model args
This commit is contained in:
parent
db4f18099f
commit
8e0a4e2885
1 changed files with 4 additions and 1 deletions
|
@ -155,7 +155,10 @@ class Llama:
|
|||
model = convert_to_int4_quantized_model(model, model_args, config)
|
||||
model.load_state_dict(state_dict, strict=True)
|
||||
|
||||
if model_args.quantization_args.spinquant:
|
||||
if (
|
||||
model_args.quantization_args is not None
|
||||
and model_args.quantization_args.spinquant
|
||||
):
|
||||
# Add a wrapper for adding hadamard transform for spinquant.
|
||||
# This needs to be done after loading the state dict otherwise an error will be raised while
|
||||
# loading the state dict.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue