From 7ee5c0a20f2355255bcdaff8ed3569f071ab8e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=86=A0=E5=8D=9A?= Date: Tue, 7 Mar 2023 16:03:09 +0800 Subject: [PATCH 1/2] adjust model path --- nlp/question_answering/bert/pytorch/run.sh | 2 +- nlp/question_answering/bert/pytorch/run_dist.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nlp/question_answering/bert/pytorch/run.sh b/nlp/question_answering/bert/pytorch/run.sh index cf87d4c6..a5f835d2 100644 --- a/nlp/question_answering/bert/pytorch/run.sh +++ b/nlp/question_answering/bert/pytorch/run.sh @@ -1,5 +1,5 @@ python3 run_qa.py \ - --model_name_or_path "/home/data/bert/bert-base-uncased-pt" \ + --model_name_or_path bert-base-uncased \ --dataset_name squad \ --do_train \ --do_eval \ diff --git a/nlp/question_answering/bert/pytorch/run_dist.sh b/nlp/question_answering/bert/pytorch/run_dist.sh index efc59ad4..9e834acf 100644 --- a/nlp/question_answering/bert/pytorch/run_dist.sh +++ b/nlp/question_answering/bert/pytorch/run_dist.sh @@ -1,6 +1,6 @@ python3 -m torch.distributed.launch --nproc_per_node=8 --master_port 12333 \ run_qa.py \ - --model_name_or_path "/home/data/bert/bert-base-uncased-pt" \ + --model_name_or_path bert-base-uncased \ --dataset_name squad \ --do_train \ --do_eval \ -- Gitee From 01aa82ebdef65a029bbabe2b6e1720432373801d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=86=A0=E5=8D=9A?= Date: Thu, 9 Mar 2023 16:42:42 +0800 Subject: [PATCH 2/2] add License --- nlp/question_answering/bert/pytorch/run.sh | 18 +++++++++++++++++- .../bert/pytorch/run_dist.sh | 17 ++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/nlp/question_answering/bert/pytorch/run.sh b/nlp/question_answering/bert/pytorch/run.sh index a5f835d2..921bd2e3 100644 --- a/nlp/question_answering/bert/pytorch/run.sh +++ b/nlp/question_answering/bert/pytorch/run.sh @@ -1,3 +1,19 @@ +# Copyright (c) 2023, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# 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. + + python3 run_qa.py \ --model_name_or_path bert-base-uncased \ --dataset_name squad \ @@ -8,4 +24,4 @@ python3 run_qa.py \ --num_train_epochs 2 \ --max_seq_length 384 \ --doc_stride 128 \ - --output_dir /tmp/debug_squad/ \ No newline at end of file + --output_dir /tmp/debug_squad/ diff --git a/nlp/question_answering/bert/pytorch/run_dist.sh b/nlp/question_answering/bert/pytorch/run_dist.sh index 9e834acf..4bc50336 100644 --- a/nlp/question_answering/bert/pytorch/run_dist.sh +++ b/nlp/question_answering/bert/pytorch/run_dist.sh @@ -1,3 +1,18 @@ +# Copyright (c) 2023, Shanghai Iluvatar CoreX Semiconductor Co., Ltd. +# 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. + python3 -m torch.distributed.launch --nproc_per_node=8 --master_port 12333 \ run_qa.py \ --model_name_or_path bert-base-uncased \ @@ -9,4 +24,4 @@ python3 -m torch.distributed.launch --nproc_per_node=8 --master_port 12333 \ --num_train_epochs 2 \ --max_seq_length 384 \ --doc_stride 128 \ - --output_dir /tmp/debug_squad/ \ No newline at end of file + --output_dir /tmp/debug_squad/ -- Gitee