From b53779df761686fd51c812cab01e9b56f77e13b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=91=E9=A9=AC=E5=B0=8F=E7=8C=AB?= <1435130236@qq.com> Date: Mon, 28 Nov 2022 13:33:11 +0800 Subject: [PATCH] community models: fix testing bug (#5678) * update project * update icon and keyword * fix running bug * fix conflict --- .../allenai/macaw-large/introduction_cn.ipynb | 3 ++- .../allenai/macaw-large/introduction_en.ipynb | 3 ++- .../community/allenai/specter/introduction_cn.ipynb | 4 ++-- .../community/allenai/specter/introduction_en.ipynb | 4 ++-- .../ms-marco-MiniLM-L-12-v2/introduction_cn.ipynb | 4 ++-- .../ms-marco-MiniLM-L-12-v2/introduction_en.ipynb | 4 ++-- .../ms-marco-TinyBERT-L-2/introduction_cn.ipynb | 10 +++++++--- .../ms-marco-TinyBERT-L-2/introduction_en.ipynb | 10 +++++++--- .../nli-MiniLM2-L6-H768/introduction_cn.ipynb | 4 ++-- .../nli-MiniLM2-L6-H768/introduction_en.ipynb | 4 ++-- .../stsb-TinyBERT-L-4/introduction_cn.ipynb | 4 ++-- .../stsb-TinyBERT-L-4/introduction_en.ipynb | 4 ++-- .../Bio_ClinicalBERT/introduction_cn.ipynb | 4 ++-- .../Bio_ClinicalBERT/introduction_en.ipynb | 4 ++-- .../google/t5-base-lm-adapt/introduction_cn.ipynb | 3 ++- .../google/t5-base-lm-adapt/introduction_en.ipynb | 3 ++- .../google/t5-large-lm-adapt/introduction_cn.ipynb | 3 ++- .../google/t5-large-lm-adapt/introduction_en.ipynb | 3 ++- .../google/t5-small-lm-adapt/introduction_cn.ipynb | 3 ++- .../google/t5-small-lm-adapt/introduction_en.ipynb | 3 ++- .../google/t5-v1_1-base/introduction_cn.ipynb | 3 ++- .../google/t5-v1_1-base/introduction_en.ipynb | 3 ++- .../google/t5-v1_1-large/introduction_cn.ipynb | 3 ++- .../google/t5-v1_1-large/introduction_en.ipynb | 3 ++- .../google/t5-v1_1-small/introduction_cn.ipynb | 3 ++- .../google/t5-v1_1-small/introduction_en.ipynb | 3 ++- 26 files changed, 62 insertions(+), 40 deletions(-) diff --git a/modelcenter/community/allenai/macaw-large/introduction_cn.ipynb b/modelcenter/community/allenai/macaw-large/introduction_cn.ipynb index 905d2152..0a947b84 100644 --- a/modelcenter/community/allenai/macaw-large/introduction_cn.ipynb +++ b/modelcenter/community/allenai/macaw-large/introduction_cn.ipynb @@ -53,7 +53,8 @@ "\n", "model = AutoModel.from_pretrained(\"allenai/macaw-large\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/allenai/macaw-large/introduction_en.ipynb b/modelcenter/community/allenai/macaw-large/introduction_en.ipynb index 440ebda1..3cf34027 100644 --- a/modelcenter/community/allenai/macaw-large/introduction_en.ipynb +++ b/modelcenter/community/allenai/macaw-large/introduction_en.ipynb @@ -53,7 +53,8 @@ "\n", "model = AutoModel.from_pretrained(\"allenai/macaw-large\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/allenai/specter/introduction_cn.ipynb b/modelcenter/community/allenai/specter/introduction_cn.ipynb index 32ced08c..53c1a209 100644 --- a/modelcenter/community/allenai/specter/introduction_cn.ipynb +++ b/modelcenter/community/allenai/specter/introduction_cn.ipynb @@ -44,9 +44,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertModel\n", "\n", - "model = AutoModel.from_pretrained(\"allenai/specter\")\n", + "model = BertModel.from_pretrained(\"allenai/specter\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/allenai/specter/introduction_en.ipynb b/modelcenter/community/allenai/specter/introduction_en.ipynb index a77c6968..c210f335 100644 --- a/modelcenter/community/allenai/specter/introduction_en.ipynb +++ b/modelcenter/community/allenai/specter/introduction_en.ipynb @@ -44,9 +44,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertModel\n", "\n", - "model = AutoModel.from_pretrained(\"allenai/specter\")\n", + "model = BertModel.from_pretrained(\"allenai/specter\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_cn.ipynb b/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_cn.ipynb index 1f1adfe0..405f5ab5 100644 --- a/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_cn.ipynb +++ b/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_cn.ipynb @@ -50,9 +50,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertForSequenceClassification\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/ms-marco-MiniLM-L-12-v2\")\n", + "model = BertForSequenceClassification.from_pretrained(\"cross-encoder/ms-marco-MiniLM-L-12-v2\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_en.ipynb b/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_en.ipynb index 0389e1e2..6868bfa7 100644 --- a/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_en.ipynb +++ b/modelcenter/community/cross-encoder/ms-marco-MiniLM-L-12-v2/introduction_en.ipynb @@ -50,9 +50,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertForSequenceClassification\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/ms-marco-MiniLM-L-12-v2\")\n", + "model = BertForSequenceClassification.from_pretrained(\"cross-encoder/ms-marco-MiniLM-L-12-v2\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_cn.ipynb b/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_cn.ipynb index 84472703..4ced6196 100644 --- a/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_cn.ipynb +++ b/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_cn.ipynb @@ -50,9 +50,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertModel\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/ms-marco-TinyBERT-L-2\")\n", + "model = BertModel.from_pretrained(\"cross-encoder/ms-marco-TinyBERT-L-2\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] @@ -103,7 +103,11 @@ ] } ], - "metadata": {}, + "metadata": { + "language_info": { + "name": "python" + } + }, "nbformat": 4, "nbformat_minor": 5 } diff --git a/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_en.ipynb b/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_en.ipynb index b3862b25..99f02830 100644 --- a/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_en.ipynb +++ b/modelcenter/community/cross-encoder/ms-marco-TinyBERT-L-2/introduction_en.ipynb @@ -50,9 +50,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertModel\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/ms-marco-TinyBERT-L-2\")\n", + "model = BertModel.from_pretrained(\"cross-encoder/ms-marco-TinyBERT-L-2\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] @@ -103,7 +103,11 @@ ] } ], - "metadata": {}, + "metadata": { + "language_info": { + "name": "python" + } + }, "nbformat": 4, "nbformat_minor": 5 } diff --git a/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_cn.ipynb b/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_cn.ipynb index b7393f4f..8eef3fe3 100644 --- a/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_cn.ipynb +++ b/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_cn.ipynb @@ -61,9 +61,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import RobertaForSequenceClassification\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/nli-MiniLM2-L6-H768\")\n", + "model = RobertaForSequenceClassification.from_pretrained(\"cross-encoder/nli-MiniLM2-L6-H768\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_en.ipynb b/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_en.ipynb index c62c2aff..859faaee 100644 --- a/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_en.ipynb +++ b/modelcenter/community/cross-encoder/nli-MiniLM2-L6-H768/introduction_en.ipynb @@ -61,9 +61,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import RobertaForSequenceClassification\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/nli-MiniLM2-L6-H768\")\n", + "model = RobertaForSequenceClassification.from_pretrained(\"cross-encoder/nli-MiniLM2-L6-H768\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_cn.ipynb b/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_cn.ipynb index 53b39a12..52c0e0e4 100644 --- a/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_cn.ipynb +++ b/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_cn.ipynb @@ -156,9 +156,9 @@ ], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertForSequenceClassification\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/stsb-TinyBERT-L-4\")\n", + "model = BertForSequenceClassification.from_pretrained(\"cross-encoder/stsb-TinyBERT-L-4\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_en.ipynb b/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_en.ipynb index 0183f00b..4a4c4259 100644 --- a/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_en.ipynb +++ b/modelcenter/community/cross-encoder/stsb-TinyBERT-L-4/introduction_en.ipynb @@ -52,9 +52,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertForSequenceClassification\n", "\n", - "model = AutoModel.from_pretrained(\"cross-encoder/stsb-TinyBERT-L-4\")\n", + "model = BertForSequenceClassification.from_pretrained(\"cross-encoder/stsb-TinyBERT-L-4\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_cn.ipynb b/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_cn.ipynb index 7064ebfb..46d871dd 100644 --- a/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_cn.ipynb +++ b/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_cn.ipynb @@ -50,9 +50,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertForMaskedLM\n", "\n", - "model = AutoModel.from_pretrained(\"emilyalsentzer/Bio_ClinicalBERT\")\n", + "model = BertForMaskedLM.from_pretrained(\"emilyalsentzer/Bio_ClinicalBERT\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_en.ipynb b/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_en.ipynb index fab51acf..faab51f8 100644 --- a/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_en.ipynb +++ b/modelcenter/community/emilyalsentzer/Bio_ClinicalBERT/introduction_en.ipynb @@ -50,9 +50,9 @@ "outputs": [], "source": [ "import paddle\n", - "from paddlenlp.transformers import AutoModel\n", + "from paddlenlp.transformers import BertForMaskedLM\n", "\n", - "model = AutoModel.from_pretrained(\"emilyalsentzer/Bio_ClinicalBERT\")\n", + "model = BertForMaskedLM.from_pretrained(\"emilyalsentzer/Bio_ClinicalBERT\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", "print(model(input_ids))" ] diff --git a/modelcenter/community/google/t5-base-lm-adapt/introduction_cn.ipynb b/modelcenter/community/google/t5-base-lm-adapt/introduction_cn.ipynb index 8e4a107f..8f6246a2 100644 --- a/modelcenter/community/google/t5-base-lm-adapt/introduction_cn.ipynb +++ b/modelcenter/community/google/t5-base-lm-adapt/introduction_cn.ipynb @@ -66,7 +66,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-base-lm-adapt\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-base-lm-adapt/introduction_en.ipynb b/modelcenter/community/google/t5-base-lm-adapt/introduction_en.ipynb index c1a17778..adf7431e 100644 --- a/modelcenter/community/google/t5-base-lm-adapt/introduction_en.ipynb +++ b/modelcenter/community/google/t5-base-lm-adapt/introduction_en.ipynb @@ -66,7 +66,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-base-lm-adapt\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-large-lm-adapt/introduction_cn.ipynb b/modelcenter/community/google/t5-large-lm-adapt/introduction_cn.ipynb index ce6a76d6..b554bc5d 100644 --- a/modelcenter/community/google/t5-large-lm-adapt/introduction_cn.ipynb +++ b/modelcenter/community/google/t5-large-lm-adapt/introduction_cn.ipynb @@ -74,7 +74,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-large-lm-adapt\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-large-lm-adapt/introduction_en.ipynb b/modelcenter/community/google/t5-large-lm-adapt/introduction_en.ipynb index fdc71cd1..ce7308d4 100644 --- a/modelcenter/community/google/t5-large-lm-adapt/introduction_en.ipynb +++ b/modelcenter/community/google/t5-large-lm-adapt/introduction_en.ipynb @@ -74,7 +74,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-large-lm-adapt\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-small-lm-adapt/introduction_cn.ipynb b/modelcenter/community/google/t5-small-lm-adapt/introduction_cn.ipynb index 641edd7a..01dac05e 100644 --- a/modelcenter/community/google/t5-small-lm-adapt/introduction_cn.ipynb +++ b/modelcenter/community/google/t5-small-lm-adapt/introduction_cn.ipynb @@ -74,7 +74,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-small-lm-adapt\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-small-lm-adapt/introduction_en.ipynb b/modelcenter/community/google/t5-small-lm-adapt/introduction_en.ipynb index 21c1e824..d4ed2c5a 100644 --- a/modelcenter/community/google/t5-small-lm-adapt/introduction_en.ipynb +++ b/modelcenter/community/google/t5-small-lm-adapt/introduction_en.ipynb @@ -74,7 +74,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-small-lm-adapt\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-v1_1-base/introduction_cn.ipynb b/modelcenter/community/google/t5-v1_1-base/introduction_cn.ipynb index fb4d969a..c8018971 100644 --- a/modelcenter/community/google/t5-v1_1-base/introduction_cn.ipynb +++ b/modelcenter/community/google/t5-v1_1-base/introduction_cn.ipynb @@ -65,7 +65,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-v1_1-base\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-v1_1-base/introduction_en.ipynb b/modelcenter/community/google/t5-v1_1-base/introduction_en.ipynb index 4084d70f..efd5de43 100644 --- a/modelcenter/community/google/t5-v1_1-base/introduction_en.ipynb +++ b/modelcenter/community/google/t5-v1_1-base/introduction_en.ipynb @@ -65,7 +65,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-v1_1-base\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-v1_1-large/introduction_cn.ipynb b/modelcenter/community/google/t5-v1_1-large/introduction_cn.ipynb index 1ad787e7..06ece433 100644 --- a/modelcenter/community/google/t5-v1_1-large/introduction_cn.ipynb +++ b/modelcenter/community/google/t5-v1_1-large/introduction_cn.ipynb @@ -65,7 +65,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-v1_1-large\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-v1_1-large/introduction_en.ipynb b/modelcenter/community/google/t5-v1_1-large/introduction_en.ipynb index 4efcfb2f..8cf2ec83 100644 --- a/modelcenter/community/google/t5-v1_1-large/introduction_en.ipynb +++ b/modelcenter/community/google/t5-v1_1-large/introduction_en.ipynb @@ -65,7 +65,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-v1_1-large\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-v1_1-small/introduction_cn.ipynb b/modelcenter/community/google/t5-v1_1-small/introduction_cn.ipynb index ebcc34ea..68386d8f 100644 --- a/modelcenter/community/google/t5-v1_1-small/introduction_cn.ipynb +++ b/modelcenter/community/google/t5-v1_1-small/introduction_cn.ipynb @@ -67,7 +67,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-v1_1-small\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { diff --git a/modelcenter/community/google/t5-v1_1-small/introduction_en.ipynb b/modelcenter/community/google/t5-v1_1-small/introduction_en.ipynb index e89ecb34..a7eb5dc0 100644 --- a/modelcenter/community/google/t5-v1_1-small/introduction_en.ipynb +++ b/modelcenter/community/google/t5-v1_1-small/introduction_en.ipynb @@ -67,7 +67,8 @@ "\n", "model = AutoModel.from_pretrained(\"google/t5-v1_1-small\")\n", "input_ids = paddle.randint(100, 200, shape=[1, 20])\n", - "print(model(input_ids))" + "decoder_input_ids = paddle.randint(100, 200, shape=[1, 20])\n", + "print(model(input_ids, decoder_input_ids=decoder_input_ids))" ] }, { -- GitLab