Commit graph

203 commits

Author SHA1 Message Date
Michael Han
71d1adb13e
Update README.md 2025-12-13 16:44:44 -08:00
Michael Han
947eda3ad6
Padding free packing update 2025-12-10 21:12:13 -08:00
Michael Han
173be4ff77
Adding new padding free packing support 2025-12-10 21:10:19 -08:00
Michael Han
d1e312dcdc
Update README.md 2025-12-04 08:21:20 -08:00
Daniel Han
6789c279d5 Update README.md 2025-12-02 04:08:54 -08:00
Daniel Han
dbf419399c Update README.md 2025-12-02 03:52:50 -08:00
gitpullpull
05c6f91c55
Fix broken link for Advanced pip install instructions (#3652) 2025-11-29 15:33:48 -08:00
Michael Han
9d6565e720
Update README.md 2025-11-29 08:01:00 -08:00
Michael Han
bda9e3d39b
Update README.md 2025-11-27 20:52:27 -08:00
Michael Han
7c6d83f594
Update README.md 2025-11-27 20:49:47 -08:00
Daniel Han
aa086eab6b
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
c69dbbf299
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
56392a7a4c
Update README.md 2025-11-04 22:00:06 -08:00
Michael Han
eb105936fa
Update README.md 2025-10-25 19:26:05 -07:00
Michael Han
3d98df6e0f
Update README.md
Qwen3-VL + DGX
2025-10-14 20:23:32 -07:00
Michael Han
45d0ff5b46
Update README.md 2025-10-12 05:32:42 -07:00
Michael Han
0d9aac9884
Update README.md 2025-10-04 16:12:02 -07:00
Michael Han
67ea5e422d
Update README.md 2025-10-03 04:18:21 -07:00
Michael Han
1728cc2e16
Update README.md 2025-10-03 04:01:17 -07:00
Michael Han
b5214fd5a1
Adding Docker support 2025-10-01 17:04:46 -07:00
Michael Han
02ba33964d
Update README.md 2025-09-26 17:31:46 -07:00
laz-001
396150f27b
correct python support statement (#3374) 2025-09-26 04:52:23 -07:00
Michael Han
931e0561af
Update README.md
Fresh upate
2025-09-26 02:50:02 -07:00
Michael Han
1b8269f794
Update README.md 2025-09-16 10:07:02 -07:00
Daniel Han
e204e93599 Update README.md 2025-09-15 01:46:07 -07:00
Daniel Han
1d83c5ffe8 Update README.md 2025-09-15 01:43:11 -07:00
Daniel Han
fdbee04f96 Update README.md 2025-09-15 01:42:59 -07:00
Daniel Han
e66427f795 Update README.md 2025-09-15 01:40:28 -07:00
Daniel Han
a40ccf8d33 Update README.md 2025-09-15 01:40:06 -07:00
Daniel Han
fe291a10a9 Update README.md 2025-09-15 01:39:39 -07:00
Daniel Han
b73e9b0b9e Blackwell support 2025-09-15 01:39:03 -07:00
Michael Han
c7fc68c5e0
Update README.md 2025-09-13 21:45:22 -07:00
Michael Han
dbaff8a0dd
Update README.md
Adding new install instructions
2025-09-13 21:30:52 -07:00
Michael Han
7dd4e1dd5d
Update README.md 2025-08-09 15:53:29 -07:00
Michael Han
63199569fa
Update README.md 2025-08-08 12:14:38 -07:00
Quentin Gallouédec
89ba48dd7e
Update README.md (#2991)
* Update README.md

* Update README.md
2025-07-18 15:43:59 -07:00
Daniel Han
2fac21687f Fixes 2025-07-11 00:01:37 -07:00
Michael Han
d672f03d0b
Update README.md
Updating icon sizes
2025-07-04 15:50:31 -07:00
Michael Han
61a220ffef
Update README.md
Editing icon sizes
2025-07-04 15:37:44 -07:00
Michael Han
968fd27265
Update README.md 2025-07-01 09:28:59 -07:00
Daniel Han
eef2515749 Move AMD to AMD branch 2025-07-01 01:02:51 -07:00
billishyahao
06ca5c273b
[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
f14d7e1542
Update README.md
Updating links
2025-06-25 01:32:24 -07:00
Michael Han
c820beeaad
Update README.md
Better Qwen3 notebook
2025-05-26 23:44:41 -07:00
Michael Han
380c3b6896
Update README.md 2025-05-25 03:35:43 -07:00
Quentin Gallouédec
216fb5cde9
Remove dataset_text_field from SFTConfig (#2609) 2025-05-25 03:20:16 -07:00
Michael Han
3e5024ceed
Update README.md
Updating model support
2025-05-20 09:51:55 -07:00
Michael Han
d69fc3149c
Update README.md 2025-05-19 21:26:19 -07:00
Michael Han
524d05cd73
Update README.md 2025-05-16 01:56:40 -07:00
Michael Han
6e771a0a24
Update README.md
TTS support
2025-05-15 15:15:53 -07:00