axolotl
axolotl copied to clipboard
Wrong eval stages distribution when using `evals_per_epoch` parameter
Please check that this issue hasn't been reported before.
- [X] I searched previous Bug Reports didn't find any similar reports.
Expected Behavior
Evaluations should happen at the beginning, end (if set to 2) and in between (if set to 3 or more)
Current behaviour
Seems like when you train with this parameter, there's no evaluation stage after last training step. I got eval at the beginning of the run and a couple of intermediate evaluations. Intuitively it should distribute evaluations in a such a way so the latest evaluating happens after last training step.
Steps to reproduce
Run training with evals_per_epoch set to, for example 3 or 4.
Config yaml
base_model: mistralai/Mistral-7B-v0.1
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
load_in_8bit: false
load_in_4bit: true
strict: false
datasets:
- path: yahma/alpaca-cleaned
type: alpaca
dataset_prepared_path: last_run_prepared
val_set_size: 0.1
output_dir: ./qlora-out/mistral-alcl-r4-a8-d005-lr2e-4
adapter: qlora
lora_model_dir:
sequence_len: 512
sample_packing: true
pad_to_sequence_len: true
lora_r: 4
lora_alpha: 8
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
- gate_proj
- down_proj
- up_proj
- q_proj
- v_proj
- k_proj
- o_proj
wandb_project:
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
gradient_accumulation_steps: 1
micro_batch_size: 16
num_epochs: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention: false
flash_attention: true
loss_watchdog_threshold: 5.0
loss_watchdog_patience: 3
warmup_ratio: 0.03
evals_per_epoch: 4
eval_table_size:
eval_table_max_new_tokens: 128
do_bench_eval: true
bench_dataset: pharaouk/dharma-1/dharma_1_full.json
saves_per_epoch: 1
debug:
deepspeed:
weight_decay: 0.01
fsdp:
fsdp_config:
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"
Possible solution
No response
Which Operating Systems are you using?
- [X] Linux
- [ ] macOS
- [ ] Windows
Python Version
3.10,.12
axolotl branch-commit
main/badda37
Acknowledgements
- [X] My issue title is concise, descriptive, and in title casing.
- [X] I have searched the existing issues to make sure this bug has not been reported yet.
- [X] I am using the latest version of axolotl.
- [X] I have provided enough information for the maintainers to reproduce and diagnose the issue.
same