Files
leleka/crates/offline-tools/src/lib.rs
T
Pavlo RatushnyiandClaude Sonnet 5.5 3485221865 feat(offline-tools): port embd_bf16_pack, ple_fp8_pack, draft_vocab, make_profile, mtp_rt
New crate leleka-offline-tools wired as 'strata-next tools ...'. Every output is byte-identical to the unmodified
Python tool (scripts/offline/diff_tools.py: packs incl. refusal cases, 14 draft-vocab subsets x out/stats, make_profile
at 512/256/8 experts with ranked bases and traces, mtp_rt at the real H/FF geometry). Committed tiny goldens +
integration tests; mtp_rt's multi-MB input is regenerated from a shared splitmix64 rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 15:40:02 +02:00

26 lines
1.4 KiB
Rust

//! Offline tooling ported from `engine/strata/tools/*.py`, byte for byte, with no Python at run time.
//!
//! | Rust module | Python oracle | what it writes |
//! |--------------------|------------------------------|-------------------------------------------------------|
//! | `embd_bf16_pack` | `tools/embd_bf16_pack.py` | one-tensor BF16 token-embedding GGUF |
//! | `ple_fp8_pack` | `tools/ple_fp8_pack.py` | one-tensor FP8 PLE table GGUF with `strata.ple.*` KVs |
//! | `draft_vocab` | `tools/draft_vocab.py` | int32 token-id subset for the MTP draft head |
//! | `make_profile` | `tools/make_profile.py` | `STRP` v1 expert-cache profile |
//! | `mtp_rt` | `tools/mtp_rt.py` | MTP `experts.bin`, `dense.bin`, `dense.txt` |
//!
//! Differential harness: `scripts/offline/diff_tools.py` runs each oracle and the matching `strata-next tools`
//! subcommand on synthetic inputs and compares every output byte. Offline conversion only; production serving
//! never links this crate's CLI paths into a request path.
pub mod cli;
pub mod draft_vocab;
pub mod gguf_write;
pub mod half;
pub mod make_profile;
pub mod mtp_rt;
pub mod packs;
pub mod safetensors;
pub type Error = Box<dyn std::error::Error>;
pub type Result<T> = std::result::Result<T, Error>;