Skip to content

Commit eacf244

Browse files
justinchubyCopilot
andcommitted
Support complete sharded GGUF imports
Assemble strict local shard sets as one lazy logical GGUF model and resolve Hub sets at an immutable revision with cache-aware capacity preflight. Preserve quantized tensor paths, deterministic metadata, runtime identity hashing, and single-file behavior. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent ee521b0 commit eacf244

10 files changed

Lines changed: 730 additions & 55 deletions

File tree

‎docs/api/build_from_gguf.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ package.save("output")
3030
Use `keep_quantized=False` for explicit float import. Pass `mmproj=` only for an
3131
evidenced multimodal sidecar. The CLI equivalent is `mobius build model.gguf -o output`.
3232

33+
Split GGUF models are accepted by pointing at any local
34+
`model-00001-of-000NN.gguf` shard. Mobius discovers the exact sibling set in the same
35+
directory, validates all split metadata and tensor ownership, and reads tensors lazily from
36+
their owning shard without concatenating payloads. Hub references such as
37+
`owner/repo@revision:path/model-00002-of-00003.gguf` resolve the complete set at one immutable
38+
commit, preflight its total download size against free cache space, and never build from a
39+
partial download.
40+
3341
## API
3442

3543
```python

‎src/mobius/integrations/gguf/__init__.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
# Text-only model
1414
pkg = build_from_gguf("path/to/model.gguf")
15+
# Any local shard discovers and validates its exact sibling set.
16+
pkg = build_from_gguf("path/to/model-00002-of-00003.gguf")
17+
# Hub shard references resolve and pin the complete immutable set.
18+
pkg = build_from_gguf("owner/repo@commit:model-00002-of-00003.gguf")
1519
# Supported quantization is preserved by default; pass
1620
# keep_quantized=False for a fully float model.
1721

0 commit comments

Comments
 (0)