EchoLabs33/tinyllama-1.1b-hxq
015
TinyLlama-1.1B-HXQ
3.99x smaller. +0.78% perplexity. The fidelity reference. TinyLlama-1.1B compressed from 4.4 GB (FP32) to 1.03 GB with the tightest PPL delta in the lineup. No calibration data. No architecture-specific tuning. Justpip installandfrom_pretrained().
Install and Run
pip install "helix-substrate[hf]"import helix_substrate # registers the HXQ quantizer with HuggingFace
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("EchoLabs33/tinyllama-1.1b-helix")
tokenizer = AutoTokenizer.from_pretrained("EchoLabs33/tinyllama-1.1b-helix")
inputs = tokenizer("The meaning of life is", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))That's it. import helix_substrate registers the quantizer. from_pretrained() handles the rest automatically.
Benchmark
Eval: WikiText-2 test split, 2048 tokens, stride 512.
Good to Know
- GPU and CPU supported — runs on any CUDA GPU or CPU via standard PyTorch. Fused kernels for additional speedup are in progress.
- Fine-tunable via LoRA — compressed weights remain frozen, but LoRA adapters attach to each
HelixLinearlayer viaHelixLinearSTE. Seehelix-substratefor training infrastructure. - Requires `helix-substrate` — the quantizer is not built into transformers. You need
pip install "helix-substrate[hf]".
What is HelixCode?
HelixCode is a universal weight compression codec based on vector quantization:
- Each weight matrix is replaced by a 256-entry codebook (float32) + uint8 index matrix + optional sidecar corrections for outlier values
- The compressed form is the executable —
HelixLinearperformscodebook[indices] @ xdirectly, no decompression step - Works on any
nn.Linearregardless of architecture (Transformer, Mamba, MLP, CNN) - No calibration data required — unlike GPTQ/AWQ, codebooks are fit from the weights alone
How It Works
import helix_substrateregisters thehxqquantizer with HuggingFacefrom_pretrained()readsquantization_config.quant_method = "hxq"fromconfig.json- The quantizer replaces 154
nn.Linearmodules withHelixLinearshells before weight loading - Safetensors populates the codebook, indices, and sidecar buffers directly
- The model runs in compressed form — no decompression needed
Why TinyLlama?
This is the fidelity benchmark — at +0.78% PPL, it demonstrates that HelixCode compression introduces negligible degradation on a well-studied reference model. TinyLlama's weights are well-conditioned (low kurtosis), making it the ideal validation target.
Compression Receipt
Compressed tensors: 156
Exact tensors (npy): 45 (norms, embeddings)
From original model: 44
Total keys: 753
Output size: 1,053 MB
Weight ratio: 3.99x
PPL delta: +0.78% (6.220 vs 6.172 dense)
Eval: WikiText-2 test, 2048 tokens, stride=512Companion Models
Same codec, same pip install, multiple architectures:
Citation
@software{helix_substrate_2026,
title={Helix Substrate: Universal Weight Compression via HelixCode},
author={EchoLabs},
year={2026},
url={https://github.com/echo313unfolding/helix-substrate}
}License
Apache 2.0 (inherited from TinyLlama/TinyLlama-1.1B-Chat-v1.0).
