-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update templates after v0.5.8 llmforge
release
#391
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d7e3f7f
update router template after v0.5.8
SumanthRH 9369d94
minor updates
SumanthRH 0a2853f
add liger to default config
erictang000 e176331
update liger configs
erictang000 f3d9f80
add lora to 8xa100 lora 70b config
erictang000 6454865
x
SumanthRH b0281d7
address comments
SumanthRH 0a0c8dc
x
SumanthRH 22b33db
Merge branch 'sumanthrh/update-templates-v0.5.8' of https://github.co…
SumanthRH 1a9490a
x
SumanthRH 8d12ca7
x
SumanthRH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "dspy-llmforge-fine-tuning-job" | ||
entrypoint: "llmforge anyscale finetune configs/training/lora/llama-3-8b.yaml" | ||
working_dir: "." | ||
image_uri: "localhost:5555/anyscale/llm-forge:0.5.7" | ||
image_uri: "localhost:5555/anyscale/llm-forge:0.5.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: e2e-llm-workflows | ||
entrypoint: llmforge anyscale finetune configs/training/lora/llama-3-8b.yaml | ||
image_uri: localhost:5555/anyscale/llm-forge:0.5.7 | ||
image_uri: localhost:5555/anyscale/llm-forge:0.5.8 | ||
requirements: [] | ||
max_retries: 1 | ||
excludes: ["assets"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...-tune-llm_v2/training_configs/custom/meta-llama/Meta-Llama-3-8B/lora/4xA10-512-liger.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Change this to the model you want to fine-tune | ||
model_id: meta-llama/Meta-Llama-3-8B-Instruct | ||
|
||
# Change this to the path to your training data | ||
train_path: s3://air-example-data/gsm8k/train.jsonl | ||
|
||
# Change this to the path to your validation data. This is optional | ||
valid_path: s3://air-example-data/gsm8k/test.jsonl | ||
|
||
# Change this to the context length you want to use. Examples with longer | ||
# context length will be truncated. | ||
context_length: 512 | ||
|
||
# Change this to total number of GPUs that you want to use | ||
num_devices: 4 | ||
|
||
# Change this to the number of epochs that you want to train for | ||
num_epochs: 3 | ||
|
||
# Change this to the batch size that you want to use | ||
train_batch_size_per_device: 2 | ||
eval_batch_size_per_device: 4 | ||
gradient_accumulation_steps: 2 | ||
|
||
|
||
# Change this to the learning rate that you want to use | ||
learning_rate: 1e-4 | ||
|
||
# This will pad batches to the longest sequence. Use "max_length" when profiling to profile the worst case. | ||
padding: "longest" | ||
|
||
# By default, we will keep the best checkpoint. You can change this to keep more checkpoints. | ||
num_checkpoints_to_keep: 1 | ||
|
||
# Deepspeed configuration, you can provide your own deepspeed setup | ||
deepspeed: | ||
config_path: deepspeed_configs/zero_2.json | ||
|
||
logger: | ||
provider: wandb | ||
|
||
# Accelerator type, we value of 0.001 is not important, as long as it is | ||
# beteween 0 and 1. This ensures that accelerator type is used per trainer | ||
# worker. | ||
worker_resources: | ||
anyscale/accelerator_shape:4xA10G: 0.001 | ||
|
||
# Liger kernel configuration | ||
liger_kernel: | ||
enabled: True | ||
# You can further customize the individual liger kernel configurations here. By default, | ||
# all the `kwargs` are `True` when liger is enabled. | ||
# kwargs: | ||
# rms_norm: False | ||
# rope: True | ||
# swiglu: True | ||
# cross_entropy: True | ||
# fused_linear_cross_entropy: False | ||
|
||
# Lora configuration | ||
lora_config: | ||
r: 8 | ||
lora_alpha: 16 | ||
lora_dropout: 0.05 | ||
target_modules: | ||
- q_proj | ||
- v_proj | ||
- k_proj | ||
- o_proj | ||
- gate_proj | ||
- up_proj | ||
- down_proj | ||
- embed_tokens | ||
- lm_head | ||
task_type: "CAUSAL_LM" | ||
bias: "none" | ||
modules_to_save: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the router template to use the new 0.5.8 image. I noticed that the cell execution numbers are all messed up in the notebook, so I copied over some cleanup code from the E2E LLM Workflows template to cleanup cell nums and cached checkpoints.