-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[New features] testing example of model zoo #4398
Merged
Merged
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
eb98e53
update model-zoo test
wj-Mcat 06d3714
update config
wj-Mcat 8354d82
Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleNLP i…
wj-Mcat b051d5f
Merge branch 'PaddlePaddle:develop' into add-gpt-testing
wj-Mcat 6de8bc4
update model-zoo test
wj-Mcat 604c413
merge develop branch
wj-Mcat 85b1a9c
Merge branch 'develop' of github.com:PaddlePaddle/PaddleNLP into add-…
wj-Mcat 34c53e6
update config for gpt
wj-Mcat f12a035
add from_hf_hubarg
wj-Mcat fc926e9
Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleNLP i…
wj-Mcat 1ce33dd
Merge branch 'add-gpt-testing' of github.com:wj-Mcat/PaddleNLP into a…
wj-Mcat 1b4b472
update model-zoo gpt
wj-Mcat 882f18c
Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleNLP i…
wj-Mcat dd813e6
add export & infer test
wj-Mcat a720b2d
Merge branch 'add-gpt-testing' of github.com:wj-Mcat/PaddleNLP into a…
wj-Mcat ad225f1
use with argv context
wj-Mcat cb0abb7
update gpt testing
wj-Mcat c6b76e9
update gpt configuration
wj-Mcat 7daa40c
Merge branch 'develop' of github.com:PaddlePaddle/PaddleNLP into add-…
wj-Mcat af67ea5
skip gpt-ci
wj-Mcat 6aba70e
fix lint
wj-Mcat 6862118
Update tests/model_zoo/test_gpt.py
wj-Mcat 5a4faa5
update ci-case & config variable name
wj-Mcat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
pretrain: | ||
slow: | ||
model_type: gpt | ||
model_name_or_path: __internal_testing__/gpt | ||
input_dir: ./data | ||
output_dir: ./output_dir/pretrain | ||
weight_decay: 0.01 | ||
max_steps: 2 | ||
save_steps: 10 | ||
warmup_steps: 10 | ||
warmup_ratio: 0.01 | ||
per_device_train_batch_size: 4 | ||
device: cpu | ||
eval_steps: 10 | ||
do_train: true | ||
do_predict: true | ||
|
||
default: | ||
model_type: gpt | ||
model_name_or_path: gpt2-en | ||
warmup_steps: 320000 | ||
warmup_ratio: 0.01 | ||
per_device_train_batch_size: 4 | ||
device: cpu | ||
eval_steps: 100 | ||
do_train: true | ||
do_predict: true | ||
|
||
|
||
msra_ner: | ||
slow: | ||
model_name_or_path: __internal_testing__/gpt_cn | ||
max_seq_length: 32 | ||
per_device_eval_batch_size: 4 | ||
learning_rate: 2e-5 | ||
num_train_epochs: 3 | ||
logging_steps: 25 | ||
save_steps: 250 | ||
output_dir: ./output_dir/msra_ner/ | ||
device: cpu | ||
do_train: true | ||
max_steps: 10 | ||
|
||
default: | ||
model_name_or_path: gpt-cpm-small-cn-distill | ||
max_seq_length: 128 | ||
per_device_eval_batch_size: 32 | ||
learning_rate: 2e-5 | ||
num_train_epochs: 3 | ||
logging_steps: 25 | ||
save_steps: 250 | ||
output_dir: ./tmp/msra_ner/ | ||
device: gpu | ||
do_train: true | ||
|
||
glue: | ||
slow: | ||
model_name_or_path: __internal_testing__/gpt | ||
task_name: SST-2 | ||
max_seq_length: 128 | ||
per_device_train_batch_size: 32 | ||
learning_rate: 2e-5 | ||
num_train_epochs: 3 | ||
logging_steps: 1 | ||
save_steps: 500 | ||
output_dir: ./output_dir/glue | ||
max_steps: 10 | ||
eval_steps: 1 | ||
device: cpu | ||
do_train: true | ||
|
||
default: | ||
model_name_or_path: gpt2-medium-en | ||
task_name: SST-2 | ||
max_seq_length: 128 | ||
per_device_train_batch_size: 32 | ||
learning_rate: 2e-5 | ||
num_train_epochs: 3 | ||
logging_steps: 1 | ||
save_steps: 500 | ||
output_dir: ./output_dir/glue | ||
eval_steps: 1 | ||
device: gpu | ||
do_train: true | ||
|
||
|
||
generation: | ||
slow: | ||
model_type: gpt2 | ||
model_name_or_path: hf-internal-testing/tiny-random-GPT2Model | ||
from_hf_hub: true | ||
|
||
default: | ||
model_type: gpt2-cn | ||
model_name_or_path: gpt-cpm-small-cn-distill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
直接删除吧
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.
我先把gpt 的函数体代码给删掉,这里留一个 todo 让军军去删除其他关联的脚本(免得没删干净导致一些运行时的 bug)