Summary
glm_moe_dsa (GLM-5.2, added in #555) builds an ONNX graph that ONNX Runtime refuses to load: the MLA attention emits a Squeeze whose target axis is not size 1.
Node (model/layers.0/self_attn/Squeeze_node_46) Op (Squeeze)
[ShapeInferenceError] Dimension of input 1 must be 1 instead of 4
This also makes test_onnx_checker_passes[glm_moe_dsa] fail with ValidationError: Field 'type' of 'value_info' is required but missing, and leaves logits without a shape after inference.
Reproducing
pytest tests/synthetic_parity_test.py -k glm_moe_dsa
pytest tests/build_graph_test.py -k glm_moe_dsa
This needs #551 (or just its tests/_test_configs.py entry) on the branch. Before that, glm_moe_dsa had no tiny config at all, so it fell back to an auto-generated one with qk_nope_head_dim/qk_rope_head_dim unset and died earlier with:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
src/mobius/components/_deepseek_mla.py:57
I fixed that config gap in #551 (tiny config mirroring the model's own fixture in src/mobius/models/glm_moe_dsa_test.py), which takes glm_moe_dsa from 5 failing tests to 3. The invalid Squeeze is what remains, and it is a defect in the model rather than the config — the config fix only let the graph build far enough to expose it.
Why the co-located tests don't catch it
src/mobius/models/glm_moe_dsa_test.py passes because it asserts on graph structure and never loads the model in ORT. The failure only appears once something actually runs the graph.
Notes
Fixing this needs GLM-5.2 DSA/MLA knowledge, so I've left it rather than guessing at the correct axis.
Summary
glm_moe_dsa(GLM-5.2, added in #555) builds an ONNX graph that ONNX Runtime refuses to load: the MLA attention emits aSqueezewhose target axis is not size 1.This also makes
test_onnx_checker_passes[glm_moe_dsa]fail withValidationError: Field 'type' of 'value_info' is required but missing, and leaveslogitswithout a shape after inference.Reproducing
This needs #551 (or just its
tests/_test_configs.pyentry) on the branch. Before that,glm_moe_dsahad no tiny config at all, so it fell back to an auto-generated one withqk_nope_head_dim/qk_rope_head_dimunset and died earlier with:I fixed that config gap in #551 (tiny config mirroring the model's own fixture in
src/mobius/models/glm_moe_dsa_test.py), which takesglm_moe_dsafrom 5 failing tests to 3. The invalidSqueezeis what remains, and it is a defect in the model rather than the config — the config fix only let the graph build far enough to expose it.Why the co-located tests don't catch it
src/mobius/models/glm_moe_dsa_test.pypasses because it asserts on graph structure and never loads the model in ORT. The failure only appears once something actually runs the graph.Notes
Fixing this needs GLM-5.2 DSA/MLA knowledge, so I've left it rather than guessing at the correct axis.