Skip to content

Commit

Permalink
Fixing GGUF support for StableLm (#35060)
Browse files Browse the repository at this point in the history
fix

Co-authored-by: Marc Sun <[email protected]>
  • Loading branch information
MekkCyber and SunMarc authored Dec 10, 2024
1 parent 3e2769a commit e5c45a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/modeling_gguf_pytorch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def load_gguf_checkpoint(gguf_checkpoint_path, return_tensors=False):
ffn_norm_name = "ffn_norm"
qkv_bias = any(bias_name in tensor.name for tensor in reader.tensors for bias_name in attn_bias_name)
use_parallel_residual = any(ffn_norm_name in tensor.name for tensor in reader.tensors)
parsed_parameters["config"]["qkv_bias"] = qkv_bias
parsed_parameters["config"]["use_qkv_bias"] = qkv_bias
parsed_parameters["config"]["use_parallel_residual"] = not use_parallel_residual

model_size = ""
Expand Down

0 comments on commit e5c45a6

Please sign in to comment.