API Reference balanced_ternary_engine v#0.1.0-dev
Copy MarkdownModules
Main API for converting pretrained models to balanced ternary format.
Per-architecture mixed-precision policies for common model families.
Simple benchmarking helpers for conversion and runtime execution.
Command-line interface for the BalancedTernaryEngine tool.
Exports and imports ternary models to/from .tbin binary format.
A neural network layer with ternary weights.
Packs ternary {-1, 0, +1} tensors into compact binary format.
End-to-end conversion: safetensors model → .tbin balanced ternary model.
Quantization-Aware Training layer with ternary weights.
Converts full-precision weight tensors to balanced ternary {-1, 0, +1}.
A dense weight matrix kept at half precision inside a converted model.
Minimal runtime for executing a converted .tbin model.
Pure-Elixir reader/writer for the HuggingFace .safetensors format.
Analyzes per-layer sensitivity to ternary quantization.
Aggregate statistics over a list of model layers.
Reusable validation helpers for tensors, configs, and model files.
Mix Tasks
Analyze a .tbin model.
Convert a pretrained model to balanced ternary format.
Run inference on a .tbin model.