|
93 | 93 | "weights. Use keep_quantized=False for explicit float import." |
94 | 94 | ) |
95 | 95 |
|
| 96 | +_BITNET_IMPORT_REASON = ( |
| 97 | + "The exact float route is implemented: TQ1_0/TQ2_0 blocks are dequantized by " |
| 98 | + "the pinned gguf reader, optional scalar projection scales are folded into those " |
| 99 | + "values, and the dedicated graph owns both sub-norms. Quantization-preserving " |
| 100 | + "import is rejected because the current MatMulNBits ABI is affine and cannot " |
| 101 | + "represent BitNet's ternary codebook plus architecture-level scalar sidecars " |
| 102 | + "without an independently value-proven repack. Runtime packaging remains " |
| 103 | + "deferred pending real full-logit prefill and cached-decode parity." |
| 104 | +) |
| 105 | + |
96 | 106 | _ARCTIC_GGUF_GRAPH_REASON = ( |
97 | 107 | "The pinned Arctic graph is not a standard pre-norm MoE block: every layer runs a " |
98 | 108 | "dense parallel SwiGLU branch, then adds a separately normalized routed-expert branch " |
|
395 | 405 | "conditional Q/K norms for large variants, tied output, and logit scaling. The " |
396 | 406 | "canonical command-r and cohere2 GGUF contracts are distinct and cannot alias." |
397 | 407 | ), |
398 | | - "gemma-embedding": ( |
399 | | - "Gemma Embedding is a bidirectional stateless embedding graph with alternating " |
400 | | - "sliding-window attention, four norm sites, sqrt(hidden) embedding scaling, and " |
401 | | - "optional pooling/dense modules. Causal Gemma3 text/VLM tasks expose the wrong ABI." |
402 | | - ), |
403 | 408 | "gptneox": ( |
404 | 409 | "GPT-NeoX GGUF requires fused biased QKV, bias-bearing LayerNorm/GELU blocks, " |
405 | 410 | "partial RoPE, and metadata-selected parallel versus sequential residual topology. " |
|
513 | 518 | "correction-biased routed/shared experts. Mobius has no exact graph or iSWA cache " |
514 | 519 | "contract." |
515 | 520 | ), |
516 | | - "llama-embed": ( |
517 | | - "llama-embed is a canonical embedding architecture that inherits Llama's " |
518 | | - "conditional tensor loader but exposes the embedding graph rather than causal " |
519 | | - "logits. Mobius has no GGUF embedding task/package contract for this ID, so it " |
520 | | - "must not alias ordinary llama." |
521 | | - ), |
522 | 521 | "mellum": ( |
523 | 522 | "Mellum requires an untied head, Q/K norms, routed experts in every layer, and a " |
524 | 523 | "metadata-defined full/sliding attention schedule with distinct RoPE behavior. " |
|
621 | 620 |
|
622 | 621 |
|
623 | 622 | _SPECS: tuple[GGUFArchitectureSpec, ...] = ( |
| 623 | + # --------------------------------------------------------------- BitNet |
| 624 | + GGUFArchitectureSpec( |
| 625 | + gguf_arch="bitnet", |
| 626 | + model_type="bitnet", |
| 627 | + tensor_map_recipe=("bitnet",), |
| 628 | + tensor_processor="bitnet", |
| 629 | + llama_qk_permute=True, |
| 630 | + required_metadata=("attention.layer_norm_rms_epsilon",), |
| 631 | + quantized_import=Support.REJECTED, |
| 632 | + runtime=Support.DEFERRED, |
| 633 | + reason=_BITNET_IMPORT_REASON, |
| 634 | + ), |
624 | 635 | # ---------------------------------------------------------------- Llama |
625 | 636 | GGUFArchitectureSpec( |
626 | 637 | gguf_arch="llama", |
|
1426 | 1437 | "quantization route; use keep_quantized=False." |
1427 | 1438 | ), |
1428 | 1439 | ), |
| 1440 | + GGUFArchitectureSpec( |
| 1441 | + gguf_arch="gemma-embedding", |
| 1442 | + model_type="gemma3_text", |
| 1443 | + module_type="gemma_embedding_gguf", |
| 1444 | + tensor_map_recipe=("gemma_embedding",), |
| 1445 | + config_postprocessor="gguf_embedding", |
| 1446 | + required_metadata=( |
| 1447 | + "attention.causal", |
| 1448 | + "attention.layer_norm_rms_epsilon", |
| 1449 | + "attention.sliding_window", |
| 1450 | + "rope.freq_base", |
| 1451 | + "rope.dimension_count", |
| 1452 | + ), |
| 1453 | + runtime=Support.DEFERRED, |
| 1454 | + quantized_import=Support.REJECTED, |
| 1455 | + reason=( |
| 1456 | + "The exact float embedding graph and package ABI are covered, but no " |
| 1457 | + "onnxruntime-genai embedding package schema/runtime evidence is recorded. " |
| 1458 | + "Packed projection preservation is deliberately rejected pending value-level " |
| 1459 | + "proof for this dedicated graph; use keep_quantized=False." |
| 1460 | + ), |
| 1461 | + ), |
| 1462 | + GGUFArchitectureSpec( |
| 1463 | + gguf_arch="llama-embed", |
| 1464 | + model_type="llama", |
| 1465 | + module_type="llama_embed_gguf", |
| 1466 | + tensor_map_recipe=("llama_embedding",), |
| 1467 | + config_postprocessor="gguf_embedding", |
| 1468 | + required_metadata=( |
| 1469 | + "attention.causal", |
| 1470 | + "attention.layer_norm_rms_epsilon", |
| 1471 | + "rope.freq_base", |
| 1472 | + "rope.dimension_count", |
| 1473 | + ), |
| 1474 | + runtime=Support.DEFERRED, |
| 1475 | + quantized_import=Support.REJECTED, |
| 1476 | + reason=( |
| 1477 | + "Only the complete dense, split-QKV, unbiased, default-RoPE float profile is " |
| 1478 | + "promoted. MoE, fused-QKV, bias-bearing, and rope-factor/scaled variants fail " |
| 1479 | + "closed before config extraction. Runtime packaging and packed value " |
| 1480 | + "preservation remain unproven; use keep_quantized=False." |
| 1481 | + ), |
| 1482 | + ), |
1429 | 1483 | *( |
1430 | 1484 | GGUFArchitectureSpec( |
1431 | 1485 | gguf_arch=architecture, |
|
2157 | 2211 | ), |
2158 | 2212 | GGUFArchitectureSpec( |
2159 | 2213 | gguf_arch="talkie", |
2160 | | - config=Support.DEFERRED, |
2161 | | - tensor_map=Support.DEFERRED, |
2162 | | - graph=Support.DEFERRED, |
| 2214 | + model_type="talkie", |
| 2215 | + tensor_map_recipe=("talkie",), |
| 2216 | + config_postprocessor="talkie", |
| 2217 | + required_metadata=( |
| 2218 | + "context_length", |
| 2219 | + "embedding_length", |
| 2220 | + "feed_forward_length", |
| 2221 | + "block_count", |
| 2222 | + "attention.head_count", |
| 2223 | + "attention.head_count_kv", |
| 2224 | + "attention.layer_norm_rms_epsilon", |
| 2225 | + "rope.freq_base", |
| 2226 | + "rope.dimension_count", |
| 2227 | + "logit_scale", |
| 2228 | + ), |
2163 | 2229 | runtime=Support.DEFERRED, |
2164 | | - reason=_TALKIE_GRAPH_REASON, |
| 2230 | + quantized_import=Support.REJECTED, |
| 2231 | + reason=( |
| 2232 | + "The exact pinned scalar-sidecar float graph is covered, including weight-free " |
| 2233 | + "RMSNorm, inverse NeoX RoPE, post-RoPE Q/K normalization, per-head Q gain, " |
| 2234 | + "embedding skip, causal KV cache, and logit scaling. The public GGUF stores " |
| 2235 | + "embedding skip as a hidden-width vector and omits pinned logit_scale metadata, " |
| 2236 | + "so it is not evidence for this promoted scalar profile. Runtime packaging and " |
| 2237 | + "packed projection preservation remain deferred; use keep_quantized=False." |
| 2238 | + ), |
2165 | 2239 | ), |
2166 | 2240 | GGUFArchitectureSpec( |
2167 | 2241 | gguf_arch="wavtokenizer-dec", |
|
2183 | 2257 | for architecture, reason in _FINAL_CENSUS_DEFERRED_REASONS.items() |
2184 | 2258 | if architecture |
2185 | 2259 | not in { |
| 2260 | + "bitnet", |
2186 | 2261 | "codeshell", |
2187 | 2262 | "command-r", |
2188 | 2263 | "ernie4_5", |
2189 | 2264 | "gptneox", |
2190 | 2265 | "jais", |
| 2266 | + "gemma-embedding", |
2191 | 2267 | "jais2", |
2192 | 2268 | "minicpm", |
2193 | 2269 | "plm", |
|
2196 | 2272 | "qwen", |
2197 | 2273 | "refact", |
2198 | 2274 | "starcoder", |
| 2275 | + "llama-embed", |
2199 | 2276 | "xverse", |
2200 | 2277 | } |
2201 | 2278 | ), |
|
0 commit comments