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

[Question]: 如何使用PaddleNlp的albert模型进行训练 #9078

Open
a31413510 opened this issue Sep 4, 2024 · 3 comments
Open

[Question]: 如何使用PaddleNlp的albert模型进行训练 #9078

a31413510 opened this issue Sep 4, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@a31413510
Copy link
Contributor

请提出你的问题

如何使用PaddleNlp的albert模型进行训练,在model_zoo里似乎没有找到albert模型

@a31413510 a31413510 added the question Further information is requested label Sep 4, 2024
@wawltor
Copy link
Collaborator

wawltor commented Sep 4, 2024

albert和bert的训练方式基本一致,可以参考bert模型的训练方式,可以参考

"ernie": (ErnieForSequenceClassification, ErnieTokenizer),

同时稍微改动几行代码,支持albert训练,传入传入albert的Class名字,具体的Class名字可以参考 https://github.com/PaddlePaddle/PaddleNLP/blob/develop/paddlenlp/transformers/albert/modeling.py

@a31413510
Copy link
Contributor Author

请问是这么添加吗
"albert": (AlbertForSequenceClassification, AlbertTokenizer),
除此之外,还有什么需要修改的吗

@tianchiguaixia
Copy link

你使用torch就10行代码就可以微调albert

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

No branches or pull requests

3 participants