Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[finetune-llm] Training configs for 70b full parameter finetuning #85

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions templates/fine-tune-llm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This guide provides starter configurations if you would like to further customiz
### Supported base models

- mistralai/Mistral-7B-Instruct-v0.1
- mistralai/Mixtral-8x7b
- meta-llama/Llama-2-7b-hf
- meta-llama/Llama-2-7b-chat-hf
- meta-llama/Llama-2-13b-hf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ train_batch_size_per_device: 8
eval_batch_size_per_device: 8
learning_rate: 5e-6
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes llmforge's restriction on dataset size. This is currently a workaround, but in the future we should remove the default dataset size restriction in llmforge and only enable it for public endpoints. This is being tracked and I will make an issue for this.

output_dir: /mnt/local_storage
deepspeed:
config_path: deepspeed_configs/zero_3_llama_2_13b.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
model_id: meta-llama/Llama-2-70b-hf # <-- change this to the model you want to fine-tune
train_path: s3://air-example-data/gsm8k/train.jsonl # <-- change this to the path to your training data
valid_path: s3://air-example-data/gsm8k/test.jsonl # <-- change this to the path to your validation data. This is optional
context_length: 4096 # <-- change this to the context length you want to use
num_devices: 16 # <-- change this to total number of GPUs that you want to use
num_epochs: 1 # <-- change this to the number of epochs that you want to train for
train_batch_size_per_device: 1
eval_batch_size_per_device: 1
learning_rate: 5e-6
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
output_dir: /mnt/local_storage
deepspeed:
config_path: deepspeed_configs/zero_3_llama_2_70b.json
flash_attention_2: True
worker_resources:
p4de.24xlarge: 1 # <-- this maps to job_compute_configs file's custom_resources so the appropriate nodes can scale up
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
model_id: meta-llama/Llama-2-70b-chat-hf # <-- change this to the model you want to fine-tune
train_path: s3://air-example-data/gsm8k/train.jsonl # <-- change this to the path to your training data
valid_path: s3://air-example-data/gsm8k/test.jsonl # <-- change this to the path to your validation data. This is optional
context_length: 4096 # <-- change this to the context length you want to use
num_devices: 16 # <-- change this to total number of GPUs that you want to use
num_epochs: 1 # <-- change this to the number of epochs that you want to train for
train_batch_size_per_device: 1
eval_batch_size_per_device: 1
learning_rate: 5e-6
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
output_dir: /mnt/local_storage
deepspeed:
config_path: deepspeed_configs/zero_3_llama_2_70b.json
flash_attention_2: True
worker_resources:
p4de.24xlarge: 1 # <-- this maps to job_compute_configs file's custom_resources so the appropriate nodes can scale up
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ train_batch_size_per_device: 16
eval_batch_size_per_device: 16
learning_rate: 5e-6
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
output_dir: /mnt/local_storage
deepspeed:
config_path: deepspeed_configs/zero_3_llama_2_7b.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ train_batch_size_per_device: 8
eval_batch_size_per_device: 8
learning_rate: 5e-6
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
output_dir: /mnt/local_storage
deepspeed:
config_path: deepspeed_configs/zero_3_llama_2_13b.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ train_batch_size_per_device: 16
eval_batch_size_per_device: 16
learning_rate: 5e-6
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
output_dir: /mnt/local_storage
deepspeed:
config_path: deepspeed_configs/zero_3_llama_2_7b.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ train_batch_size_per_device: 4
eval_batch_size_per_device: 4
learning_rate: 1e-4
num_checkpoints_to_keep: 1
dataset_size_scaling_factor: 10000
no_gradient_checkpoint: False
output_dir: /mnt/local_storage
deepspeed:
Expand Down
Loading