quant.cpp
quant.cpp copied to clipboard
Document the public C API
The main public header include/turboquant/tq_engine.h exposes ~52 public functions but has minimal documentation. New users and contributors need a reference to understand the API surface.
What to do:
- Create
docs/api.mdlisting each public function with its signature and a one-line description. - Group functions by category (init/free, model loading, inference, KV cache, quantization).
- Optionally add a "Quick Start" section showing the minimal code to load a model and run inference.
Files to touch: docs/api.md (new), reference include/turboquant/tq_engine.h and include/turboquant/tq_types.h.
API documentation created at docs/api.md (730 lines):
- Single-Header API (quant.h): 6 functions with complete usage examples
- Full Library API (libturboquant): model loading, inference, tokenizer, KV compression
- Build instructions: macOS, Linux, Windows (MSVC/MinGW), WASM, iOS/Android
- Configuration reference: all quant_config and tq_gen_config fields documented
Also added: quant.h synced with latest source (IQ3_XXS, Gemma 4 support).