Crate: vox-hf-layout · Version: 0.6.0 · Target: Library (lib.rs)
Shared Hugging Face config.json parsing for transformer layout (MENS / Candle plugins).
Minimal Hugging Face config.json parsing for architecture diagnostics and layout validation.
SSOT for vox-populi MENS tensor code and vox-plugin-mens-candle-cuda.
| Struct | Description |
|---|
ConfigDims | — |
HfTransformerLayout | Structured transformer layout from HF config.json (GPT-2, Qwen2-style, qwen3_5-style). |
ParsedTransformerLayout | Layout + coarse [HfArchitecture] bucket (GPT-2 vs stacked causal LM field layout). |
| Enum | Description |
|---|
HfArchitecture | — |
| Function | Description |
|---|
is_vision_or_mtp_key | True for tensor keys belonging to Qwen3.8-27B’s vision tower (model.visual.*) or its multi-token-prediction head (mtp.*) — neither is part of the text tower this crate extracts a layout for, and neither should be requested, downloaded, or validated against by a text-only QLoRA loader. |
from_config_path | Parse config.json at path into a structured layout. |
from_config_json_str | Parse a config.json string (tests + tooling). |
parse_transformer_layout | Parse config.json and classify architecture for legacy CLI / tests. |
detect_hf_architecture | — |
config_dims_for_architecture | Load [ConfigDims] from a Hugging Face config.json for arch. Prefer [HfTransformerLayout::from_config_path] for new code; this keeps older call sites stable. |