I found out the other day that any compression tool can be contorted to do language modeling. Turns out gzip can generate text that somewhat *resembles* Shakespeare. Short write up linked below
3b1b talks about “intelligence equals compression” in his latest video and how any prediction model can be used for compression.
At the end, he mentions that the other direction is true as well, that any compressor can be used for prediction. Reminded me of an old blog post where I explored this exact thing, making gzip do next-token prediction
https://t.co/hSTE2s4qLZ
@vnjogani Actually have a blog post in the works improving tufazip. Training on compressed tokens has had historically had bad results iirc, because an optimally compressed message looks completely random, so the more compressed a message is, the harder it is to model it properly
Finally wrote a blog post about this! Normal LLM inference isn't deterministic across devices, but this can be fixed.
Floating-point addition isn't associative, (a + b) + c ≠ a + (b + c), and accumulation order changes with the hardware and kernel used, leading to different outputs on the same prompt.
Integer addition is associative, so doing every op in integers (including softmax and norms) gives bit-identical outputs across GPUs and CPUs.
Github repo and post listed in the comments
Turns out you can make LLM inference fully deterministic across devices, with no loss to quality or speed.
This weekend at the @spacexai hackathon I got Qwen3-0.6B to produce identical hashed logits from a 512-token generation across 2 GPUs and 3 CPUs: an A100, an H100, an Apple M5 Max, an AMD EPYC, and an Intel Xeon.
The main reason why inference isn't deterministic is because floating-point addition is not associative. (a + b) + c ≠ a + (b + c), since every add rounds. Accumulation order changes with the hardware used and kernel selected, so the same prompt can give you different outputs even at temperature 0.
Integers ARE associative. So why doesn't integer quantization already fix this? Because, while weights and activations get quantized, the non-linear ops (softmax, normalization, SiLU) dequantize back to float and requantize afterwards. Each of those steps hands you back to floating point rounding.
True integer-only inference does exist, but it's historically been motivated by edge hardware without FPUs, which doesn't make much sense for LLMs. One 2024 paper (I-LLM) did it on LLaMA from that angle and didn't get much attention. Nobody seems to have looked at it from the determinism side.
I wrote my own implementation, simplifying the approach from the paper, so that every operation between the input ids and the int32 logits is exact integer arithmetic. To test it I chain-hashed the logits at every step and ran that across the devices and configurations below. Every integer run gave the same hash: 64430dd985f8. Every fp16 run gave a different one, all diverging on the very first token.
WikiText2 perplexity came out to 20.72 vs 20.95 for fp16 (slightly better than the float baseline), and CUDA-graphed integer decode hits 106 tok/s at batch 1 on an A100, 3.6x the fp16 eager baseline.
Github repo is listed in the comments. Plan to do a writeup over this eventually!
@flowersengg Yeah it works for that. It is strictly a superset of that. Batch invariance allows for determinism for one device, while this allows it for one device and across them
@Andrei_Teaches Nope but I think most other model architectures should work as well. I think this would be a very interesting direction of work, but NVIDIA is focusing on floats with NVFP4
@ilblackdragon Interesting, I’ll check it out! It seems like most methods in this area are better at changing model behavior instead of increasing model capabilities, so I think it would have limited impact for this
In MIT CSAIL's recent "Sparks of Weight-Space Programming", GPT-6 Astra fixed Qwen's thinking loops by editing its weights directly.
I replaced Astra's trial-and-error tuning with linear programming, constructing a weight edit that matched its results while taking 99% less time (minutes vs 8 hours) and changing 8x fewer weights.
Blog post and repo are linked below