Repository navigation
1BP v5 packages: reader, converter and checker - #1
Merged
Merged
Conversation
ds4 now opens 1bit-MONSTER's 1BP packages as well as GGUF. 1BP v5 is the 256-byte 1BP header and tensor index, plus a metadata block encoded as GGUF's key/value section and 64-byte-aligned data (docs/1BP.md). model_open() reads the magic and hands a 1BP file to model_open_onebp() (ds4_onebp.inc), which fills the same tensor and metadata tables as the GGUF reader. gguf-tools/gguf_to_1bp.py converts a GGUF (a local file, or hf:// read with range requests) by copying its metadata byte for byte and carrying every tensor in its GGUF format; gguf-tools/check_1bp.py compares a package with its GGUF. 1BP's own tile formats (Q4NX, TQ2, ...) are refused for now. Co-Authored-By: Claude Opus 5.5 <[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.
ds4 opens 1bit-MONSTER's 1BP packages as well as GGUF.
Format: 1BP v5 is the 256-byte 1BP header and tensor index, plus a metadata block encoded as GGUF's key/value section and 64-byte-aligned data (
docs/1BP.md).Reader:
model_open()reads the magic and hands a 1BP file tomodel_open_onebp()(ds4_onebp.inc), which fills the same tensor and metadata tables as the GGUF reader. Everything after that is unchanged.Tools:
gguf-tools/gguf_to_1bp.pyconverts a GGUF, either a local file orhf://read with range requests. It copies the metadata byte for byte and carries every tensor in its GGUF format (1BP quant 256 + ggml type).gguf-tools/check_1bp.pycompares a package with its GGUF.1BP's own tile formats (Q4NX, TQ2, …) are refused for now.
Checked on Strix Halo (ROCm, gfx1151, TheRock):
.1bp:check_1bp.pyOK, all 310 tensors and 32 metadata keys identical.antirez/deepseek-v4-ggufrevf71f23d5, 81 GiB), converted fromhf://without the GGUF on disk: 1,328 tensors, 62 metadata keys.ds4-serveron the.1bpgives the same answers and completion-token counts as on the GGUF for three prompts at temperature 0 (256 tokens each), for example "The capital of France is Paris."make strix-halo) is clean.🤖 Generated with Claude Code