xref: /aosp_15_r20/external/executorch/examples/llm_pte_finetuning/phi3_config.yaml (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1tokenizer:
2  _component_: torchtune.models.phi3.phi3_mini_tokenizer
3  path: /tmp/Phi-3-mini-4k-instruct/tokenizer.model
4  max_seq_len: 512
5
6dataset:
7  _component_: torchtune.datasets.alpaca_cleaned_dataset
8seed: null
9shuffle: True
10batch_size: 1
11
12loss:
13  _component_: torch.nn.CrossEntropyLoss
14
15model:
16  _component_: torchtune.models.phi3.lora_phi3_mini
17  lora_attn_modules: ['q_proj', 'v_proj']
18  apply_lora_to_mlp: False
19  apply_lora_to_output: False
20  lora_rank: 8
21  lora_alpha: 16
22
23checkpointer:
24  _component_: torchtune.training.FullModelHFCheckpointer
25  checkpoint_dir: /tmp/Phi-3-mini-4k-instruct
26  checkpoint_files: [
27    model-00001-of-00002.safetensors,
28    model-00002-of-00002.safetensors
29  ]
30  recipe_checkpoint: null
31  output_dir: /tmp/Phi-3-mini-4k-instruct/
32  model_type: PHI3_MINI
33resume_from_checkpoint: False
34save_adapter_weights_only: False
35
36device: cpu
37dtype: fp32
38
39enable_activation_checkpointing: True
40compile: False
41