Who it is forA quantization engineer testing whether Prism Quant rotations help a layer or model they already have activation data for.
The problemGrouped quantizers lose accuracy when activation energy is spread across groups, and the engineer needs to try an aligned rotation on real samples.
The outcomeA fitted rotation, quantized outputs with scales and offsets, and a reconstruction from the transpose that can be compared to the original activations.
What you need first
- Python 3.10 or newer
- A PyTorch installation that matches your CUDA version
- Internet access to clone the repo and download Hugging Face checkpoints
- Enough GPU or system memory for the chosen model size (see docs/models.md)
Steps
- Clone the repo with
git clone --depth 1 https://github.com/ForeverBlue816/PrismQuant.gitand runpip install -e .inside it. - Save your calibration activations as a tensor whose width matches your chosen group size and channel count.
- Call fit_rotation on the activations with rank and group_size set for your layer, following the example in the README.
- Pass the rotated tensor through dynamic_asym_int4, then reconstruct with the rotation transpose.
- Compare the reconstructed tensor with the original activations and record the error for your layer.
Prompt for your agent
In the PrismQuant repo, write a script that loads <calibration_file> as a torch tensor, calls fit_rotation with rank=2 and group_size=128, quantizes with dynamic_asym_int4, and reconstructs with rotation.transpose. Output the reconstruction error and verify that the tensor shape is unchanged.
Caveat. The README example uses random placeholder data, so the fitted rotation only means something after you replace it with real calibration activations from your model.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ForeverBlue816/PrismQuant and "Fit a Prism Quant rotation on your own activations"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer