scripts/lora_finetune_dpo_phi4.yaml [19:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
model:
  _component_: torchtune.models.phi4.lora_phi4_14b
  lora_attn_modules: ['q_proj', 'v_proj', 'output_proj']
  apply_lora_to_mlp: True
  apply_lora_to_output: False
  lora_rank: 8  # higher increases accuracy and memory
  lora_alpha: 16  # usually alpha=2*rank
  lora_dropout: 0.0
  

# Tokenizer
tokenizer:
  _component_: torchtune.models.phi4.phi4_14b_tokenizer
  vocab_path:  {{model_dir}}/vocab.json
  merges_path:  {{model_dir}}/merges.txt
  max_seq_len: null


# Checkpointer
checkpointer:
  _component_: torchtune.training.FullModelHFCheckpointer
  checkpoint_dir: {{model_dir}}
  checkpoint_files: [
    model-00001-of-00006.safetensors,
    model-00002-of-00006.safetensors,
    model-00003-of-00006.safetensors,
    model-00004-of-00006.safetensors,
    model-00005-of-00006.safetensors,
    model-00006-of-00006.safetensors,
  ]
  recipe_checkpoint: null
  output_dir: {{model_output_dir}}
  model_type: PHI3_MINI
resume_from_checkpoint: False
save_adapter_weights_only: False


# Dataset
dataset:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/lora_finetune_phi4.yaml [19:56]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
model:
  _component_: torchtune.models.phi4.lora_phi4_14b
  lora_attn_modules: ['q_proj', 'v_proj', 'output_proj']
  apply_lora_to_mlp: True
  apply_lora_to_output: False
  lora_rank: 8  # higher increases accuracy and memory
  lora_alpha: 16  # usually alpha=2*rank
  lora_dropout: 0.0

# Tokenizer
tokenizer:
  _component_: torchtune.models.phi4.phi4_14b_tokenizer
  vocab_path:  {{model_dir}}/vocab.json
  merges_path:  {{model_dir}}/merges.txt
  max_seq_len: null


# Checkpointer
checkpointer:
  _component_: torchtune.training.FullModelHFCheckpointer
  checkpoint_dir: {{model_dir}}
  checkpoint_files: [
    model-00001-of-00006.safetensors,
    model-00002-of-00006.safetensors,
    model-00003-of-00006.safetensors,
    model-00004-of-00006.safetensors,
    model-00005-of-00006.safetensors,
    model-00006-of-00006.safetensors,
  ]
  recipe_checkpoint: null
  output_dir: {{model_output_dir}}
  model_type: PHI3_MINI
resume_from_checkpoint: False
save_adapter_weights_only: False


# Dataset
dataset:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



