Skip to content

Hyper Parameter Optimisation of Llama-2 #3576

Answered by tgaddair
msmmpts asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @msmmpts, here's an example config to perform hyperopt over the lora params:

model_type: llm
base_model: meta-llama/Llama-2-7b-hf

quantization:
  bits: 4

adapter:
  type: lora

input_features:
  - name: instruction
    type: text

output_features:
  - name: output
    type: text

trainer:
  type: finetune
  learning_rate: 0.0003
  batch_size: 2
  gradient_accumulation_steps: 8
  epochs: 3
  learning_rate_scheduler:
    warmup_fraction: 0.01

backend:
  type: local

hyperopt:
  goal: minimize
  metric: loss
  split: train
  parameters:
    adapter.r:
      space: grid_search
      categories: [8, 16, 32]
  executor:
    gpu_resources_per_trial: 1

To run:

ludwig hyperopt --dataset da…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by msmmpts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants