TFQ

ashhart

TensorFold's native quantization format for running language models on Apple Silicon and NVIDIA GPUs, supporting 3, 4 and 5 bit weights, including mixed precision per tensor, to fit larger models into less memory.

CudaCreated

What is ashhart/TFQ?

TFQ3 is a quantisation format for large model weights, the name standing for TensorFold Quantization version 3. The README says it supports 3, 4 and 5 bit precision, including mixed precision per layer or per expert. Its headline claim is that a checkpoint quantised on a Mac runs byte for byte unchanged on an NVIDIA CUDA GPU, and a checkpoint quantised on an NVIDIA GPU runs unchanged on Apple Silicon.

The README describes the method. It applies a randomised Fast Walsh-Hadamard transform to each 128 by 128 weight tile to remove outlier channels, and it codes the weights with a fixed codebook, storing the results in aligned shards that both Metal and CUDA can read directly. It contrasts this with calibration-dependent methods such as GPTQ, AWQ and imatrix.

It suits engineers who run large models on both Apple Silicon and NVIDIA hardware and want one checkpoint for both, and researchers interested in weight quantisation without calibration data.