{
  "title": "How do I run a grouped GEMM directly on NF4 packed MoE expert weights, without dequantizing to bf16 first?",
  "summary": "gemm_4bit_grouped runs the routed MoE expert GEMM on bitsandbytes NF4 packed weights in one Triton launch, decoding nibbles in registers with fp32 accumulation and no bf16 expert tensor.",
  "summary_origin": "comment",
  "project": "grouped-nf4-gemm",
  "canonical_package": "grouped-nf4-gemm",
  "canonical_url": "https://cerinamroth.com/ml/solutions/nf4-grouped-gemm-without-bf16-materialization/",
  "install": {
    "primary": {
      "purpose": "kernel package",
      "command": "pip install grouped-nf4-gemm",
      "capabilities": [
        "grouped-nf4-gemm"
      ]
    },
    "alternatives": [
      {
        "purpose": "through the model consumer",
        "command": "pip install \"experts4bit-qlora[fast]\"",
        "capabilities": [
          "grouped-nf4-gemm"
        ]
      }
    ],
    "environment": {
      "os": [
        "Linux"
      ],
      "python": [
        ">=3.11 tested in CI (pyproject says >=3.9; 3.9/3.10 are not tested)"
      ],
      "accelerator": [
        "NVIDIA CUDA GPU, sm_80 or newer (sm_120 is the primary serving target)"
      ],
      "special_requirements": [
        "torch>=2.8 (pre-releases accepted)",
        "triton>=3.4 (Linux-only distribution)"
      ]
    }
  },
  "source": {
    "repository": "https://github.com/pjordanandrsn/grouped-nf4-gemm",
    "commit": "e2af4cfb91b2c29968989c5254bff55aa7da3347",
    "path": "docs/solutions/nf4-grouped-gemm-without-bf16-materialization.md",
    "sha256": "5aabf224aeb1713a3edf34c5acc540c17e7480746a60871efce0164de2f0a1d7",
    "generation_schema": "1.2"
  },
  "pinned_url": "https://github.com/pjordanandrsn/grouped-nf4-gemm/blob/e2af4cfb91b2c29968989c5254bff55aa7da3347/docs/solutions/nf4-grouped-gemm-without-bf16-materialization.md",
  "current_main_url": "https://github.com/pjordanandrsn/grouped-nf4-gemm/blob/main/docs/solutions/nf4-grouped-gemm-without-bf16-materialization.md",
  "current_main_label": "latest on main — unpinned; not the source of any fact rendered here",
  "freshness": {
    "source": {
      "repository": "pjordanandrsn/grouped-nf4-gemm",
      "commit": "e2af4cfb91b2c29968989c5254bff55aa7da3347",
      "version": "0.30.2"
    },
    "publication": {
      "latest_pypi_version": "0.30.2",
      "fresh": true,
      "state": "CURRENT",
      "checked_at": "2026-09-06T04:07:55Z"
    },
    "generated_at": "2026-09-06T04:07:55Z"
  },
  "markdown": "https://cerinamroth.com/ml/solutions/nf4-grouped-gemm-without-bf16-materialization/index.md",
  "sources": [
    {
      "repository": "https://github.com/pjordanandrsn/grouped-nf4-gemm",
      "commit": "e2af4cfb91b2c29968989c5254bff55aa7da3347",
      "commit_date": "2026-09-05",
      "package": "grouped-nf4-gemm",
      "package_version": "0.30.2",
      "published_version": "0.30.2",
      "publication": "published",
      "documents_used": [
        "docs/capabilities.json",
        "docs/solutions/nf4-grouped-gemm-without-bf16-materialization.md"
      ],
      "registers_used": [
        "capabilities"
      ],
      "synced_at": "2026-09-06T00:07:26Z",
      "pinned_tree": "https://github.com/pjordanandrsn/grouped-nf4-gemm/tree/e2af4cfb91b2c29968989c5254bff55aa7da3347",
      "current_main": "https://github.com/pjordanandrsn/grouped-nf4-gemm",
      "current_main_label": "latest on main — unpinned; not the source of any fact rendered here",
      "system_manifest": {
        "url": "https://cerinamroth.com/ml/system-manifest.json",
        "provenance_url": "https://cerinamroth.com/ml/system-manifest.provenance.json",
        "sha256": "196cb55a41e890842f258305f307b873d55639cc617cd4ae61c771a063204918",
        "pinned": "https://github.com/pjordanandrsn/grouped-nf4-gemm/blob/e2af4cfb91b2c29968989c5254bff55aa7da3347/docs/system-manifest.json"
      }
    },
    {
      "repository": "https://github.com/Cerin-Amroth/cerinamroth-site",
      "commit": null,
      "package_version": null,
      "documents_used": [
        "scripts/build_ml_site.py"
      ],
      "registers_used": [],
      "synced_at": null,
      "sections_owned": [
        "common-wrong-approaches"
      ],
      "kind": "site",
      "note": "site-authored prose; cites the registers above and copies no numbers"
    }
  ]
}
