maxta85/bonsai-llama ? reverse-engineered prompt
Reverse engineered prompt
Build me a research toolkit for experimenting with ultra low bit language models, especially 1 bit and ternary models.
I want a Python package that can pack and unpack these weights, do reference math with NumPy, and make it easy to test the tensor formats. I also want a small C++ inference library with a command line tool that can dequantize those weights and run a simple matrix multiply for sanity checks.
Please include a training workflow in PyTorch that can take an existing open weights model and distill it into the packed formats using quantization aware training, with a straight through estimator style setup. It should be able to export the result to GGUF so it can run in a llama.cpp style engine.
Add clear docs that explain the formats, the training flow, and how to build and run everything from a fresh clone. If useful, set up scripts for grabbing the inference backends and make the whole thing easy to test end to end.