Skip to content

Commit 3b52342

Browse files
justinchubyCopilot
andcommitted
Trim the vendored census to the fields the registry reads
The pinned payload carried all 24 survey columns per architecture and 10 per ggml slot, at one JSON line per field. That was 1994 lines — 42% of the change — for data nothing consumed: rope_type, topology, recurrent, hybrid and converter had no reader at all, and status and has_to_float were likewise unused. Keep only what the registry or its tests actually read (cohort and cpp_loader for rejection messages, block geometry and dequantizer coverage for the quantization registry) and reduce moe_mode to the dual_moe boolean the one assertion needs. Emit one record per line so each architecture and each slot is still readable in a diff. 1994 lines to 198, 46 KB to 21 KB, with no change in behavior. The full survey stays where it was produced rather than in the repository. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent 4fc92f8 commit 3b52342

3 files changed

Lines changed: 208 additions & 2014 deletions

File tree

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

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,23 @@
5353
class UpstreamArchitecture:
5454
"""One ``LLM_ARCH_NAMES`` entry as it exists at the pinned commit.
5555
56+
Only the facts the registry reasons about are vendored; the full 24-column
57+
survey stays out of the repository.
58+
5659
Attributes:
5760
gguf_arch: The ``general.architecture`` string.
58-
cohort: Survey cohort, e.g. ``"C01-dense-transformer"``.
59-
rope_type: ``llama_model_rope_type`` for the architecture.
60-
topology: ``"dense"``, ``"moe"``, ``"recurrent"``, and similar.
61-
moe_mode: Whether tensor shapes switch on ``expert_count``.
62-
recurrent: Whether the architecture uses a recurrent state cache.
63-
hybrid: Whether attention and SSM blocks interleave per layer.
61+
cohort: Survey cohort, e.g. ``"C01-dense-transformer"``. Used to tell a
62+
caller which family an unimported architecture belongs to.
6463
cpp_loader: Whether a ``llama_model_*`` class exists. ``gptj`` is the
65-
one architecture where this is ``False``.
66-
converter: Whether a ``convert_hf_to_gguf.py`` registration exists.
64+
one architecture where this is ``False``, so no tool can load it.
65+
dual_moe: Whether tensor shapes switch on ``expert_count`` rather than
66+
on the architecture name. True for 47 architectures.
6767
"""
6868

6969
gguf_arch: str
7070
cohort: str
71-
rope_type: str
72-
topology: str
73-
moe_mode: str
74-
recurrent: bool
75-
hybrid: bool
7671
cpp_loader: bool
77-
converter: bool
72+
dual_moe: bool
7873

7974

8075
@dataclasses.dataclass(frozen=True, slots=True)
@@ -86,14 +81,13 @@ class UpstreamQuantType:
8681
8782
Attributes:
8883
ggml_type_id: Numeric enum value.
89-
enum_name: C enum name, e.g. ``"GGML_TYPE_Q4_K"``.
84+
enum_name: C enum name, e.g. ``"GGML_TYPE_Q4_K"``. Removed slots have no
85+
type name, so this is what identifies them in a message.
9086
name: Lower-case type name, empty for removed slots.
91-
status: ``"active"`` or ``"removed"``.
9287
role: Upstream storage role string.
9388
block_elements: ``blck_size``. ``0`` for removed slots.
9489
block_bytes: ``type_size``. ``0`` for removed slots.
9590
readable: Whether the GGUF parse layer accepts the type.
96-
has_to_float: Whether ggml can expand the type to float.
9791
dequant_impl: Whether ``gguf-py`` ships a Python dequantizer, which is
9892
what the mobius float import path actually calls.
9993
removed_note: Upstream deprecation note, when present.
@@ -102,12 +96,10 @@ class UpstreamQuantType:
10296
ggml_type_id: int
10397
enum_name: str
10498
name: str
105-
status: str
10699
role: str
107100
block_elements: int
108101
block_bytes: int
109102
readable: bool
110-
has_to_float: bool
111103
dequant_impl: bool
112104
removed_note: str
113105

@@ -142,12 +134,10 @@ def upstream_quant_types() -> dict[int, UpstreamQuantType]:
142134
ggml_type_id=int(type_id),
143135
enum_name=fields["enum"],
144136
name=fields["name"],
145-
status=fields["status"],
146137
role=fields["role"],
147138
block_elements=fields["block_elements"],
148139
block_bytes=fields["block_bytes"],
149140
readable=fields["readable"],
150-
has_to_float=fields["has_to_float"],
151141
dequant_impl=fields["dequant_impl"],
152142
removed_note=fields["removed_note"],
153143
)

0 commit comments

Comments
 (0)