tqLLM
Copyright 2026 David Y. Tan (turbo-tan), https://tqllm.com
Original work by David Y. Tan, including the tqLLM engine, the TurboQuant (TQ) weight formats (TQ3_1S, TQ3_4S, TQ3,
TQ4, TQ_XS to TQ_L), TqCache and TQueue. The TurboQuant method itself (arXiv 2504.19874, KV-cache and vector
quantization) is Google Research's work; the TQ weight formats apply its transform-quantization ideas to model weights.
Redistributions must keep this notice (Apache License 2.0, section 4(d)).

Licensed under the Apache License, Version 2.0 (see LICENSE).

This product includes third-party code under its own licence:

* third_party/jinja - the Jinja chat-template engine from llama.cpp.
  MIT License, Copyright (c) 2023-2026 The ggml authors. Licence: third_party/jinja/LICENSE.

* src/formats/weight/*_grid.inc, src/formats/weight/ksigns_iq2xs.inc, src/formats/weight/kvalues_iq4nl.inc - the IQ quantisation grids, sign tables and
  IQ4_NL codebook from ggml (llama.cpp), used only to read GGUF files stored in those formats.
  MIT License, Copyright (c) 2023-2026 The ggml authors. Licence: licenses/ggml-MIT.txt.

* src/formats/weight/x3/{codec_mul1.cuh, dispatch.cu, gemv_sq.cuh, gemv_x3v.cuh, had128.cuh, ptx.cuh, reconstruct.cuh} -
  the X3 / X3.1 (EXL3 mul1 trellis) decode, GEMV and dequant kernels, ported from llama-paw-k25
  ggml/src/ggml-cuda/paw-x3.cu, itself a port of exllamav3 (exllamav3_ext/quant, commit 63b32f0).
  MIT License, Copyright (c) 2023-2026 The ggml authors (licenses/ggml-MIT.txt) and Copyright (c) 2025 Turboderp
  (licenses/exllamav3-MIT.txt).

* third_party/ggml_mmq - the CUDA MMQ (quantised matrix-multiply) kernels from llama.cpp ggml/src/ggml-cuda (commit fb4b273);
  the tile loaders of the codebook expert formats changed to read tqLLM's bank layout (third_party/ggml_mmq/NOTICE).
  MIT License, Copyright (c) 2023-2026 The ggml authors. Licence: licenses/ggml-MIT.txt.

* third_party/stb/stb_image.h - stb_image by Sean Barrett, public domain or MIT (licence text at the end of the file).

Credits - work this project builds on or learned from (ideas and formats, no code unless listed above):

* ggml / llama.cpp (Georgi Gerganov and contributors): the GGUF file format and the K-quant and IQ block layouts that
  TQLLM reads natively, and the reference engine every result is compared against.
* Qwen team, Alibaba: the Qwen3.5 / Qwen3.8 models and the Qwen3-VL vision encoder design.
* z-lab: DFlash2, the block-diffusion draft model used for speculative decoding.
* Inco AI: the Inkling-2-Mini DFlash2 drafter (incoai/Inkling-2-Mini-DFlash2, Apache-2.0), loaded as published by the
  Inkling Metal engine (-md FOLDER); tests/data/inkling2_dflash2_ref.bin holds outputs of it computed with
  tools/inkling2/dflash2_reference.py, an own reimplementation of the SGLang (Apache-2.0) DFlash2 math.
* spiritbuun (buun-llama-cpp): the trellis-coded quantisation idea behind the tcq KV-cache codecs (own codebooks and code).
* Google Research: TurboQuant (ICLR 2026), the rotation-plus-codebook lineage the TQ3 / TQ4 formats follow.
* TheTom (turboquant_plus): TurboQuant KV-cache ideas and the REFRACT distance-from-reference quality metric.
* Avarok (TorQuant): learned rotations for quantisation.
* Unsloth: the UD GGUF quantisations, which TQLLM runs natively and benchmarks against.
* Strata (MIT, Niko1221 and the Strata contributors): the idea of launching MMQ directly per expert group from the
  prefill path.
* Splash (Apache-2.0): the staged prefill GEMM tile on Apple GPUs (weights dequantized once per threadgroup into a
  double-buffered threadgroup stage, one matmul2d per simdgroup per step), reimplemented for the NAX 4-bit layout.

The full credits table, including methods and comparison baselines, is in README.md (Credits).
