-
Notifications
You must be signed in to change notification settings - Fork 327
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
[Feature] Add mistral pretrain #204
Conversation
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.
非常感谢您的贡献,有些comments辛苦看一下~
completion是针对通用的预训练数据集命名的,改为pretrain可能更直观,但是感觉不应该用skypile命名。
代码中的 skypile数据集是我从huggingface上随便找的最近开源的预训练数据集。
您看是要修改成什么比较好呢?
其他部分会按照要求进行修改~
Zhihao Lin ***@***.***> 于2023年11月6日周一 13:19写道:
… ***@***.**** commented on this pull request.
非常感谢您的贡献,有些comments辛苦看一下~
------------------------------
In xtuner/dataset/map_fns/dataset_map_fns/completion_map_fn.py
<#204 (comment)>:
> @@ -0,0 +1,14 @@
+# Copyright (c) OpenMMLab. All rights reserved.
+def completion_map_fn(example):
completion_map_fn 重命名为 skypile_map_fn,是否更合适?
------------------------------
On xtuner/configs/mistral/mistral_7b_qlora_completion.py
<#204 (comment)>:
文件名:
1. completion是否改为skypile或skypile_pretrain更合适?
2. 参照其他 config,在文件名尾增加epoch数的指示,即e3
------------------------------
In xtuner/configs/mistral/mistral_7b_qlora_completion.py
<#204 (comment)>:
> +# learning policy
+# More information: https://github.com/open-mmlab/mmengine/blob/main/docs/en/tutorials/param_scheduler.md # noqa: E501
+param_scheduler = dict(
+ type=CosineAnnealingLR,
+ eta_min=lr * 0.1,
+ by_epoch=True,
+ T_max=max_epochs,
+ convert_to_iter_based=True)
+
+# train, val, test setting
+train_cfg = dict(by_epoch=True, max_epochs=max_epochs, val_interval=1)
+
+#######################################################################
+# PART 5 Runtime #
+#######################################################################
+# Log the dialogue periodically during the training process, optional
删除此行注释
—
Reply to this email directly, view it on GitHub
<#204 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRS7W5ZCSQ253LOGPVNCXTYDBXM5AVCNFSM6AAAAAA64457M2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMJUGI3TOMRSHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
谢谢! 同时,还有两处如果方便的话也可以一并完善
|
@LZHgrla 已进行修改,新增PROMPT_TEMPLATE类型为pretrain,值为None,在进行设置的时候添加了判空处理。 |
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.
@LZHgrla 应该是修改时遗漏了,已进行确认~ |
@DumoeDss 同时,请修正 |
Co-authored-by: Zhihao Lin <[email protected]>
Co-authored-by: Zhihao Lin <[email protected]>
Co-authored-by: Zhihao Lin <[email protected]>
Co-authored-by: Zhihao Lin <[email protected]>
* [Feature] Add mistral pretrain * [feat] rename pretrain_map_fn * [feat] add custom hook * [feat] change mistral config name * Update chat.py * Update xtuner/utils/templates.py Co-authored-by: Zhihao Lin <[email protected]> * Update xtuner/configs/mistral/mistral_7b_qlora_skypile_pretrain_e1.py Co-authored-by: Zhihao Lin <[email protected]> * Update xtuner/configs/mistral/mistral_7b_qlora_skypile_pretrain_e1.py Co-authored-by: Zhihao Lin <[email protected]> * Update xtuner/configs/mistral/mistral_7b_qlora_skypile_pretrain_e1.py Co-authored-by: Zhihao Lin <[email protected]> * fix pre-commit --------- Co-authored-by: Zhihao Lin <[email protected]> Co-authored-by: LZHgrla <[email protected]>
添加mistral预训练脚本与预训练数据集的completion_map_fn