Skip to content

Comments

[Docs] Create quickstart guide#1872

Merged
Abdennacer-Badaoui merged 7 commits intobitsandbytes-foundation:mainfrom
Abdennacer-Badaoui:quick-start-doc
Feb 20, 2026
Merged

[Docs] Create quickstart guide#1872
Abdennacer-Badaoui merged 7 commits intobitsandbytes-foundation:mainfrom
Abdennacer-Badaoui:quick-start-doc

Conversation

@Abdennacer-Badaoui
Copy link
Member

Add quickstart documentation with basic usage examples for:

  • 8-bit/4-bit quantization
  • QLoRA fine-tuning
  • 8-bit optimizers

Copy link
Collaborator

@TimDettmers TimDettmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: #1872 — [Docs] Create quickstart guide

Replaces the placeholder quickstart page with a comprehensive guide covering installation, 8-bit/4-bit inference, QLoRA fine-tuning, 8-bit optimizers, and custom quantized layers. A welcome contribution that fills a real gap -- the current quickstart page is just a "work in progress" stub.

No blocking issues. Two minor suggestions below.

Suggestions

  1. Missing import torch in Custom Quantized Layers example -- The last code example uses torch.bfloat16 but does not import torch. Add import torch at the top of that snippet.

  2. Missing import torch in QLoRA example -- The BitsAndBytesConfig snippet under "4-bit Quantization" also omits import torch while using torch.bfloat16.

  3. Consider nf4 over fp4 in examples -- The 4-bit quantization example does not set bnb_4bit_quant_type. The existing integrations docs and most real-world QLoRA usage default to nf4 for better accuracy. Consider adding bnb_4bit_quant_type="nf4" to match common practice and the QLoRA paper's recommendation.

  4. Commit messages are generic -- The two commits are titled "documentation" and "doc". Not blocking, but squash-merging with a descriptive message like "docs: add quickstart guide with usage examples" would improve the git history.

Cross-PR Conflicts

  • PR #1734 ([docs] Improve Quickstart with examples and fix 'What's next?' links) by @Dhiraj309: Direct file-level conflict on docs/source/quickstart.mdx. Both PRs replace the same placeholder content with different quickstart guides. Only one can merge cleanly; the other will need to rebase. A maintainer should decide which approach to adopt, or ask the authors to coordinate. PR #1734 has been open since August 2025 with no reviews.

Checklist

  • Security: Clear (docs-only change, no code execution)
  • Downstream impact: None
  • Tests: Not applicable (docs-only)
  • CI: Not triggered (fork PR -- a maintainer needs to approve the workflow run before merge)
  • API accuracy: Code examples reference correct class names and constructor parameters per the actual source (Linear8bitLt, Linear4bit, Adam8bit). Cross-checked against api_surface.md and source in bitsandbytes/nn/modules.py.

@github-actions
Copy link

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

matthewdouglas
matthewdouglas previously approved these changes Feb 20, 2026
Copy link
Member

@matthewdouglas matthewdouglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! Just a couple minor nits :)

@Abdennacer-Badaoui Abdennacer-Badaoui merged commit 67755b9 into bitsandbytes-foundation:main Feb 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants