orchestra-research avatar

Quantizing Models Bitsandbytes

This wraps bitsandbytes for quantizing large language models directly in your Claude Code workflow. You get 8-bit quantization for 50% memory savings or 4-bit for 75% reduction, both with less than 1% accuracy loss according to the docs. Useful when you're trying to run models locally or fit bigger ones into limited VRAM. The skill includes the standard transformers integration setup, so you're basically getting the same quantization approach that's become common in the open source LLM space. Originally from ovachiever/droid-tings, now maintained under orchestra-research. It passed Gen Agent Trust Hub and Socket audits but has a Snyk warning, so check dependencies if that matters for your project.

skills.sh installs
1K
GitHub stars
14.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill quantizing-models-bitsandbytes --agent claude-code

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
AI & Agent Building, Data Science & ML
First seen
Jun 3, 2026

More from orchestra-research/ai-research-skills

All 95
1orchestra-research avataroutlinesorchestra-research/ai-research-skillsGuarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize in1Kskills.sh installs
2openai avatarcodex-cli-runtimeopenai/codex-plugin-ccInternal helper contract for calling the codex-companion runtime from Claude Code808skills.sh installs
3bitwize-music-studio avatarsuno-engineerbitwize-music-studio/claude-ai-music-skillsConstructs technical Suno V5/V5.5 style prompts, selects genres, and optimizes generation settings. Use when creating or refining Suno prompts for track generat491skills.sh installs
4getsentry avatarsentry-python-sdkgetsentry/sentry-agent-skillsFull Sentry SDK setup for Python. Use when asked to "add Sentry to Python", "install sentry-sdk", "setup Sentry in Python", or configure error monitoring, traci384skills.sh installs
5muratcankoylan avatarmemory-systemsmuratcankoylan/agent-skills-for-context-engineering>321skills.sh installs
6gocallum avatarexpert-drivengocallum/nextjs16-agent-skillsexpert driven243skills.sh installs