Repository navigation
serve: --weight-overlay and a drafter read from its target checkpoint (Inkling 2 Mini from its HF repos) - #406
Merged
Merged
Conversation
Lets Inkling 2 Mini (#401) serve straight from its Hugging Face repos, with no assembled model or drafter directory, so a sparkrun recipe (HF ids, HF offline after sync) can start it: - `--weight-overlay <id|path>` loads every *.safetensors of an overlay repo beside the checkpoint and adds its tensors under their own names (a name the checkpoint already has is an error). Spark mode: `--weight-overlay Enntity/Inkling-2-Mini-Spark-NVFP4`. The Inkling loader already switches on those tensor names, so the result is the same store the assembled index produced. - A `--draft-model` whose config.json carries an `mtp_config` beside an `mtp.safetensors` (Inkling 2 Mini's DSpark drafter) is read as that drafter: config = mtp_config + text_config.unpadded_vocab_size, weights = mtp.safetensors. `--draft-model thinkingmachines/Inkling-2-Mini` works. Each such file reaches the loader as model.safetensors through one symlink in a private temp directory; nothing in the checkpoint is copied or renamed. WeightStore::absorb merges a second store. No new env names. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Enntity/Inkling-2-Mini-Spark-NVFP4 ships only spark-nvfp4.safetensors, quant-report.json and receipts/ — no config.json — so resolving an overlay id through resolve_model_dir never booted. The overlay resolves straight to its refs/main snapshot; safetensors_files does the validation.
data-angel
added a commit
to Enntity/atlas
that referenced
this pull request
Nov 23, 2026
…split, Atlas-Inf#403, Atlas-Inf#404, Atlas-Inf#406, Atlas-Inf#410) into the images follow-up Two conflicts, both from the split of 401: layers/inkling2/mod.rs declares owner_runs and proj, and inkling2_proj_gemv joins the PDL list in its new file pdl_inkling2.rs. The tree equals this branch's five commits replayed onto main. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #401 (@data-angel's Inkling 2 Mini port). Lets Inkling 2 Mini serve straight from its Hugging Face repos: no assembled model dir and no separate drafter dir. Recipes in sparkrun-recipes then need nothing beyond HF ids. That covers sparkrun-recipes#36, which pins Spark (recommended) and Strict.
--weight-overlay <hf id | path>loads every*.safetensorsfile in an overlay repo alongside the checkpoint, adding each tensor under its own name (WeightStore::absorb). A name the checkpoint already has is an error.--weight-overlay Enntity/Inkling-2-Mini-Spark-NVFP4.config.json, so the overlay resolves to itsrefs/mainsnapshot throughmodel_resolver::hf_snapshot_dir. That is the first half ofresolve_from_hf_cache, extracted with its error messages byte-identical. The second commit fixes the first commit's use ofresolve_model_dir, which never booted on the real repo.--draft-modelwhoseconfig.jsoncarries anmtp_confignext to anmtp.safetensorsis read as that drafter: config =mtp_config+text_config.unpadded_vocab_size, weights =mtp.safetensors. So--draft-model thinkingmachines/Inkling-2-Miniserves the checkpoint's own DSpark drafter.model.safetensorsthrough one symlink in a private temp dir, so nothing in the HF cache is copied or renamed.ATLAS_*names, and nothing changes unless one of these flags points at such a repo.The branch is linear on main 992eab2: the same two commits as the verified
feat/inkling2-401-sparkrun(65a1426 + 58ade50), minus its merges of #401.Test plan (sparky, one GB10)
weight_sidecar3/3 (includingoverlay_resolves_config_less_hf_snapshot),model_resolver7/7.e40433df@ 58ade50: the assembled Spark dir vsthinkingmachines/Inkling-2-Mini --weight-overlay Enntity/Inkling-2-Mini-Spark-NVFP4give greedy C1 8/8 identical. The serve log readsweight overlay ...: 459 tensors.--draft-model thinkingmachines/Inkling-2-Minigive 8/8 identical.atlas-gb10-local:sha-58ade50(sha256:01a6eb24…). The overlay'srefs/mainwas deleted first, so sparkrun's own sync had to restore it.mtp.safetensorsdrafter, and prefix caching on./pingtimeout), 0 ERROR.Generated with Devin