-
Notifications
You must be signed in to change notification settings - Fork 54
update model_config for granite 4 models #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| { | ||
| "architectures": [ | ||
| "GraniteMoeHybridForCausalLM" | ||
| ], | ||
| "attention_bias": false, | ||
| "attention_dropout": 0.0, | ||
| "attention_multiplier": 0.0078125, | ||
| "bos_token_id": 100257, | ||
| "embedding_multiplier": 12, | ||
| "eos_token_id": 100257, | ||
| "hidden_act": "silu", | ||
| "hidden_size": 4096, | ||
| "init_method": "mup", | ||
| "initializer_range": 0.1, | ||
| "intermediate_size": 12800, | ||
| "layer_types": [ | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention" | ||
| ], | ||
| "logits_scaling": 16, | ||
| "mamba_chunk_size": 256, | ||
| "mamba_conv_bias": true, | ||
| "mamba_d_conv": 4, | ||
| "mamba_d_head": 64, | ||
| "mamba_d_state": 256, | ||
| "mamba_expand": 2, | ||
| "mamba_n_groups": 1, | ||
| "mamba_n_heads": 128, | ||
| "mamba_proj_bias": false, | ||
| "max_position_embeddings": 131072, | ||
| "model_type": "granitemoehybrid", | ||
| "normalization_function": "rmsnorm", | ||
| "num_attention_heads": 32, | ||
| "num_experts_per_tok": 0, | ||
| "num_hidden_layers": 40, | ||
| "num_key_value_heads": 8, | ||
| "num_local_experts": 0, | ||
| "output_router_logits": false, | ||
| "pad_token_id": 100256, | ||
| "position_embedding_type": "rope", | ||
| "residual_multiplier": 0.22, | ||
| "rms_norm_eps": 1e-05, | ||
| "rope_scaling": null, | ||
| "rope_theta": 10000000, | ||
| "router_aux_loss_coef": 0.01, | ||
| "shared_intermediate_size": 12800, | ||
| "tie_word_embeddings": true, | ||
| "torch_dtype": "bfloat16", | ||
| "transformers_version": "4.56.0", | ||
| "use_cache": true, | ||
| "vocab_size": 100352 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "architectures": [ | ||
| "GraniteMoeHybridForCausalLM" | ||
| "GraniteForCausalLM" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the diff between the old and new checkpoint configs |
||
| ], | ||
| "attention_bias": false, | ||
| "attention_dropout": 0.0, | ||
|
|
@@ -10,81 +10,22 @@ | |
| "eos_token_id": 100257, | ||
| "hidden_act": "silu", | ||
| "hidden_size": 4096, | ||
| "init_method": "mup", | ||
| "initializer_range": 0.1, | ||
| "intermediate_size": 12800, | ||
| "layer_types": [ | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention", | ||
| "attention" | ||
| ], | ||
| "logits_scaling": 16, | ||
| "mamba_chunk_size": 256, | ||
| "mamba_conv_bias": true, | ||
| "mamba_d_conv": 4, | ||
| "mamba_d_head": 64, | ||
| "mamba_d_state": 256, | ||
| "mamba_expand": 2, | ||
| "mamba_n_groups": 1, | ||
| "mamba_n_heads": 128, | ||
| "mamba_proj_bias": false, | ||
| "max_position_embeddings": 131072, | ||
| "model_type": "granitemoehybrid", | ||
| "normalization_function": "rmsnorm", | ||
| "mlp_bias": false, | ||
| "model_type": "granite", | ||
| "num_attention_heads": 32, | ||
| "num_experts_per_tok": 0, | ||
| "num_hidden_layers": 40, | ||
| "num_key_value_heads": 8, | ||
| "num_local_experts": 0, | ||
| "output_router_logits": false, | ||
| "pad_token_id": 100256, | ||
| "position_embedding_type": "rope", | ||
| "residual_multiplier": 0.22, | ||
| "rms_norm_eps": 1e-05, | ||
| "rope_scaling": null, | ||
| "rope_theta": 10000000, | ||
| "router_aux_loss_coef": 0.01, | ||
| "shared_intermediate_size": 12800, | ||
| "tie_word_embeddings": true, | ||
| "torch_dtype": "bfloat16", | ||
| "transformers_version": "4.56.0", | ||
| "transformers_version": "4.53.3", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would different transformers version cause any issues between the 2 variants?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know the answer :/ It's probably not too relevant for us as we're not using transformers to load the model |
||
| "use_cache": true, | ||
| "vocab_size": 100352 | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me think that there might have be a mistake when creating the new checkpoint 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's kinda unclear how things evolved here, probably part of the reason why these configs haven't quite yet landed on hf hub