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

Can you provide a more detailed guide to fine-tuning operations? #23

Open
chenzebiaohub opened this issue May 7, 2024 · 9 comments
Open

Comments

@chenzebiaohub
Copy link

I want to fine-tune a mt5 Chinese model on my own dataset!
Extremely grateful.

@asahi417
Copy link
Owner

asahi417 commented May 8, 2024 via email

@chenzebiaohub
Copy link
Author

hello! thanks your reply!
I have the dataset organized ~ not uploaded to huggingface at the moment, would like to load the dataset locally for mT5 fine-tuning

@asahi417
Copy link
Owner

asahi417 commented May 8, 2024 via email

@chenzebiaohub
Copy link
Author

Very excited to see your feedback! I will upload the dataset to huggingface, how do I need to fine tune it after that?

@chenzebiaohub
Copy link
Author

@asahi417

@asahi417
Copy link
Owner

asahi417 commented May 8, 2024

Try the following command.

lmqg-train-search -c "tmp" -d "{your-hf-dataset-alias}" -m "mt5-small" -b 64 --epoch-partial 5 -e 15 --language "zh" --n-max-config 1 -g 2 4 --lr 1e-04 5e-04 1e-03 --label-smoothing 0 0.15

That will launch the fine-tuning with hyperparameter gridsearch. you might need to play around with the parameter. See the full description at lmqg-train-search -h.

@asahi417
Copy link
Owner

asahi417 commented May 8, 2024

For example, following command is used to train https://huggingface.co/lmqg/mt5-base-zhquad-qag.

LA='zh'
MODEL="google/mt5-base"
MODEL_SHORT='mt5-base'
lmqg-train-search --use-auth-token -d "lmqg/qag_${LA}quad" -m "${MODEL}" -b 8 -g 8 16 -c "lmqg_output/${MODEL_SHORT}-${LA}quad-qag" -i 'paragraph' -o 'questions_answers' --n-max-config 2 --epoch-partial 5 -e 15 --max-length-output-eval 256 --max-length-output 256 --lr 1e-04 5e-04 1e-03

@asahi417
Copy link
Owner

asahi417 commented May 8, 2024

@chenzebiaohub
Copy link
Author

Very excited to see your feedback! THANKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants