Skip to content

Commit 82c745b

Browse files
authored
docs: clarify unsloth and lora (#267)
<!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> <!-- SPDX-License-Identifier: Apache-2.0 --> <!-- Thank you for contributing to Safe Synthesizer! --> # Summary Clarified training backend documentation to make it explicit that both Unsloth and HuggingFace backends perform LoRA fine-tuning (previously the text implied LoRA was HuggingFace-only) ## Pre-Review Checklist <!-- These checks should be completed before a PR is reviewed, --> <!-- but you can submit a draft early to indicate that the issue is being worked on. --> Ensure that the following pass: - [x] `make format && make check` or via prek validation. - [ ] `make test` passes locally - [ ] `make test-e2e` passes locally - [ ] `make test-ci-container` passes locally (recommended) - [ ] GPU CI status check passes -- comment `/sync` on this PR to trigger a run (auto-triggers on ready-for-review) ## Pre-Merge Checklist <!-- These checks need to be completed before a PR is merged, --> <!-- but as PRs often change significantly during review, --> <!-- it's OK for them to be incomplete when review is first requested. --> - [ ] New or updated tests for any fix or new behavior - [ ] Updated documentation for new features and behaviors, including docstrings for API docs. ## Other Notes <!-- Please add the issue number that should be closed when this PR is merged. --> - Closes #<issue> --------- Signed-off-by: Sean Yang <seayang@nvidia.com>
1 parent b6d872e commit 82c745b

4 files changed

Lines changed: 14 additions & 22 deletions

File tree

docs/product-overview/data_synthesis.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ NeMo Safe Synthesizer adapts language models to understand and generate tabular
2626
- Generates new records that maintain statistical properties with no one-to-one mapping to original records
2727
- Supports various model sizes and architectures
2828

29-
Two backends are available:
30-
31-
| Backend | Description | When to use |
32-
|---------|-------------|-------------|
33-
| Unsloth | Optimized kernels for faster fine-tuning | Default -- use unless you need DP or a custom quantization setup |
34-
| HuggingFace | Standard PEFT training with 4-bit/8-bit quantization and optional differential privacy via [Opacus](https://opacus.ai/) | Required for differential privacy; also the fallback when Unsloth is unavailable |
29+
Two backends are available: Unsloth (default, faster) and HuggingFace
30+
(required for differential privacy). Both perform LoRA fine-tuning; see
31+
[Running -- Training](../user-guide/running.md#training) for a comparison.
3532

3633
Three models have been extensively tested:
3734

docs/product-overview/pipeline.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ Records are converted to a JSON format and tokenized for model training. The ass
4646

4747
### 4. Training
4848

49-
The training stage fine-tunes a base LLM using LoRA (Low-Rank Adaptation). Two backends are available:
50-
51-
| Backend | Description |
52-
|---------|-------------|
53-
| **HuggingFace** | Standard training with quantization (4-bit/8-bit), LoRA via PEFT, and optional differential privacy via [Opacus](https://opacus.ai/) |
54-
| **Unsloth** | Optimized training for faster fine-tuning |
49+
The training stage fine-tunes a base LLM using LoRA (Low-Rank Adaptation). Two
50+
backends are available -- Unsloth (default, faster) and HuggingFace (required
51+
for differential privacy). Both perform LoRA fine-tuning; see
52+
[Running -- Training](../user-guide/running.md#training) for details.
5553

5654
Three models have been extensively tested:
5755

docs/user-guide/getting-started.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,9 @@ entity types, LLM classification setup, and SDK customization.
177177
### 3. Training
178178

179179
Fine-tunes a base LLM using LoRA (Low-Rank Adaptation). Two backends are
180-
available:
181-
182-
| Backend | Description |
183-
|---------|-------------|
184-
| Unsloth | Optimized training for faster fine-tuning (auto-selected by default) |
185-
| HuggingFace | Standard training with quantization (4-bit/8-bit), LoRA via PEFT, and optional differential privacy via [Opacus](https://opacus.ai/) |
186-
187-
If you enable differential privacy, the pipeline automatically switches to use the HuggingFace backend.
180+
available: Unsloth (default, faster) and HuggingFace (required for
181+
differential privacy). Both perform LoRA fine-tuning; see
182+
[Running -- Training](running.md#training) for a comparison.
188183

189184
The default model is `HuggingFaceTB/SmolLM3-3B`. Safe Synthesizer has tested support for `HuggingFaceTB/SmolLM3-3B`, `TinyLlama/TinyLlama-1.1B-Chat-v1.0`, and `mistralai/Mistral-7B-Instruct-v0.3` (see [Configuration -- Training](configuration.md#training) for details on how to change the backend or model).
190185

docs/user-guide/running.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,10 @@ Two backends are available:
472472

473473
| Backend | Description | When to use |
474474
|---------|-------------|-------------|
475-
| Unsloth | Optimized kernels for faster fine-tuning | Default -- use unless you need DP or a custom quantization setup |
476-
| HuggingFace | Standard PEFT training with 4-bit/8-bit quantization and optional differential privacy via [Opacus](https://opacus.ai/) | Required for differential privacy; also the fallback when Unsloth is unavailable |
475+
| Unsloth | LoRA fine-tuning with optimized kernels for faster training and lower VRAM usage. Uses Unsloth's `FastLanguageModel` for model loading and PEFT wrapping | Default -- use unless you need DP or a custom quantization setup |
476+
| HuggingFace | LoRA fine-tuning via PEFT with 4-bit/8-bit quantization support and optional differential privacy (DP-SGD) via [Opacus](https://opacus.ai/) | Required for differential privacy; also the fallback when Unsloth is unavailable |
477+
478+
If you enable differential privacy, the pipeline automatically switches to the HuggingFace backend.
477479

478480
Three models have been extensively tested:
479481

0 commit comments

Comments
 (0)