- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.1k
[codestyle] Modular convert tools #11129
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
Conversation
new file: paddlenlp/transformers/convert/doc/llama_analysis.md new file: paddlenlp/transformers/convert/doc/process.png new file: paddlenlp/transformers/convert/doc/qwen2_analysis.md new file: "paddlenlp/transformers/convert/doc/\351\241\271\347\233\256\346\212\245\345\221\212\357\274\232\351\243\236\346\241\250PaddleNLP-\345\211\215\346\262\277\346\250\241\345\236\213\346\250\241\345\235\227\345\214\226\350\256\276\350\256\241.md" new file: paddlenlp/transformers/convert/main.py new file: paddlenlp/transformers/convert/test_ability/test_base/test_modeling.py new file: paddlenlp/transformers/convert/test_ability/test_paralle/compare_torch_with_paddle.py new file: paddlenlp/transformers/convert/until/collect_import_modeling.py new file: paddlenlp/transformers/convert/until/rename_identifiers.py new file: paddlenlp/transformers/convert/until/rewrite_child_classes.py modified: paddlenlp/transformers/qwen2/configuration.py new file: paddlenlp/transformers/qwen2/modeling_qwen2.py new file: paddlenlp/transformers/qwen2/modular_qwen2.py
| Thanks for your contribution! | 
deleted: paddlenlp/transformers/convert/doc/README.md deleted: paddlenlp/transformers/convert/doc/llama_analysis.md deleted: paddlenlp/transformers/convert/doc/process.png deleted: paddlenlp/transformers/convert/doc/qwen2_analysis.md deleted: "paddlenlp/transformers/convert/doc/\351\241\271\347\233\256\346\212\245\345\221\212\357\274\232\351\243\236\346\241\250PaddleNLP-\345\211\215\346\262\277\346\250\241\345\236\213\346\250\241\345\235\227\345\214\226\350\256\276\350\256\241.md" deleted: paddlenlp/transformers/convert/main.py deleted: paddlenlp/transformers/convert/test_ability/test_base/test_modeling.py deleted: paddlenlp/transformers/convert/test_ability/test_paralle/compare_torch_with_paddle.py deleted: paddlenlp/transformers/convert/until/collect_import_modeling.py deleted: paddlenlp/transformers/convert/until/rename_identifiers.py deleted: paddlenlp/transformers/convert/until/rewrite_child_classes.py deleted: paddlenlp/transformers/qwen2/__init__.py deleted: paddlenlp/transformers/qwen2/configuration.py deleted: paddlenlp/transformers/qwen2/modeling.py deleted: paddlenlp/transformers/qwen2/modeling_pp.py deleted: paddlenlp/transformers/qwen2/modeling_qwen2.py deleted: paddlenlp/transformers/qwen2/modular_qwen2.py deleted: paddlenlp/transformers/qwen2/tokenizer.py deleted: paddlenlp/transformers/qwen2/tokenizer_fast.py scripts/codestyle/convert/
…estyle/convert/doc/README.md renamed: paddlenlp/transformers/convert/doc/llama_analysis.md -> scripts/codestyle/convert/doc/llama_analysis.md renamed: paddlenlp/transformers/convert/doc/process.png -> scripts/codestyle/convert/doc/process.png renamed: paddlenlp/transformers/convert/doc/qwen2_analysis.md -> scripts/codestyle/convert/doc/qwen2_analysis.md renamed: "paddlenlp/transformers/convert/doc/\351\241\271\347\233\256\346\212\245\345\221\212\357\274\232\351\243\236\346\241\250PaddleNLP-\345\211\215\346\262\277\346\250\241\345\236\213\346\250\241\345\235\227\345\214\226\350\256\276\350\256\241.md" -> "scripts/codestyle/convert/doc/\351\241\271\347\233\256\346\212\245\345\221\212\357\274\232\351\243\236\346\241\250PaddleNLP-\345\211\215\346\262\277\346\250\241\345\236\213\346\250\241\345\235\227\345\214\226\350\256\276\350\256\241.md" renamed: paddlenlp/transformers/convert/main.py -> scripts/codestyle/convert/main.py renamed: paddlenlp/transformers/convert/test_ability/test_base/test_modeling.py -> scripts/codestyle/convert/test_ability/test_base/test_modeling.py renamed: paddlenlp/transformers/convert/test_ability/test_paralle/compare_torch_with_paddle.py -> scripts/codestyle/convert/test_ability/test_paralle/compare_torch_with_paddle.py renamed: paddlenlp/transformers/convert/until/collect_import_modeling.py -> scripts/codestyle/convert/until/collect_import_modeling.py renamed: paddlenlp/transformers/convert/until/rename_identifiers.py -> scripts/codestyle/convert/until/rename_identifiers.py renamed: paddlenlp/transformers/convert/until/rewrite_child_classes.py -> scripts/codestyle/convert/until/rewrite_child_classes.py renamed: paddlenlp/transformers/qwen2/modeling_qwen2.py -> scripts/codestyle/qwen2/modeling_qwen2.py renamed: paddlenlp/transformers/qwen2/modular_qwen2.py -> scripts/codestyle/qwen2/modular_qwen2.py
|  | ||
| from ..configuration_utils import PretrainedConfig | ||
|  | ||
|  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件的改动恢复
| @@ -0,0 +1,2243 @@ | |||
| # 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qwen2文件夹整体放到 scipts/codestyle/convert/example下
new file: scripts/codestyle/convert/example/qwen2/__init__.py new file: scripts/codestyle/convert/example/qwen2/configuration.py new file: scripts/codestyle/convert/example/qwen2/modeling.py new file: scripts/codestyle/convert/example/qwen2/modeling_pp.py renamed: scripts/codestyle/qwen2/modeling_qwen2.py -> scripts/codestyle/convert/example/qwen2/modeling_qwen2.py renamed: scripts/codestyle/qwen2/modular_qwen2.py -> scripts/codestyle/convert/example/qwen2/modular_qwen2.py new file: scripts/codestyle/convert/example/qwen2/tokenizer.py new file: scripts/codestyle/convert/example/qwen2/tokenizer_fast.py
deleted: scripts/codestyle/convert/doc/process.png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Before submitting
testsfolder. If there are codecov issues, please add tests cases first.PR types
New features
PR changes
Others
Description
Modular model convert tools