Skip to content

Commit f76b5a6

Browse files
justinchubyCopilot
andcommitted
test(gguf-preflight): drop vestigial num_experts shim from dense fixture
The dense non-MoE fixture _write_quant_sharded_gguf carried a num_experts kwarg whose only caller was the pre-revision vacuous MoE test. That caller now uses the dedicated _write_glm_moe_iq1_sharded_gguf fixture, leaving the param dead. Per the no-backward-compat / clean-API directive, remove the shim rather than retain it; the dense fixture is now explicitly expert-free and points at the MoE fixture for sparse routed-expert coverage. No caller of _write_quant_sharded_gguf passed num_experts, so this is caller-atomic. Co-authored-by: Copilot <[email protected]>
1 parent 50ec2e7 commit f76b5a6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/mobius/integrations/gguf/_preflight_test.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,14 @@ def _write_quant_sharded_gguf(
9999
stem: str = "q",
100100
split_max_tensors: int = 2,
101101
include_unsupported: bool = False,
102-
num_experts: int | None = None,
103102
) -> list[Path]:
104103
"""Write a shape-faithful multi-shard GGUF with mixed real quant types.
105104
106105
F32 (passthrough), Q8_0 (repack), IQ1_S (native-preserve), and — when
107106
*include_unsupported* — Q5_K (no lossless path). Bodies are zeroed; only the
108-
headers (types/dims) matter to the metadata-only preflight.
107+
headers (types/dims) matter to the metadata-only preflight. This dense
108+
(non-MoE) fixture is deliberately expert-free; sparse routed-expert coverage
109+
lives in :func:`_write_glm_moe_iq1_sharded_gguf`.
109110
"""
110111
from gguf import GGMLQuantizationType, GGUFWriter
111112

@@ -119,8 +120,6 @@ def _write_quant_sharded_gguf(
119120
writer.add_head_count(4)
120121
writer.add_head_count_kv(2)
121122
writer.add_vocab_size(32)
122-
if num_experts is not None:
123-
writer.add_expert_count(num_experts)
124123

125124
k = 256
126125
writer.add_tensor("token_embd.weight", np.zeros((8, k), np.float32))

0 commit comments

Comments
 (0)