Archived
format: Gemma 4 12B (gemma4_unified) goes to the gemma4 plugins
Its text model is Gemma 4's with other sizes. The arch id was `gemma4unified`, which no plugin claims. model_type stays in the free-form keys.
This commit is contained in:
1 parent
8088c9a783
commit
d4d6d6cb3e
2 files changed
+18
No files matched your search
@@ -233,6 +233,9 @@ int meta_from_config_json(const std::string& dir, MetaOwn* out) {
|
||||
/* LFM2-VL names the wrapper, not the text model; one plugin serves LFM2 with or without
|
||||
* its tower. `model_type` stays in the free-form keys. */
|
||||
if (out->arch == "lfm2vl") out->arch = "lfm2";
|
||||
/* Gemma 4 12B (`gemma4_unified`): its text model is Gemma 4's, served by the gemma4
|
||||
* plugins; `model_type` tells them apart. */
|
||||
if (out->arch == "gemma4unified") out->arch = "gemma4";
|
||||
}
|
||||
if (const char* nm = gs("_name_or_path")) out->name = nm;
|
||||
|
||||
|
||||
@@ -1925,6 +1925,21 @@ TEST(config_json_fills_the_model_meta_as_each_family_spells_it) {
|
||||
"lfm2", 0, 1024, 16, 8, 64, 0, 0, 0, 0, 0, 0, 1e-5, 1e4,
|
||||
{ { "layer_types", "conv full_attention conv" }, { "hidden_size", "7" },
|
||||
{ "vision_config.hidden_size", "768" } } },
|
||||
{ "Gemma 4 12B: the unified wrapper maps to gemma4, its model_type stays, null experts",
|
||||
R"({"model_type":"gemma4_unified","eos_token_id":[1,106],
|
||||
"text_config":{"model_type":"gemma4_unified_text","hidden_size":3840,
|
||||
"num_attention_heads":16,"num_key_value_heads":8,"num_global_key_value_heads":1,
|
||||
"head_dim":256,"global_head_dim":512,"num_hidden_layers":48,
|
||||
"intermediate_size":15360,"moe_intermediate_size":null,"num_experts":null,
|
||||
"rms_norm_eps":1e-06,"vocab_size":262144,"max_position_embeddings":262144,
|
||||
"rope_parameters":{"full_attention":{"rope_theta":1000000.0},
|
||||
"sliding_attention":{"rope_theta":10000.0}}},
|
||||
"vision_config":{"model_type":"gemma4_unified_vision"}})",
|
||||
"gemma4", 48, 3840, 16, 8, 256, 15360, 262144, 262144, 0, 0, 0, 1e-6, 1e4,
|
||||
{ { "model_type", "gemma4_unified" }, { "global_head_dim", "512" },
|
||||
{ "num_global_key_value_heads", "1" },
|
||||
{ "rope_parameters.full_attention.rope_theta", "1000000" },
|
||||
{ "vision_config.model_type", "gemma4_unified_vision" } } },
|
||||
{ "rope_parameters wins over rope_theta",
|
||||
R"({"model_type":"llama","rope_theta":10000,"rope_parameters":{"rope_theta":5000000}})",
|
||||
"llama", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-6, 5e6, {} },
|
||||
|
||||
Reference in new issue
Block a user