bitsandbytes
CLAUDE.md8.5k starsChanged 3 years agoMITView on GitHub
NEVER work on a fix or feature branch inside the main ~/git/bitsandbytes checkout. Always create a worktree first: This keeps the main checkout clean and allows parallel sessions. If you are already inside a worktree directory, you do not need to create another one. Before creating a worktree, check the worktree registry for existing ones — see the Git Worktrees section in ~/.claude/CLAUDE.md. Bitsandbytes-specific naming conventions: agents/worktreeguide.md. General worktree guide: ~/git/labtools/worktree_guide.md. Before working on any issue, check whether a PR…
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
NEVER work on a fix or feature branch inside the main ~/git/bitsandbytes checkout.
- Distinctive: line 17
Before working on any issue, check whether a PR already exists:
- Distinctive: line 23
If a PR exists, review and build on it instead of starting from scratch.
- Distinctive: line 27
Before pushing a PR branch, you MUST run the full pre-commit suite.
- Distinctive: line 37
Do NOT run the full test suite — it takes 10+ minutes.
- Distinctive: line 55
When tasked with reviewing a pull request, you MUST read these guides before starting the review:
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MANDATORY: Use git worktrees for all branch work
NEVER work on a fix or feature branch inside the main ~/git/bitsandbytes checkout. Always create a worktree first:
cd ~/git/bitsandbytes
git worktree add ~/git/bnb-fix-<NUMBER> -b fix/issue-<NUMBER>
cd ~/git/bnb-fix-<NUMBER>This keeps the main checkout clean and allows parallel sessions. If you are already inside a worktree directory, you do not need to create another one.
Before creating a worktree, check the worktree registry for existing ones — see the Git Worktrees section in ~/.claude/CLAUDE.md. Bitsandbytes-specific naming conventions: agents/worktree_guide.md. General worktree guide: ~/git/lab_tools/worktree_guide.md.
MANDATORY: Check for existing PRs before starting work
Before working on any issue, check whether a PR already exists:
gh pr list --search "issue-number OR keyword" --state openIf a PR exists, review and build on it instead of starting from scratch. Do not create duplicate work.
MANDATORY: Run linting before every pull request
Before pushing a PR branch, you MUST run the full pre-commit suite. CI will reject PRs that fail any check:
pre-commit run --all-filesThis runs ruff, ruff format, typos, trailing-whitespace, clang-format, and all other CI lint hooks. Review and commit any changes it makes. Do NOT run only ruff check and ruff format — those are just 2 of 10 hooks. Full details: agents/linting_guide.md
Testing: only run relevant tests
Do NOT run the full test suite — it takes 10+ minutes. Instead, run only the tests that cover the code you changed:
pytest tests/test_relevant_file.py -v --tb=short -k "relevant_test_name"The full suite will be run separately. Best practices and known issues: agents/testing_guide.md
Agent Dispatch (the "Dispatcher" role)
To triage open GitHub issues, generate prompt files, and launch parallel worker agents, read agents/dispatch_guide.md. If told "you're the Dispatcher" or "please read the Dispatch Guide," that's what this refers to. The dispatch workflow uses the GitHub issue tools in agents/ — see agents/github_tools_guide.md for the bitsandbytes-specific reference.
Issue maintenance and triage
To identify and close stale, duplicate, or resolved issues: agents/issue_maintenance_guide.md. Common closeable patterns (old CUDA setup, Windows pre-support, third-party app issues, etc.) are cataloged in agents/issue_patterns.md.
Pull request review
When tasked with reviewing a pull request, you MUST read these guides before starting the review:
agents/pr_review_guide.md— The complete review workflow (classification, checklists, verdict format, and posting instructions). This is the primary guide; follow its steps sequentially.agents/architecture_guide.md— Codebase architecture and patternsagents/code_standards.md— Code quality expectationsagents/api_surface.md— Public API catalog (for detecting breaking changes)agents/downstream_integrations.md— How Transformers, PEFT, Accelerate, TGI, and vLLM depend on bitsandbytes (for assessing downstream impact)agents/security_guide.md— Trust model and security checklist (especially for external contributor PRs)
For CUDA kernel changes, also read agents/kbit_gemm_context.md. The PR review guide references all of these at the appropriate steps.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about bitsandbytes-foundation/bitsandbytes
- prefix-dev/pixi“Allow user to include *Dependency Metadata* in pypi-options”GitHub · Aug 19, 2025 · 7 reactions
- AUTOMATIC1111/stable-diffusion-webui“[Feature Request]: Add BitsAndBytes NF4 quantization”GitHub · Aug 13, 2024 · 6 reactions
- huggingface/diffusers“Enable MPS backend for bitsandbytes quantization”GitHub · Mar 28, 2026 · 3 reactions
- khmyznikov/PyEnv-WoA-State“[Tracker] WoA🐍Libs🦾”GitHub · May 20, 2025 · 3 reactions
- unslothai/notebooks“AMD notebooks: install ROCm-compatible bitsandbytes on all 4-bit notebooks to fix 4-bit NaN”GitHub · Jul 7, 2026 · 2 reactions
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub and Stack Overflow (50 times).
On GitHub · 47
- Aug 19, 2025Allow user to include *Dependency Metadata* in pypi-options — prefix-dev/pixi7 reactions · 8 comments
- Aug 13, 2024[Feature Request]: Add BitsAndBytes NF4 quantization — AUTOMATIC1111/stable-diffusion-webui6 reactions
- Mar 28, 2026Enable MPS backend for bitsandbytes quantization — huggingface/diffusers3 reactions · 6 comments
- May 20, 2025[Tracker] WoA🐍Libs🦾 — khmyznikov/PyEnv-WoA-State3 reactions · 89 comments
- Jul 7, 2026AMD notebooks: install ROCm-compatible bitsandbytes on all 4-bit notebooks to fix 4-bit NaN — unslothai/notebooks2 reactions · 2 comments
42 more on GitHub
- Aug 24, 2025python3Packages.bitsandbytes: 0.46.1 -> 0.47.0 — NixOS/nixpkgs2 reactions · 1 comment
- Jun 9, 20255070ti显卡对应的cu128环境,使用flux模型报错 AttributeError: function 'cdequantize_blockwise_bf16_nf4' not found — lllyasviel/stable-diffusion-webui-forge2 reactions · 1 comment
- Feb 13, 2025InvokeAI, Linux, AMD Radeon, Rocm, no GPU support — LykosAI/StabilityMatrix2 reactions · 2 comments
- Jul 15, 2024Properly handle Params4bit in set_module_tensor_to_device — huggingface/accelerate2 reactions · 1 comment
- Jun 20, 2024add bnb support for Ascend NPU — huggingface/transformers2 reactions · 15 comments
- Aug 10, 2026Bump the python-security-and-patches group across 1 directory with 74 updates — canfieldjuan/ATLAS1 reaction · 3 comments
- Aug 3, 2026Bump the python group across 1 directory with 10 updates — unslothai/unsloth1 reaction · 5 comments
- May 26, 2026CUDACachingAllocator.cpp:995 NVML internal assert fires instead of clean OOMError when cudaMalloc fails on Tegra (Jetson) — pytorch/pytorch1 reaction · 1 comment
- May 7, 2026Improve studio AMD on bitsandbytes — unslothai/unsloth1 reaction
- Apr 11, 2026chore(deps-dev): update bitsandbytes requirement from >=0.43 to >=0.49.2 — nvandessel/hippofloop1 reaction · 1 comment
- Apr 10, 2026Pin bitsandbytes to continuous-release_main on ROCm (4-bit decode fix) — unslothai/unsloth1 reaction · 1 comment
- Feb 17, 2026[ROCm] Enable bitsandbytes quantization support on ROCm — vllm-project/vllm1 reaction · 14 comments
- Dec 22, 2025Update bitsandbytes requirement from <0.49,>=0.47 to >=0.47,<0.50 — oumi-ai/oumi1 reaction · 1 comment
- Dec 18, 2025Enable 4-bit quantization on AMD Radeon GPUs — unslothai/unsloth1 reaction · 4 comments
- Nov 29, 2025Errors during install on fresh Arch install — th3cavalry/strix-halo-linux-setup1 reaction · 1 comment
- Jul 30, 2025FSDP2 + LoRA kernels — axolotl-ai-cloud/axolotl1 reaction · 10 comments
- Nov 25, 2024[CI] CUDA nightly regression test is failing due to bnb + `triton.ops` — pytorch/ao1 reaction
- Oct 24, 2026chore(deps): update bitsandbytes requirement from >=0.45 to >=0.50.2 — zubairz4far/qwen3-tool-calling-qlora0 reactions
- Oct 21, 2026[Wheel monitor] bitsandbytes - Windows Arm64 — CoreCollective-dev/windows-on-arm-wg0 reactions · 1 comment
- Oct 20, 2026build(deps): update bitsandbytes requirement from >=0.43.0 to >=0.50.2 — POWERFULMOVES/PMOVES-DoX0 reactions · 1 comment
- Oct 14, 2026chore(deps): update bitsandbytes requirement from >=0.50.0 to >=0.50.2 — alexberardi/jarvis-llm-proxy-api0 reactions
- Oct 7, 2026build(deps-dev): bump bitsandbytes from 0.48.1 to 0.50.2 — Mathwesm/foco-llm0 reactions
- Sep 21, 2026chore(deps): update bitsandbytes requirement from >=0.41.0 to >=0.50.2 — Mullassery/PyStreamAI0 reactions
- Sep 7, 2026build(deps-dev): update bitsandbytes requirement from <0.50,>=0.47 to >=0.47,<0.51 — oumi-ai/oumi0 reactions · 1 comment
- Sep 3, 2026build(deps): update bitsandbytes requirement from >=0.41.0 to >=0.50.2 — tskaret/vibe-code-cli0 reactions · 1 comment
- Aug 31, 2026build(deps): update bitsandbytes requirement from >=0.41.1 to >=0.50.2 in /cmd/trainers/torchtune — durant0819/kubeflow-trainer0 reactions · 1 comment
- Aug 31, 2026chore(deps): update bitsandbytes requirement from >=0.49.2 to >=0.50.2 in /cmd/trainers/torchtune — kingabdulsalamsas111-lgtm/kubeflow-trainer0 reactions · 1 comment
- Aug 31, 2026Bump bitsandbytes from 0.50.1 to 0.50.2 — VectorInstitute/sustainable-rai-evaluation0 reactions
- Aug 31, 2026deps(deps): Update bitsandbytes requirement from >=0.50.1 to >=0.50.2 in /services/chatbot — SkastVnT/AI-Assistant0 reactions · 2 comments
- Aug 25, 2026Update bitsandbytes requirement from >=0.50.0 to >=0.50.2 — phalberg/InstructScore_HyTe0 reactions
- Aug 24, 2026chore(deps): update bitsandbytes requirement from <1,>=0.44 to >=0.50.1,<1 in /fowoco-knowledge — fowoco/knowledge0 reactions
- Aug 20, 2026chore(deps): bump bitsandbytes from 0.50.0 to 0.50.1 — sotanengel/genrec-llm-amazon0 reactions
- Aug 19, 2026chore(deps): bump bitsandbytes from 0.50.0 to 0.50.1 — pypi-ahmad/fine-tuning-app0 reactions
- Aug 17, 2026Update bitsandbytes requirement from >=0.39.0 to >=0.50.1 — fcas/ColossalAI0 reactions
- Aug 16, 2026build(deps): bump bitsandbytes from 0.48.2 to 0.50.1 — nick-tgcs/heretic0 reactions
- Jul 19, 2026Remove bitsandbytes `_check_is_size` warning filter once the minimum required bitsandbytes is >= 0.50.0 — huggingface/trl0 reactions
- Jul 10, 2026Update bitsandbytes requirement from >=0.43.0 to >=0.49.2 — microsoft/SciForma0 reactions
- May 29, 2026chore(deps): bump bitsandbytes from 0.45.0 to 0.49.2 in /DeQA-Score — ByronWilliamsCPA/DeQA-Doc0 reactions · 7 comments
- Jan 7, 2026No sm88 but bitsandbytes has sm88 in CMakeList ... — yehchunhung/spark-infer-bench0 reactions
- Oct 26, 2025Compatibility issue between PYTHONUTF8 = "1" and latest bitsandbytes. — Akegarasu/lora-scripts0 reactions
- May 8, 2025Bitsandbytes error while run train.py — AnswerDotAI/fsdp_qlora0 reactions · 7 comments
- Sep 25, 2024[FeatureRequest]Add AdEMAMixScheduleFree — facebookresearch/schedule_free0 reactions · 4 comments
On Stack Overflow · 3
- Jan 12, 2025Using `bitsandbytes` 4-bit quantization requires the latest version of bitsandbytes: `pip install -U bitsandbytes`2 votes
- Mar 24, 2026CUDA SETUP ERROR: Missing libnvJitLink.so.131 vote · 2 answers
- Aug 1, 2024Why is CUDA not included in LD_LIBRARY_PATH for GPU runtimes in Google Colab?1 vote
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

