quant.cpp
quant.cpp copied to clipboard
LLM inference with 7x longer context. Pure C, zero dependencies. Lossless KV cache compression + single-header library.
## Description The CLI accepts aliases like `llama3.2:1b` and `smollm2`, but `Model.from_pretrained()` only accepts full canonical names like `"Llama-3.2-1B"`. ## Steps to Reproduce ```python from quantcpp import Model # This...
## Description The server returns an empty response (connection reset) when a prior assistant message in the `messages` array contains an exclamation mark (`!`). This is 100% reproducible and blocks...
## Background v0.8.1 shipped with two known limitations in the Python bindings: 1. **`kv_compress=0` default** (no KV compression). The bundled `quant.h` is an Apr-6 snapshot whose UNIFORM_4B path aborts on...
The CPU backend (`src/backend/cpu/`) has optimized paths for NEON and AVX2, but no SVE (Scalable Vector Extension) support. SVE is needed for AWS Graviton3/4 and other modern ARM servers. **What...
## Description Qwen3.5-4B loads and generates coherent output, but inference is extremely slow at **~0.7 tok/s** on Apple M3. The bottleneck is the FP32 dequantization of DeltaNet attention layers at...
## Description Sending the identical prompt twice to the same server with `temperature=0.0` produces different outputs. The second response often contains corrupted text (Cyrillic characters, garbled tokens), suggesting uninitialized memory...
## Description PR #65 added full Phi-3/Phi-3.5 support to `quant.h` (single-header), but the changes were **not propagated to the split source files** used by `libturboquant` and `quant-server`. As a result:...
## Description Only models with Multi-Head Attention (MHA), where `Q_heads == KV_heads`, produce coherent inference output. All models using Grouped-Query Attention (GQA) or Multi-Query Attention (MQA) generate garbage text despite...
## Description The `system` role in the messages array is accepted without error but has no effect on the model's behavior. ## Steps to Reproduce ```bash curl http://localhost:8080/v1/chat/completions \ -H...
## Description Loading `Phi-3.5-mini-instruct-Q8_0.gguf` (bartowski quantization) succeeds, but the GGUF parser detects **0 self_attn layers**, causing inference to produce random garbage tokens. ## Steps to Reproduce ```bash ./build-metal/quant-server Phi-3.5-mini-instruct-Q8_0.gguf -p...