Skip to content

Commit 0f77094

Browse files
committed
merge
2 parents ad68c62 + 00bbd53 commit 0f77094

File tree

60 files changed

+1519
-425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1519
-425
lines changed

.github/workflows/build_linux_wheels.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Build Linux Wheels
22

33
on:
4-
pull_request:
54
push:
65
branches:
76
- nightly
8-
- main
97
- release/*
108
tags:
119
# NOTE: Binary build pipelines should only get triggered on release candidate builds

docs/source/api_ref_data.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and models.
2525
StackExchangedPairedTemplate
2626
PromptTemplate
2727
PromptTemplateInterface
28+
ChatMLTemplate
2829

2930
ChatFormat
3031
ChatMLFormat

docs/source/api_ref_models.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ To download the Llama2-70B model:
104104
llama2.llama2_reward_7b
105105
llama2.lora_llama2_reward_7b
106106
llama2.qlora_llama2_reward_7b
107+
llama2.Llama2ChatTemplate
107108

108109

109110
code llama
@@ -212,6 +213,7 @@ To download the Mistral 7B v0.1 model:
212213
mistral.qlora_mistral_reward_7b
213214
mistral.mistral_tokenizer
214215
mistral.MistralTokenizer
216+
mistral.MistralChatTemplate
215217

216218

217219
gemma

docs/source/api_ref_modules.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Loss
8686
loss.DPOLoss
8787
loss.RSOLoss
8888
loss.IPOLoss
89+
loss.SimPOLoss
8990

9091

9192
Vision Transforms
@@ -98,6 +99,7 @@ Functions used for preprocessing images.
9899

99100
transforms.Transform
100101
transforms.get_canvas_best_fit
102+
transforms.get_inscribed_size
101103
transforms.resize_with_pad
102104
transforms.tile_crop
103105
transforms.find_supported_resolutions

docs/source/tune_cli.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ with matching names. By default we ignore safetensor files, but if you want to i
9292

9393
.. code-block:: bash
9494
95-
$ tune download meta-llama/Meta-Llama-3-8B-Instruct --hf-token <TOKEN> --ignore-patterns ""
95+
$ tune download meta-llama/Meta-Llama-3-8B-Instruct --hf-token <TOKEN> --ignore-patterns None
9696
Successfully downloaded model repo and wrote to the following locations:
9797
./model/config.json
9898
./model/README.md

docs/source/tutorials/e2e_flow.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ To quantize the fine-tuned model after installing torchao we can run the followi
327327
# we also support `int8_weight_only()` and `int8_dynamic_activation_int8_weight()`, see
328328
# https://github.com/pytorch/ao/tree/main/torchao/quantization#other-available-quantization-techniques
329329
# for a full list of techniques that we support
330-
from torchao.quantization.quant_api import quantize\_, int4_weight_only
331-
quantize\_(model, int4_weight_only())
330+
from torchao.quantization.quant_api import quantize_, int4_weight_only
331+
quantize_(model, int4_weight_only())
332332

333333
After quantization, we rely on torch.compile for speedups. For more details, please see `this example usage <https://github.com/pytorch/ao/blob/main/torchao/quantization/README.md#quantization-flow-example>`_.
334334

docs/source/tutorials/llama3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ To quantize the fine-tuned model after installing torchao we can run the followi
247247
# we also support `int8_weight_only()` and `int8_dynamic_activation_int8_weight()`, see
248248
# https://github.com/pytorch/ao/tree/main/torchao/quantization#other-available-quantization-techniques
249249
# for a full list of techniques that we support
250-
from torchao.quantization.quant_api import quantize\_, int4_weight_only
251-
quantize\_(model, int4_weight_only())
250+
from torchao.quantization.quant_api import quantize_, int4_weight_only
251+
quantize_(model, int4_weight_only())
252252

253253
After quantization, we rely on torch.compile for speedups. For more details, please see `this example usage <https://github.com/pytorch/ao/blob/main/torchao/quantization/README.md#quantization-flow-example>`_.
254254

recipes/configs/llama2/7B_lora_dpo_single_device.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ loss:
7070
epochs: 1
7171
max_steps_per_epoch: 1000
7272
gradient_accumulation_steps: 16
73+
compile: False
7374

7475
# Logging
7576
output_dir: /tmp/lora_dpo_output/

recipes/configs/qwen2/0.5B_full.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# This config assumes that you've run the following command before launching
55
# this run:
6-
# tune download Qwen/Qwen2-0.5B-Instruct --output-dir /tmp/Qwen2-0.5B-Instruct --ignore-patterns ""
6+
# tune download Qwen/Qwen2-0.5B-Instruct --output-dir /tmp/Qwen2-0.5B-Instruct --ignore-patterns None
77
#
88
# To launch on 4 devices, run the following command from root:
99
# tune run --nnodes 1 --nproc_per_node 4 full_finetune_distributed --config qwen2/0.5B_full
@@ -49,7 +49,7 @@ batch_size: 2
4949
epochs: 1
5050
optimizer:
5151
_component_: torch.optim.AdamW
52-
lr: 5e-6
52+
lr: 2e-5
5353
loss:
5454
_component_: torch.nn.CrossEntropyLoss
5555
max_steps_per_epoch: null

recipes/configs/qwen2/0.5B_full_single_device.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
#
44
# This config assumes that you've run the following command before launching
55
# this run:
6-
# tune download Qwen/Qwen2-0.5B-Instruct --output-dir /tmp/Qwen2-0.5B-Instruct --ignore-patterns ""
7-
#
8-
# The default config uses an optimizer from bitsandbytes. If you do not have it installed,
9-
# you can install it with
10-
# pip install bitsandbytes
6+
# tune download Qwen/Qwen2-0.5B-Instruct --output-dir /tmp/Qwen2-0.5B-Instruct --ignore-patterns None
117
#
128
# To launch on a single device, run the following command from root:
139
# tune run full_finetune_single_device --config qwen2/0.5B_full_single_device
@@ -50,13 +46,15 @@ resume_from_checkpoint: False
5046
batch_size: 2
5147
epochs: 1
5248
optimizer:
53-
_component_: bitsandbytes.optim.PagedAdamW
54-
lr: 5e-6
55-
optimizer_in_bwd: True
49+
_component_: torch.optim.AdamW
50+
lr: 2e-5
51+
5652
loss:
5753
_component_: torch.nn.CrossEntropyLoss
54+
optimizer_in_bwd: False
55+
5856
max_steps_per_epoch: null
59-
gradient_accumulation_steps: 16
57+
gradient_accumulation_steps: 8
6058
compile: False
6159

6260
# Training environment

0 commit comments

Comments
 (0)