Open Benjamin-eecs opened 3 months ago
@Benjamin-eecs Hi! Sorry for the late response.
Perhaps you need to check the name of optimizer in the config file https://github.com/zyushun/Adam-mini/blob/main/examples/gpt2/config/train_gpt2_small.py
Make sure that you are using the following and I think it would be fine.
# optimizer
algorithm = 'adam_mini'
Sorry again for the delay.
elif algorithm == 'adam_mini': optimizer = Adam_mini( named_parameters=model.named_parameters(), lr=lr, betas=(beta1, beta2), weight_decay=weight_decay, model_sharding=False, dim=n_embd, n_heads=n_head ) raise ValueError("algorithm not supported")
I commented out the raise part of the code, And it works.
run
bash run_gpt2.sh
and raise the value error above.