{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "foreverblue816-prismquant--fit-rotation-on-own-activations",
 "repo": "ForeverBlue816/PrismQuant",
 "repo_url": "https://github.com/ForeverBlue816/PrismQuant",
 "repo_slug": "foreverblue816-prismquant",
 "title": "Fit a Prism Quant rotation on your own activations",
 "page_title": "How to fit a Prism Quant rotation on your own activations with Prism Quant",
 "summary": "Use the standalone rotation API on your calibration samples and check the round trip.",
 "who": "A quantization engineer testing whether Prism Quant rotations help a layer or model they already have activation data for.",
 "problem": "Grouped quantizers lose accuracy when activation energy is spread across groups, and the engineer needs to try an aligned rotation on real samples.",
 "outcome": "A fitted rotation, quantized outputs with scales and offsets, and a reconstruction from the transpose that can be compared to the original activations.",
 "steps": [
  "Clone the repo with `git clone --depth 1 https://github.com/ForeverBlue816/PrismQuant.git` and run `pip 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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "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)"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/foreverblue816-prismquant/fit-rotation-on-own-activations/",
 "md": "https://dedupedai.com/use-cases/foreverblue816-prismquant/fit-rotation-on-own-activations/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/foreverblue816-prismquant--fit-rotation-on-own-activations.json",
 "api_version": "v1"
}
