quant.cpp icon indicating copy to clipboard operation
quant.cpp copied to clipboard

Document the public C API

Open unamedkr opened this issue 7 months ago • 1 comments

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.md listing 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.

unamedkr avatar Apr 03 '26 14:04 unamedkr

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).

unamedkr avatar Apr 05 '26 06:04 unamedkr