Skip to content

Commit c612049

Browse files
authored
Update url (#1452)
1 parent 583f724 commit c612049

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

paddlenlp/transformers/squeezebert/modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class SqueezeBertPreTrainedModel(PretrainedModel):
412412
"""
413413

414414
base_model_prefix = "squeezebert"
415-
model__file = "model_json"
415+
model_config_file = "model_config.json"
416416

417417
pretrained_init_configuration = {
418418
"squeezebert-uncased": {

paddlenlp/transformers/squeezebert/tokenizer.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class SqueezeBertTokenizer(PretrainedTokenizer):
2525
Constructs a SqueezeBert tokenizer. It uses a basic tokenizer to do punctuation
2626
splitting, lower casing and so on, and follows a WordPiece tokenizer to
2727
tokenize as subwords.
28+
2829
Args:
2930
vocab_file (str): file path of the vocabulary
3031
do_lower_case (bool): Whether the text strips accents and convert to
@@ -35,6 +36,7 @@ class SqueezeBertTokenizer(PretrainedTokenizer):
3536
pad_token (str): The special token for padding. Default: "[PAD]".
3637
cls_token (str): The special token for cls. Default: "[CLS]".
3738
mask_token (str): The special token for mask. Default: "[MASK]".
39+
3840
Examples:
3941
.. code-block:: python
4042
from paddlenlp.transformers import SqueezeBertTokenizer
@@ -47,9 +49,12 @@ class SqueezeBertTokenizer(PretrainedTokenizer):
4749
resource_files_names = {"vocab_file": "vocab.txt"} # for save_pretrained
4850
pretrained_resource_files_map = {
4951
"vocab_file": {
50-
"squeezebert-uncased": "squeezebert-uncased-vocab.txt",
51-
"squeezebert-mnli": "squeezebert-mnli-vocab.txt",
52-
"queezebert-mnli-headless": "queezebert-mnli-headless-vocab.txt",
52+
"squeezebert-uncased":
53+
"http://bj.bcebos.com/paddlenlp/models/transformers/squeezebert/squeezebert-uncased/vocab.txt",
54+
"squeezebert-mnli":
55+
"http://bj.bcebos.com/paddlenlp/models/transformers/squeezebert/squeezebert-mnli/vocab.txt",
56+
"squeezebert-mnli-headless":
57+
"http://bj.bcebos.com/paddlenlp/models/transformers/squeezebert/squeezebert-mnli-headless/vocab.txt",
5358
}
5459
}
5560
pretrained_init_configuration = {
@@ -59,7 +64,7 @@ class SqueezeBertTokenizer(PretrainedTokenizer):
5964
"squeezebert-mnli": {
6065
"do_lower_case": True
6166
},
62-
"queezebert-mnli-headless": {
67+
"squeezebert-mnli-headless": {
6368
"do_lower_case": True
6469
}
6570
}

0 commit comments

Comments
 (0)