Skip to content

onggi diff --ranges: changed byte ranges per file (#46) - #48

Merged
gspark-etri merged 1 commit into
mainfrom
feat/diff-ranges
Oct 22, 2026
Merged

gspark-etri merged 1 commit into
mainfrom
feat/diff-ranges

Conversation

@gspark-etri

Copy link
Copy Markdown
Contributor

Background

aicomp #129 asks the engine to switch a resident NPU build to another build of the same model by uploading only the changed parts. For that, the engine needs the changed byte ranges per file, and onggi diff reported only totals (#46).

Changes

  • Store.Diff takes DiffOptions{Ranges}. With it, FileDiff.Changed lists the changed runs as [offset, length]; every other byte is at the same offset in the paired base file.
  • CLI: onggi diff --ranges [--json].

Verification

  • Unit test: the ranges are ordered, inside the file, equal in number to changed_runs, and cover exactly size - same; the bytes before the first range equal the base. Without the option, changed is absent.
  • Lab store, decode B2 → decode B8 (15.2 GB .rbln):
changed decode_S256_B8_lm.rbln offset 0 length 45196 (45.2 kB)
changed decode_S256_B8_lm.rbln offset 60586 length 9212 (9.2 kB)
changed decode_S256_B8_lm.rbln offset 15009911429 length 218137453 (218.1 MB)

The first 70 KB and the last 218 MB differ; the 15.0 GB between them is identical at the same offsets. Formats are not parsed (ADR-0009); these are byte positions only.

Compatibility and limits

  • Store.Diff gained a parameter (Go API). The CLI output is unchanged without --ranges.

Related Issue

Closes #46

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gspark-etri
gspark-etri merged commit 5e69bdd into main Oct 22, 2026
3 checks passed
@gspark-etri
gspark-etri deleted the feat/diff-ranges branch October 22, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onggi diff --ranges: changed byte ranges per file, for partial reloads on the NPU

1 participant