unamedkr
unamedkr
Fixed in the latest commit: 1. **TQ_STATIC_ASSERT**: was a recursive no-op macro in C mode. Now uses C11 `_Static_assert(cond, msg)`. 2. **Stack buffer overflow**: `recon[256]` in attention debug code could...
Thanks for confirming! The `_Static_assert` fix is indeed critical — it now catches mismatched struct sizes at compile time (e.g., if block packing changes). We also added a dedicated Gemma...
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...
Q3_K weight dequantization and fused dot product are already implemented: - `dequant_q3_k()` — full Q3_K dequantization (src/engine/tq_gguf_quants.c:393) - `fused_dot_q3_k()` — fused dequant+dot for fast matmul (src/engine/tq_gguf_quants.c:1797) - Registered in matmul...
Investigated: `build_prompt()` in `tq_server.c` correctly formats system role messages into ChatML (`system\n{content}\n`). The system prompt IS included in the prompt sent to the model. The observed behavior is a model...
## Investigation update (2026-04-09) Added a small instrumentation tool to get empirical data on the dispatch path: `tq_metal_diag_get()` returns the number of `tq_metal_batch_flush()` syncs and total ops dispatched during a...
## Progress (2026-04-13) ### Fixed (committed to main) 1. ✅ **partial RoPE** — `rope.dimension_count/head_dim` → `partial_rotary_factor=0.25` 2. ✅ **DeltaNet guard** — fused QKV detection skipped for DeltaNet layers (`!layer->delta_a_log`) 3....
Fixed in e12fcbd. Qwen3.5-4B produces coherent output: 'The capital of France is **Paris**.' All 3 key issues resolved: 1) Early SSM probe for DeltaNet guard 2) Partial RoPE from GGUF...
## Root Cause Found: Numerical instability in libturboquant forward pass ### Evidence Debug output shows hidden state exploding at layer 7: ``` layer6 out[0:4]=-1.966,-0.093,0.423,1.302 min=-301 max=74 ← normal layer7 out[0:4]=5.503,-10.735,3.848,-6.422...
Fixed: replaced `pthread_mutex_lock` with `pthread_mutex_trylock` in `handle_chat_completions`. Concurrent requests now receive HTTP 429 (Too Many Requests) with a clear error message instead of silently corrupting output.