Skip to main content

Profile-guided layout optimization for GGUF MoE models (BOLT/PGO for LLM weights)

Project description

mbolt

Profile-guided layout optimization for GGUF MoE models — BOLT/PGO, but for weights.

Trace which experts your workload co-activates, rewrite the GGUF so those bytes sit together on disk, decode with explicit-read prefetch: 1.55–1.63× faster memory-squeezed MoE streaming in llama.cpp, 2.23× at the storage level. Weights byte-exact, +0.003% size.

pip install mbolt

mbolt-sim cluster route.bin -o perms.json         # co-activation -> permutations
mbolt model.gguf perms.json -o model.opt.gguf --layout interleave
mbolt-sim gate model.gguf route.bin perms.json -o gate.json   # predict before rewriting

Trace capture and the explicit-read prefetcher need a small llama.cpp patch (MBOLT_TRACE / MBOLT_PREFETCH env vars) shipped in the repo.

Full docs, benchmark reports, and the llama.cpp patch: https://github.com/doramirdor/mbolt

MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbolt-0.1.0.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mbolt-0.1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file mbolt-0.1.0.tar.gz.

File metadata

  • Download URL: mbolt-0.1.0.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mbolt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9558d278444f1b2dabef3727b95f4a5ce9281b33bb9cde180ed75c507672542d
MD5 d4579c1b2ead65c87303931f0e1f3a77
BLAKE2b-256 656ad33bd3166bbeb154d2278f06d69683152988515018b7a4843e311540a82d

See more details on using hashes here.

File details

Details for the file mbolt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mbolt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mbolt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f3466146e98ebf0793cd379912a0796d02a63b77cb3dacb8b5d754db6477be7
MD5 e179831328a3db398d6db867fdf1cc97
BLAKE2b-256 70df76aa073f3bf7ac853a8a87ab5142ba4eb48a5bfadff9e31fa162cfbd2e27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page