convert(fp8->int4): --indir copies the full metadata set and resumes interrupted passes (#383)#404
Merged
Merged
Conversation
…interrupted passes (JustVugg#383) Two gaps in the local path, both raised in JustVugg#383: - The main --indir pass copied only config.json while the download path copies four files; without tokenizer.json the converted container can't run chat/serve. Copy the same four, print what was copied, and warn when the source is missing any (tokenizer.json called out explicitly). - Local passes restarted from shard 0 on every rerun. out-NNNNN names count EMITTED shards, not input indexes (shards with no relevant tensors emit nothing), so the download path's exists-check can't be mirrored directly: a sidecar manifest per prefix records input -> output (or empty) plus the conversion parameters, written atomically after each shard. Rerun skips what matches and refuses a parameter mismatch on the same outdir instead of mixing containers (the JustVugg#355 failure mode). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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
Closes the two
--indirgaps from #383, as requested there.Metadata. The main
--indirpass copied onlyconfig.json; the download path copies four files. A locally-converted container was left withouttokenizer.json, socoli chat/serverefuse to start on it. The local pass now copies the same four (config.json,tokenizer.json,tokenizer_config.json,generation_config.json), prints what it copied, and warns when the source directory is missing any —tokenizer.jsoncalled out by name, since that's the one that breaks chat.Resume. Local passes restarted from shard 0 on every rerun. The download path's
if os.path.exists(outp): continuecan't be mirrored directly: localout-NNNNNnames count emitted shards, not input indexes (shards with no relevant tensors emit no file, so the numbering shifts under resume). Instead, a per-prefix sidecar manifest (.out-progress.json/.out-mtp-progress.json/.out-idx-progress.json) records input shard → output name (or "empty"), plus the conversion parameters, and is rewritten atomically after each shard. A rerun skips everything that matches and still exists on disk. A rerun with different parameters on the same outdir is refused with an explanatory error instead of silently mixing containers — the #355 failure mode, blocked one layer deeper.Validation
make -C c check— clean build, C unit tests, Python suite (73 tests) green (aarch64, gcc 13.3)Functional matrix on the tiny model (
glm_tinysource, GB10):[RESUME] 1 shard(s) already done, output byte-identical (md5)--ebits 8on an--ebits 4outdirERROR, files untouched--mtppass into the same outdir[META] WARNING: not found … — chat/serve need tokenizer.jsonout-00001, byte-identical (md5)CUDA — n/a (tools-only change)
No performance claims
Compatibility
Two notes for review. The manifest lives in the outdir next to the shards it describes, so deleting the outdir resets everything consistently, and deleting shards while keeping the manifest is also safe (the exists-check reconverts them); if you'd rather have resume opt-in behind a flag, happy to gate it. And this is written to compose with #385 (local index resolution for
--mtp/--indexer): it only touches emit/skip bookkeeping and metadata copy, not shard selection — if #385 lands first and the loop moves, happy to rebase promptly.🤖 Generated with Claude Code