Releases: EffortlessMetrics/BitNet-rs
Releases · EffortlessMetrics/BitNet-rs
v0.1.2 - Test Coverage Expansion
See CHANGELOG.md for full details.
Highlights
- 50+ new property tests across all major crates using proptest
- 5 new fuzz targets covering safetensors, quantization, GGUF, and transformer config parsing
- BDD grid expanded to 18 scenario cells (was 13)
- 77 ignored tests (reduced from 91) — tests with resolved blockers unignored
- Server and CLI integration tests for health endpoints, CORS, security validation, template parsing
- Quantization numerical accuracy tests validating I2S, TL1, TL2, QK256 correctness
- E2E golden path tests for stop tokens, receipt schema, and max_tokens boundary
Requirements
- Rust 1.89.0+ (MSRV)
- cargo build --no-default-features --features cpu
v0.1.1 — Testing & Infrastructure Release
BitNet-rs v0.1.1
Overview
This release focuses on testing infrastructure, CI improvements, and property test coverage. All core inference functionality from v0.1.0 is preserved.
What's New
Testing
- 21 new proptest cases for
bitnet-gguf(GgufValue round-trips, TensorInfo invariants, GgufMetadataKv key preservation) - 7 new proptest cases for
bitnet-sys(CompileTimeLibCapabilities summary correctness) InferenceReceipt::to_json_string()convenience method + snapshot test for receipt JSON output- 10 new SRP cross-crate integration tests: logits→sampling pipeline, generation stop criteria, RoPE table correctness, device-probe determinism, engine-core session config wiring
- New fuzz target
gguf_metadata_valuesfor GGUF parser panic safety
CI / Infrastructure
fuzz/**added to ci-core.yml path triggers — fuzz target PRs now get required CI gate checksBITNET_SKIP_SLOW_TESTS=1added to CI environment — 30 model-gated tests now self-skip cleanly- Ignored tests reduced: 110 → 78 (-32 tests unblocked)
- GitHub repository description, topics, and probot settings updated
No Breaking Changes
All public APIs from v0.1.0 are preserved. Update your dependency:
bitnet = "0.1.1"Full Changelog
See CHANGELOG.md
v0.1.0-mvp: CPU Inference MVP with Strict Receipt Validation
BitNet.rs v0.1.0-mvp — CPU Inference MVP
This is the v0.1.0 Minimum Viable Product release, delivering production-ready CPU inference for BitNet neural networks with comprehensive quality gates.
🚀 What's New
Core CPU Functionality
- ✅ CPU inference with I2S/TL1/TL2 quantization (99%+ accuracy vs FP32)
- ✅ SIMD-optimized kernels (AVX2/AVX-512 on x86_64, NEON on ARM)
- ✅ Strict mode enforcement — no FP32 fallback in quantized layers
- ✅ Universal tokenizer with auto-discovery for HF/GGUF models
Quality & Validation
- ✅ Receipt verification system — proves real compute (no mock inference)
compute_path = "real"enforcement- Kernel hygiene validation (ID length ≤ 128, count ≤ 10K)
- CPU kernel prefixes:
i2s_,tl1_,tl2_
- ✅ Pinned CPU baseline —
docs/baselines/20251015-cpu.json- Deterministic with
BITNET_STRICT_MODE=1 BITNET_DETERMINISTIC=1 RAYON_NUM_THREADS=1 - Performance SLO: ≥3.5 tokens/sec on CPU
- Deterministic with
Developer Experience
- ✅ 10-line quickstart in README (build → run → answer)
- ✅ Run → Emit → Verify workflow
cargo run -p xtask -- benchmark --model model.gguf --tokens 128 # writes ci/inference.json cargo run -p xtask -- verify-receipt # validates receipt
- ✅ Comprehensive docs — feature flags, validation gates, troubleshooting
📦 Installation
Prerequisites
- Rust 1.90.0+ (MSRV: 1.90.0, 2024 edition)
- Feature flags required — always specify
--no-default-features --features cpu
Build from Source
git clone https://github.com/EffortlessMetrics/BitNet-rs.git
cd BitNet-rs
git checkout v0.1.0-mvp
# Build CLI (CPU only)
cargo build --release --no-default-features --features cpu -p bitnet-cli
# Verify installation
./target/release/bitnet --versionDownload Binaries
See Assets below for pre-built binaries (Linux x86_64, macOS ARM64, Windows x64).
🏃 Quick Start (10 lines)
# 1. Download a GGUF model
cargo run -p xtask -- download-model --id microsoft/bitnet-b1.58-2B-4T-gguf
# 2. Run inference (CPU)
cargo run -p bitnet-cli --no-default-features --features cpu -- \
infer models/model.gguf \
--prompt "What is 2+2?" \
--max-tokens 50
# 3. Verify honest compute (receipt validation)
cargo run -p xtask --no-default-features --features inference -- \
benchmark --model models/model.gguf --tokens 128 # writes ci/inference.json
cargo run -p xtask --no-default-features --features inference -- \
verify-receipt # validates receipt🧪 Validation & Testing
Run Tests
cargo test --workspace --no-default-features --features cpuVerify Receipt Against Baseline
BITNET_STRICT_MODE=1 BITNET_DETERMINISTIC=1 RAYON_NUM_THREADS=1 \
cargo run -p xtask --no-default-features --features inference -- \
verify-receipt --path docs/baselines/20251015-cpu.jsonQuality Checks
cargo fmt --all
cargo clippy --workspace --all-targets --no-default-features --features cpu -- -D warnings📊 Performance Baseline
Pinned Baseline: docs/baselines/20251015-cpu.json
| Metric | Value |
|---|---|
| Tokens/sec (CPU) | ≥3.5 (baseline SLO) |
| Quantization Accuracy | 99%+ vs FP32 |
| Compute Path | "real" (no mock) |
| Kernels Executed | 7 CPU quantized kernels |
🔧 Configuration
Required Feature Flags
# CPU inference (default features are EMPTY)
cargo build --no-default-features --features cpu
# GPU inference (CUDA)
cargo build --no-default-features --features gpuEnvironment Variables
| Variable | Purpose |
|---|---|
BITNET_STRICT_MODE=1 |
Enable strict validation (fail on FP32 fallback) |
BITNET_DETERMINISTIC=1 |
Deterministic inference (with RAYON_NUM_THREADS=1) |
RAYON_NUM_THREADS=1 |
Single-threaded for reproducibility |
📚 Documentation
- Quickstart:
docs/quickstart.md - Feature Flags:
docs/explanation/FEATURES.md - Validation Gates:
docs/reference/validation-gates.md - Build Commands:
docs/development/build-commands.md - Troubleshooting:
CLAUDE.md(search "Troubleshooting")
🛡️ Known Limits
- GPU support: Opt-in with
--features gpu(not default) - TL stress tests: Opt-in with
BITNET_ENABLE_GPU_TESTS=1(CI skips on CPU-only hosts) - KV cache: Pre-allocation optimization slated for v0.2.0
🔗 Links
- GitHub: https://github.com/EffortlessMetrics/BitNet-rs
- Issue Tracker: https://github.com/EffortlessMetrics/BitNet-rs/issues
- Baseline Receipt: docs/baselines/20251015-cpu.json
🙏 Acknowledgements
Built with Rust 🦀 and inspired by Microsoft's BitNet architecture.
Full Changelog: 1f7dbd0...v0.1.0-mvp