Commit graph

205 commits

Author SHA1 Message Date
Michael Han
b21b4e6252 Refresh of Unsloth README.md with https://unsloth.ai/docs 2025-12-30 15:14:27 -08:00
Michael Han
b314dca22d Update README for new unsloth.ai/docs.md 2025-12-27 00:49:19 -08:00
Michael Han
7201ba3919 Update README.md 2025-12-13 16:44:44 -08:00
Michael Han
2f51d6b457 Padding free packing update 2025-12-10 21:12:13 -08:00
Michael Han
2412f78bd2 Adding new padding free packing support 2025-12-10 21:10:19 -08:00
Michael Han
907264d077 Update README.md 2025-12-04 08:21:20 -08:00
Daniel Han
6db8cee887 Update README.md 2025-12-02 04:08:54 -08:00
Daniel Han
4f30c9104f Update README.md 2025-12-02 03:52:50 -08:00
gitpullpull
d8ea261924 Fix broken link for Advanced pip install instructions (#3652) 2025-11-29 15:33:48 -08:00
Michael Han
f730ad0b3e Update README.md 2025-11-29 08:01:00 -08:00
Michael Han
2769e27566 Update README.md 2025-11-27 20:52:27 -08:00
Michael Han
74a9fc808c Update README.md 2025-11-27 20:49:47 -08:00
Daniel Han
38aa148aba Float8 GRPO, RL (#3640)
* Enable FP8 + RL training for bf16 models (#3440)

* Enable FP8 + RL training for bf16 models

**Summary:** Enable FP8 + RL training using TorchAO for 1.33x faster training and 42% less model memory usage:
- We quantize the frozen LoRA weights into fp8 and keep the LoRA adapters in bf16
- We leverage TorchAO's `Float8Tensor`, which calls into fbgemm's fp8 x fp8 rowwise matmul kernel
- For now, we need to do an offline quantization first, because vllm doesn't support on-the-fly quantization for torchao yet  (this is in progress: https://github.com/vllm-project/vllm/pull/26327)

**Example usage:**
```
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "unsloth/Qwen3-8B-Base",
    max_seq_length = 2048,
    load_in_4bit = False,
    fast_inference = True,
    max_lora_rank = 32,
    load_in_fp8 = True,  # set this to True
)

\# the rest is the same as before
model = FastLanguageModel.get_peft_model(...)
```

**Initial results:**
```
\# fp8
{'train_runtime': 1725.4337, 'train_samples_per_second': 0.232, 'train_steps_per_second': 0.058, 'train_loss': 0.00015715716748673002, 'epoch': 0.01}

\# bf16
{'train_runtime': 2297.8145, 'train_samples_per_second': 0.174, 'train_steps_per_second': 0.044, 'train_loss': 0.00016081033063528594, 'epoch': 0.01}
```

<img width="1199" height="448" alt="Screenshot 2025-11-11 at 4 10 50 PM" src="https://github.com/user-attachments/assets/b6304afd-89e9-42b1-8064-775807e17b23" />

Test script: https://gist.github.com/andrewor14/5b85119fae46845d07b608d420907423

**Requires:**
- https://github.com/pytorch/ao/pull/3158 (torchao nightly or 0.15.0+)
- https://github.com/unslothai/unsloth-zoo/pull/351

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update utils.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* _get_inference_mode_context_manager

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update utils.py

* Update utils.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>

* Update __init__.py

* Fix/save torchao model loading logic (#3621)

* make loading gpt-oss-BF16 faster. Linked to unsloth-zoo PR #314

* fix model loading and clean merged model directory

* revert default quant

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert mapper.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update loader_utils.py

* Update loader_utils.py

* Add 128x128 PerBlock FP8 + RL (#3629)

* Add 128x128 PerBlock FP8 + RL

**Summary:** Following https://github.com/unslothai/unsloth/pull/3440,
this PR extends torchao FP8 + RL support to also handle 128x128
PerBlock granularity (in addition to PerRow).

**Example usage:**

```
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "unsloth/Qwen3-8B-Base",
    max_seq_length = 2048,
    load_in_4bit = False,
    fast_inference = True,
    max_lora_rank = 32,
    load_in_fp8 = "block",  # or "row" or True
)
```

**Initial results:** TBD

**Note:**
- Requires https://github.com/pytorch/ao/pull/3370

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Version

* Update vision.py

* Update rl.py

* Add torch 2.9.1

* Fix auto installer

* Update fp8.py

* Float8

* Update fp8.py

* Update mapper.py

* Update mapper.py

* Update loader_utils.py

* Update loader.py

* Update fp8.py

* Versioning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: andrewor14 <andrewor14@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Roland Tannous <115670425+rolandtannous@users.noreply.github.com>
2025-11-25 07:23:26 -08:00
mk0walsk
0cf5762060 Fix broken links and typo in README (#3611)
* README Link Fixes

* Update README.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-18 20:04:14 -08:00
Michael Han
cc8c31fb38 Update README.md 2025-11-04 22:00:06 -08:00
Michael Han
fef3ad1218 Update README.md 2025-10-25 19:26:05 -07:00
Michael Han
711ab35794 Update README.md
Qwen3-VL + DGX
2025-10-14 20:23:32 -07:00
Michael Han
db3fa4776f Update README.md 2025-10-12 05:32:42 -07:00
Michael Han
de03e517d8 Update README.md 2025-10-04 16:12:02 -07:00
Michael Han
8d293344e8 Update README.md 2025-10-03 04:18:21 -07:00
Michael Han
eaf320974e Update README.md 2025-10-03 04:01:17 -07:00
Michael Han
59a0d2c035 Adding Docker support 2025-10-01 17:04:46 -07:00
Michael Han
68d8023a4e Update README.md 2025-09-26 17:31:46 -07:00
laz-001
d936f80ee4 correct python support statement (#3374) 2025-09-26 04:52:23 -07:00
Michael Han
a4197252cc Update README.md
Fresh upate
2025-09-26 02:50:02 -07:00
Michael Han
6f84554408 Update README.md 2025-09-16 10:07:02 -07:00
Daniel Han
2b652b2595 Update README.md 2025-09-15 01:46:07 -07:00
Daniel Han
248c2019fe Update README.md 2025-09-15 01:43:11 -07:00
Daniel Han
d0ecd6d3cb Update README.md 2025-09-15 01:42:59 -07:00
Daniel Han
bc6e493250 Update README.md 2025-09-15 01:40:28 -07:00
Daniel Han
7a1c5d2753 Update README.md 2025-09-15 01:40:06 -07:00
Daniel Han
767b191ae4 Update README.md 2025-09-15 01:39:39 -07:00
Daniel Han
7e4788b646 Blackwell support 2025-09-15 01:39:03 -07:00
Michael Han
5e3d1ae29e Update README.md 2025-09-13 21:45:22 -07:00
Michael Han
4a93842de0 Update README.md
Adding new install instructions
2025-09-13 21:30:52 -07:00
Michael Han
f77676849f Update README.md 2025-08-09 15:53:29 -07:00
Michael Han
c2b49c7eaa Update README.md 2025-08-08 12:14:38 -07:00
Quentin Gallouédec
7b4ea96c08 Update README.md (#2991)
* Update README.md

* Update README.md
2025-07-18 15:43:59 -07:00
Daniel Han
5ca7403870 Fixes 2025-07-11 00:01:37 -07:00
Michael Han
000252c947 Update README.md
Updating icon sizes
2025-07-04 15:50:31 -07:00
Michael Han
3eb1fc0af4 Update README.md
Editing icon sizes
2025-07-04 15:37:44 -07:00
Michael Han
f99e6f1366 Update README.md 2025-07-01 09:28:59 -07:00
Daniel Han
b7b67439ac Move AMD to AMD branch 2025-07-01 01:02:51 -07:00
billishyahao
a9635c964e [Feature] enable unsloth on amd gpu (#2520)
* [Feature] enable unsloth on amd gpu

* fix the comment

---------

Co-authored-by: Daniel Han <danielhanchen@gmail.com>
2025-06-30 16:52:05 -07:00
Michael Han
a5233a7937 Update README.md
Updating links
2025-06-25 01:32:24 -07:00
Michael Han
e3e90cf6f3 Update README.md
Better Qwen3 notebook
2025-05-26 23:44:41 -07:00
Michael Han
2b419ce039 Update README.md 2025-05-25 03:35:43 -07:00
Quentin Gallouédec
a09f93c921 Remove dataset_text_field from SFTConfig (#2609) 2025-05-25 03:20:16 -07:00
Michael Han
a4bb68027e Update README.md
Updating model support
2025-05-20 09:51:55 -07:00
Michael Han
ce45ec2b74 Update README.md 2025-05-19 21:26:19 -07:00