-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support evaluation using non-merged peft(lora) weight * Merge lora into base model to enable fsdp * Update TUTORIAL.md * Add setting of `lora_merge` in eval.py * Remove part of merging lora weight into base * pinned down peft to avoid accelerate issues * eval merge fixes * type hints for load peft * format string --------- Co-authored-by: SingL3 <[email protected]> Co-authored-by: Jeremy D <[email protected]>
- Loading branch information
1 parent
965bd37
commit 7b1e4ea
Showing
4 changed files
with
102 additions
and
5 deletions.
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
max_seq_len: 2048 | ||
seed: 1 | ||
precision: amp_fp16 | ||
|
||
# If you are using one model, put it here: | ||
model_name_or_path: EleutherAI/gpt-neo-125m | ||
# If you are using a seperated lora weight, put it here: | ||
lora_id_or_path: nathan0/lora-gpt-neo-125m-alpaca | ||
# otherwise, write a block for each model you want to test in the `models` section | ||
|
||
models: | ||
- | ||
model_name: ${model_name_or_path} | ||
model: | ||
name: hf_causal_lm | ||
pretrained_model_name_or_path: ${model_name_or_path} | ||
init_device: cpu | ||
pretrained: true | ||
pretrained_lora_id_or_path: ${lora_id_or_path} | ||
tokenizer: | ||
name: ${model_name_or_path} | ||
kwargs: | ||
model_max_length: ${max_seq_len} | ||
# # if you are evaluating more than one model, list them all as YAML blocks without variable interpolation | ||
# - | ||
# model_name: mosaicml/mpt-7b | ||
# model: | ||
# name: hf_causal_lm | ||
# pretrained_model_name_or_path: mosaicml/mpt-7b | ||
# init_device: cpu | ||
# pretrained: true | ||
# config_overrides: | ||
# max_seq_len: ${max_seq_len} | ||
# tokenizer: | ||
# name: mosaicml/mpt-7b | ||
# kwargs: | ||
# model_max_length: ${max_seq_len} | ||
|
||
|
||
device_eval_batch_size: 4 | ||
|
||
# FSDP config for model sharding | ||
fsdp_config: | ||
sharding_strategy: FULL_SHARD | ||
mixed_precision: FULL | ||
|
||
icl_tasks: 'eval/yamls/tasks_light.yaml' | ||
model_gauntlet: 'eval/yamls/model_gauntlet.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