You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: refresh docs and skills for refactored public API helpers (#337)
Updates outdated docs and agent skills to match the public-API + DRY
refactor shipped across the themed PRs.
## Changes
- **`build_from_gguf` import** — now a top-level export, so
`docs/api/build_from_gguf.md` and `docs/getting-started.md` use `from
mobius import build_from_gguf` instead of the internal
`mobius.integrations.gguf` path.
- **weight-name-alignment skill** — new *Shared helpers* section
documenting the `_weight_utils` rename helpers, including the new
`rename_weight_keys` and `vlm_vision_weights`, so future model work
reuses them instead of hand-written rename loops.
- **multimodal-models skill** — points at the shared `vlm_*` weight
helpers.
- **moe-models skill** — notes `Qwen35MoEBlock` now subclasses
`Qwen2MoELayer`, and fixes stale class file paths (`models/qwen.py` →
`models/qwen35.py`).
## Dependencies
Depends on the API PRs landing first (the helpers/exports documented
here only exist on those branches):
- #333 — `build_from_gguf` top-level export
- #334 — `rename_weight_keys`
- #336 — `vlm_vision_weights`
Docs-only; no code or tests affected.
---------
Signed-off-by: Justin Chu <11205048+justinchuby@users.noreply.github.com>
Co-authored-by: Justin Chu <11205048+justinchuby@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4.**For non-eliminable renames**, keep them in `preprocess_weights`.
380
380
381
+
## Shared helpers (use instead of hand-writing loops)
382
+
383
+
`mobius._weight_utils` centralises the renames that *do* have to stay in
384
+
`preprocess_weights`. Prefer these over a hand-written
385
+
`for name, tensor in state_dict.items(): name = name.replace(...)` loop:
386
+
387
+
| Helper | Use for |
388
+
|--------|---------|
389
+
|`rename_weight_keys(state_dict, [(old, new), ...])`| Pure substring key renames. Applies ordered, cascading `str.replace` to every key and **raises on key collision**. Returns a new dict (values shared). |
0 commit comments