SKILL

optimization-bitsandbytes

Quantizes LLMs to 8-bit or 4-bit for 50-75% memory reduction with minimal accuracy loss. Use when GPU memory is limited, need to fit larger models, or want faster inference. Supports INT8, NF4, FP4 formats, QLoRA training, and 8-bit optimizers. Works with HuggingFace Transformers.

Target: Learning & research. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • bitsandbytes - LLM Quantization
  • Quick start
  • Common workflows
  • Workflow 1: Load large model in limited GPU memory
  • Workflow 2: Fine-tune with QLoRA (4-bit training)
  • Workflow 3: 8-bit optimizer for memory-efficient training
  • When to use vs alternatives
  • Common issues

bitsandbytes reduces LLM memory by 50% (8-bit) or 75% (4-bit) with <1% accuracy loss. Installation: 8-bit quantization (50% memory reduction): 4-bit quantization (75% memory reduction): Copy this checklist: Step 1: Calculate memory requirements Estimate model memory: Step 2: Choose quantization level | GPU VRAM | Model Size | Recommended | |----------|------------|-------------| | 8 GB | 3B | 4-bit | | 12 GB | 7B | 4-bit | | 16 GB | 7B | 8-bit or 4-bit | | 24 GB | 13B | 8-bit or 70B 4-bit | | 40+ GB | 70B | 8-bit | Step 3: Configure quantization For 8-bit (better accuracy): For 4-bit (maximum memory savings): Step 4: Load and verify model QLoRA enables fine-tuning large models on consumer GPUs. Copy this checklist: Step 1: Install dependencies Step 2: Configure 4-bit base model Step 3: Add LoRA adapters Step 4: Train with standard Trainer Use 8-bit Adam/AdamW to reduce optimizer memory by 75%. Step 1: Replace standard optimizer Manual optimizer usage: Step 2: Configure training Compare memory: Step 3: Monitor memory savings Use bitsandbytes when: GPU memory limited (need to fit larger model) Training with QLoRA (fine-tune 70B on single GPU) Inference only (50-75% memory reduction)

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
davila7/claude-code-templates
Source file
cli-tool/components/skills/ai-research/optimization-bitsandbytes/SKILL.md
Fixed revision
21be197f100a12b8d0dd9a211cc244c8179f84d3
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:43.297Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.