Repository navigation
Vendor-neutral two-level chunking (by size) and placement-class report - #78
Draft
gspark-etri wants to merge 2 commits into
Draft
gspark-etri wants to merge 2 commits into
gspark-etri wants to merge 2 commits into
Conversation
New stores sub-chunk new chunks of files of at least --sub-min-file (default 1 MiB) instead of by ATOM file kind; stores that recorded sub_kinds keep them. --sub-probe is an experiment for the measurement. dedup-report --classify reports referenced / embedded-rearranged / embedded-shifted / new per file from chunk shares alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the lab node the size policy (sub-chunk files >= 1 MiB) stores the ATOM set in 16.78 GB (kind policy 16.70 GB) and cuts the RNGD pfbatch -> preset switch from 4.33 to 0.65 MB, at +0.53 GB metadata on a first-time 16 GB checkpoint; the probe lost 10.2 GB on ATOM because the first file of a family is never sub-chunked. The probe code is removed (measured at ec9bc0f). Raw data in docs/data/, summary and placement classes in docs/sub-chunk-policy.md; README and docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Background
Two-level chunking (#15) was switched on per file by name:
store.DefaultSubKinds/push --sub-kindsdefaultedto
atom-prefill,atom-decode,atom-other, whichpkg/layoutderives from.rblnand the wordsprefill/decode. ATensorRT-LLM engine or a furiosa-llm bundle never got sub-chunks, and a renamed ATOM file lost them. The design (a
variant coordinate plus three byte-level weight-placement classes) and ADR-0009 say storage decisions come from the
bytes, not from vendor names.
Changes
--sub-min-file(default1 MiB), recorded in the store config as
sub_min_file.Store.subChunks(rel, size): stores that recordedsub_kindskeep deciding by kind; neither field means every file, as before.--sub-kinds LIST|allstill selects theold behaviour; kinds and a size exclude each other at creation.
onggi lsshows the policy.pkg/layoutstays forreports (
dedup-reportrows,inspect) and as the existing pairing hint indiff.onggi dedup-report --classify [--reference PATH]...reports per filereferenced/embedded-rearranged/embedded-shifted/newfrom chunk shares alone: the share in thereferences (coarse), and the share found elsewhere at coarse 64 KiB and at fine 4 KiB chunks. Thresholds are flags
with documented defaults (0.95 / gap 0.25 / 0.5). JSON adds
files[].class,files[].sharesandclassify. Noformat is parsed.
docs/sub-chunk-policy.md(candidates, measurements, choice, compatibility, placement results), raw datadocs/data/sub-chunk-policy-20261030.json, README (en/ko), artifact-formats, evaluation.Verification
Measurement (lab node with the ATOM set, HF checkpoint and RNGD artifacts;
nice -n 19, 16 threads, shared node;n = 1 per configuration, sizes deterministic for a given push order; binaries ec9bc0f and main 05c9760):
_lm), fetchedThe binary from
mainstores the ATOM set in 16.70 GB, identical tokind. The probe (sub-chunk a file's first 64 newchunks, continue if ≥ 10 % found) was rejected: the first file of a family finds nothing stored, so later rearranged
files cannot match it at 4 KiB, and ATOM loses 10.2 GB. Bytes alone cannot tell that first copy from a checkpoint, so
the size policy trades a bounded metadata cost on new checkpoints (+3.3 %, ~3× push time for that content) for never
losing dedup. Details and the placement classes of both sets:
docs/sub-chunk-policy.md.Tests:
TestSubMinFileIgnoresNames(arank0.engineandrenamed.binget sub-chunks; the decision depends onlyon size),
TestSubPolicyIsStoredWithTheStore(an old config withsub_kindskeeps its behaviour; a new store keepssub_min_file; both together are rejected),TestPlacementClasses,TestPlacementReferenced(reference through asymlink, as in an HF snapshot),
TestClassRulesAndThresholds,TestDedupReportClassify.go test -race ./...,go vet ./...,gofmt -l .clean locally (Go 1.24.13 in golang:1.24-bookworm).Compatibility and limits
sub_kindskept). Manifests (includingfiles[].kind), chunk lists, locators,indexes and composite tables are unchanged. The binary from
mainpulled an artifact from a store created by thisbranch, byte-identical; this branch reads and pushes to a store created by
main.sub_min_fileand sub-chunks every file, small ones included. Theresult is valid for all versions; it only costs metadata for files under 1 MiB.
them carries a larger locator (RNGD preset: +227 MB vs +12 MB). A follow-up could let locators reference composites.
integration/onggi-serving): both touchpkg/store/push.go. This PR changesone line there (
s.subChunks(files[i].rel, files[i].Size)), and Integrate verified delta comparison and compatible artifact preparation #72 addsProfilearound it; the merge is mechanical.cmd/onggi/store.go(flags) is touched by both too.Related Issue
Closes #74
🤖 Generated with Claude Code