Quantizing Models Bitsandbytes
Memory-saving LLM quantization to 8-bit or 4-bit with bitsandbytes for constrained GPUs and QLoRA training.
- CCM score
- 61 of 100
- skills.sh installs
- 1.2K
- GitHub stars
- 14.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers 8-bit (INT8) and 4-bit (NF4, FP4) loading of HuggingFace Transformers models via
BitsAndBytesConfig, with memory-sizing guidance by GPU VRAM - Includes QLoRA fine-tuning with LoRA adapters, plus 8-bit optimizers such as
paged_adamw_8bitandAdamW8bitfor training - Guides memory estimation from parameter count and checks allocated GPU memory before and after loading or optimizer steps
- Designed for inference or training on limited GPU memory, and compared against GPTQ, AWQ, GGUF, and FP8 for other needs
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill quantizing-models-bitsandbytes -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
bitsandbytes - LLM Quantization
Quick start
bitsandbytes reduces LLM memory by 50% (8-bit) or 75% (4-bit) with <1% accuracy loss.
Installation:
pip install bitsandbytes transformers accelerate
8-bit quantization (50% memory reduction):
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
config = BitsAndBytesConfig(load_in_8bit=True)
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-2-7b-hf",
quantization_config=config,
device_map="auto"
)
# Memory: 14GB → 7GB
4-bit quantization (75% memory reduction):
config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16
)
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-2-7b-hf",
quantization_config=config,
device_map="auto"
)
# Memory: 14GB → 3.5GB
Common workflows
Workflow 1: Load large model in limited GPU memory
Copy this checklist:
Quantization Loading:
- [ ] Step 1: Calculate memory requirements
- [ ] Step 2: Choose quantization level (4-bit or 8-bit)
- [ ] Step 3: Configure quantization
- [ ] Step 4: Load and verify model
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- Data Science & Analytics, AI Agents & LLM Apps
- First seen
- Jun 3, 2026
Questions
What does the quantizing-models-bitsandbytes skill do?
The quantizing-models-bitsandbytes skill quantizes LLMs to 8-bit or 4-bit, cutting memory use by 50-75% with minimal accuracy loss. It supports INT8, NF4 and FP4 formats, QLoRA training and 8-bit optimizers, and works with HuggingFace Transformers.
When should I use quantizing-models-bitsandbytes instead of other quantization tools?
Use quantizing-models-bitsandbytes when GPU memory is limited, you need to fit a larger model, or you want faster inference with HuggingFace Transformers. For production serving, the skill points to GPTQ or AWQ as faster alternatives, and to GGUF for CPU inference.
How do I install the quantizing-models-bitsandbytes skill?
Run npx -y skills add orchestra-research/ai-research-skills --skill quantizing-models-bitsandbytes -y in your project. Once installed, the agent can quantize models, set up QLoRA fine-tuning and use 8-bit optimizers with bitsandbytes.
Which category does quantizing-models-bitsandbytes belong to?
The quantizing-models-bitsandbytes skill is listed under Data Science & Analytics on Claude Marketplaces. It covers LLM quantization for loading large models in limited GPU memory.
More from orchestra-research/ai-research-skills
All 92- Qdrant Vector Search1.2K
- Pytorch Fsdp21.2K
- Transformer Lens Interpretability1.2K
- Verl Rl Training1.2K
- Clip1.2K
- Pytorch Lightning1.2K
- Axolotl1.2K
- Sentence Transformers1.2K
- Awq Quantization1.2K
- Nanogpt1.2K
- Langchain1.2K
- Long Context1.2K
- Huggingface Tokenizers1.2K
- Moe Training1.2K
- Ml Training Recipes1.2K
- Model Merging1.2K
- Chroma1.2K
- Instructor1.2K
- Speculative Decoding1.2K
- Hqq Quantization1.2K
- Sglang1.2K
- Llama Factory1.2K
- Nemo Curator1.2K
- Model Pruning1.2K
Similar to Quantizing Models Bitsandbytes
More Data Science & Analyticshqq-quantizationSkillorchestra-research/ai-research-skills1.2K installsCalibration-free weight quantization for LLMs at 8/4/3/2/1-bit, with HuggingFace and vLLM integration.
gptqSkillorchestra-research/ai-research-skills1.2K installsPost-training 4-bit quantization for large LLMs that cuts memory roughly fourfold with small accuracy loss.
llm-finetuningPluginwshobson/agents42.9K starsEval-gated LLM fine-tuning lifecycle (LoRA/QLoRA, DPO, GRPO/RLVR, vision SFT, quantized export). Use when fine-tuning an open-weights model end-to-end: building
turboquant-pytorchSkillreason-machines/trending-skills772 installsTwo-stage PyTorch KV cache compressor that preserves attention inner products at 2 to 4 bits per coordinate.
transformers-huggingfaceSkillmindrally/skills813 installsCoding guidance for Hugging Face Transformers, Datasets, and Tokenizers across NLP, vision, and multimodal models.
huggingface-bestSkillhuggingface/skills2.1K installsFinds top models for a task from HF leaderboards, filtered by the device's memory budget.