pingala8-benchmarks / README.md
harshit-genrius's picture
Add discoverability tags
c57bf68 verified
|
Raw History Blame Contribute Delete
7.25 kB
metadata
license: cc-by-4.0
pretty_name: Pingala-8 Benchmarks
language:
  - en
tags:
  - quantization
  - llama.cpp
  - gguf
  - benchmark
  - llm
  - model-compression
  - 2-bit
  - qwen3
  - llama-3.1
  - local-llm
size_categories:
  - n<1K
configs:
  - config_name: results
    default: true
    data_files:
      - split: train
        path: results.csv
  - config_name: speed
    data_files:
      - split: train
        path: speed.csv
  - config_name: zero_shot
    data_files:
      - split: train
        path: zero_shot.csv

Pingala-8 Benchmarks

These are the measured results behind Pingala-8, our 2-bit weight format for llama.cpp, from Genrius AI. Each number comes from the paper and its logs. We publish the tables so anyone can check, sort and reuse them.

Headline, with scope: on Qwen3-4B, at the file size of llama.cpp's IQ2_XXS (about 1.24 GB), Pingala-8 reaches WikiText-2 perplexity 16.64. IQ2_XXS reaches 28.61, and the best IQ2_KT file we built at this size reaches 18.15 (lower is better). The 5-task zero-shot average is 50.83, against 41.86 for IQ2_XXS and 46.52 for that IQ2_KT file. The 8-bit original scores 56.3. No retraining is involved: Pingala-8 compresses the original weights.

WikiText-2 perplexity against file size, Qwen3-4B and Llama-3.1-8B

The Llama panel of the chart uses llama.cpp's strided mode, where windows after the first start without a BOS token.

Files

Config File What it holds
results (default) results.csv WikiText-2 perplexity, file bytes, bits per weight and zero-shot average for Qwen3-4B, Llama-3.1-8B and Qwen3-14B
speed speed.csv Speed relative to IQ2_XXS on one GPU, with 95% intervals
zero_shot zero_shot.csv Per-task zero-shot accuracy on Qwen3-4B
from datasets import load_dataset
results = load_dataset("Genrius-AI/pingala8-benchmarks", "results", split="train")
speed = load_dataset("Genrius-AI/pingala8-benchmarks", "speed", split="train")

Columns

results.csv

  • model: the base model.
  • format: the file format, with the runtime in brackets. "Pingala-8 (B4, ours)" is the shipped file, called B4 in the paper.
  • file_bytes: size of the GGUF file in bytes.
  • bpw_all: bits per weight over all tensors, calculated as file_bytes x 8 / the model's parameter count (4,022,468,096 for Qwen3-4B; 4,021,784,576 for Ternary Bonsai 4B). It includes the token embedding and the GGUF metadata. Left empty where we did not calculate it.
  • wikitext2_ppl: WikiText-2 test perplexity (lower is better).
  • ratio_to_fp16: perplexity divided by the fp16 perplexity of Qwen3-4B (12.4567). Qwen3-4B only.
  • zero_shot_avg: mean of the five zero-shot accuracies in zero_shot.csv, where measured.
  • note: the evaluation protocol and anything you need to read the row fairly.
  • source: the table in the paper that the number comes from.

speed.csv: tg128_ratio is batch-1 generation of 128 tokens and pp512_ratio is processing a 512-token prompt. Both are given as the mean same-round ratio to IQ2_XXS, with a 95% t-interval. batched_Nseq_ratio is decoding N sequences at once (llama-batched-bench, 128-token prompt, 128 tokens per sequence), as a ratio to IQ2_XXS.

Protocol

  • Perplexity: WikiText-2 test (raw, joined), llama-perplexity in strided mode, with windows of 4096 tokens (-c 2049 --ppl-stride 4095). Qwen3-4B and Qwen3-14B use 73 windows and Llama-3.1-8B uses 70. For Llama-3.1-8B we report two runs. The first uses strided mode, where windows after the first start without a BOS token. The second is a pre-registered rerun with a BOS at every window. The fp16 reference on Qwen3-4B is 12.4567.
  • Zero-shot: llama-perplexity task modes (--hellaswag, --winogrande, --multiple-choice), 0-shot, scored by the log-likelihood of each answer's continuation. The sets are HellaSwag validation (1000 items), the WinoGrande debiased file (1267), ARC-Easy and ARC-Challenge validation (570 and 299) and the full MMLU test (14,042). Q8_0 stands in for fp16. Typical standard errors for a 2-bit file: HellaSwag +-3.1, WinoGrande +-1.37, ARC-Easy +-2.06, ARC-Challenge +-2.79, MMLU +-0.40. These continuation scores sit far below 5-shot MMLU numbers, so do not compare them with leaderboards.
  • Speed: llama-bench -ngl 99 -fa 1 -ctk f16 -ctv f16, tg128 as -p 0 -n 128 and pp512 as -p 512 -n 0. The runs were one exclusive session on one RTX 5070 Ti Laptop GPU, 10 rounds with rotated order, -r 5, and no other GPU process. IQ2_XXS medians were 197.1 tokens/s (tg128) and 7561 tokens/s (pp512).
  • Rival files: we ran GSQ Q2_K and Ternary Bonsai 4B ourselves with the same perplexity command. Bonsai was run on a Q8_0 copy of its 16-bit release. Its listed size is calculated from tensor shapes for its Q2_0 file, which needs the authors' llama.cpp fork.

Honest limits

  • Qwen3-14B is a loss. IQ2_KT reaches 9.40 against our 9.57 on WikiText-2, and the two tie on C4. We wrote this test down before running it.
  • The Qwen3-4B result is post hoc. B4 is the last of a chain of builds, all evaluated on WikiText-2 during development, so treat its WikiText-2 number as tuned. The C4 text, the Llama-3.1-8B run and the Qwen3-14B run were held out or pre-registered.
  • Speed is mixed. Batch-1 generation runs at 1.096x the speed of IQ2_XXS. Prompt processing runs at 0.74x, and batched decoding of 2 to 8 sequences at 0.18x to 0.34x, with the shipped kernel. All speed numbers come from one laptop GPU.
  • Some rivals are better. Retrained models score better: Ternary Bonsai 4B reaches 11.59 at 1.07 GB, but it is a new trained model, not a compression of Qwen3-4B. Larger files also score better: GSQ Q2_K reaches 14.37 at 1.67 GB, 34% larger than ours. The claim we make is narrower. Among the formats we tested, Pingala-8 is the best way we found to compress the original Qwen3-4B to this size without retraining.
  • It needs our runtime. The files run only on our patched llama.cpp (CUDA). Stock llama.cpp, Ollama and LM Studio cannot load them yet.
  • Coverage is small. We measured three models (4B, 8B and 14B) and one GPU. Zero-shot and speed were measured on Qwen3-4B only.

Method in one line

Pingala-8 uses an 8-state trellis code (Ungerboeck) over groups of 4 weights, after a Hadamard rotation and QuIP-style LDLQ rounding. It builds on QTIP, QuIP# and ikawrakow's IQ2_KT.

Links

License and citation

The tables and chart in this dataset are released under CC-BY-4.0. The models have their own licenses, linked above.

@misc{goyal2026pingala8,
  title     = {Small-State Coset Trellis Coding at IQ2\_XXS Size: An Equal-Bytes Study in llama.cpp},
  author    = {Goyal, Harshit},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.23481757},
  note      = {Genrius AI}
}