Skip to content

Commit 5e518e1

Browse files
Ishan Aryendufacebook-github-bot
authored andcommitted
(uncommitted/untracked changes)
1 parent e6b09d2 commit 5e518e1

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
tokenizer:
2+
_component_: torchtune.models.qwen2.qwen2_tokenizer
3+
path: /tmp/Qwen2-0.5B-Instruct/vocab.json
4+
merges_file: /tmp/Qwen2-0.5B-Instruct/merges.txt
5+
max_seq_len: 512
6+
7+
dataset:
8+
_component_: torchtune.datasets.alpaca_cleaned_dataset
9+
seed: null
10+
shuffle: True
11+
batch_size: 1
12+
13+
loss:
14+
_component_: torch.nn.CrossEntropyLoss
15+
16+
model:
17+
_component_: torchtune.models.qwen2.lora_qwen2_0_5b
18+
lora_attn_modules: ['q_proj', 'k_proj', 'v_proj']
19+
apply_lora_to_mlp: False
20+
lora_rank: 32
21+
lora_alpha: 64
22+
learning_rate: 5e-3
23+
24+
checkpointer:
25+
_component_: torchtune.training.FullModelHFCheckpointer
26+
checkpoint_dir: /tmp/Qwen2-0.5B-Instruct
27+
checkpoint_files: [
28+
model.safetensors
29+
]
30+
recipe_checkpoint: null
31+
output_dir: /tmp/qwen_0.5B_ft-output
32+
model_type: QWEN2
33+
resume_from_checkpoint: False
34+
save_adapter_weights_only: False
35+
36+
device: cpu
37+
dtype: fp32
38+
39+
enable_activation_checkpointing: True
40+
compile: False

examples/llm_pte_finetuning/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def main() -> None:
8484
# params run from [param_start, outputs_end]
8585
grad_start = et_mod.run_method("__et_training_gradients_index_forward", [])[0]
8686
param_start = et_mod.run_method("__et_training_parameters_index_forward", [])[0]
87-
learning_rate = 5e-3
87+
learning_rate = cfg.model.learning_rate
8888
f.seek(0)
8989
losses = []
9090
for i, batch in tqdm(enumerate(train_dataloader), total=num_training_steps):

0 commit comments

Comments
 (0)