BM-K
commited on
Commit
โข
00729c3
1
Parent(s):
2412c4e
update tokenizer config
Browse files- minilm_test.py +10 -0
- tokenizer_config.json +1 -1
minilm_test.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import AutoTokenizer, AutoModel
|
2 |
+
|
3 |
+
tokenizer = AutoTokenizer.from_pretrained("BM-K/KoMiniLM-68M") # 23M model
|
4 |
+
model = AutoModel.from_pretrained("BM-K/KoMiniLM-68M")
|
5 |
+
|
6 |
+
inputs = tokenizer("์๋
์ธ์์!", return_tensors="pt")
|
7 |
+
outputs = model(**inputs)
|
8 |
+
|
9 |
+
print(outputs)
|
10 |
+
|
tokenizer_config.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"do_lower_case": false, "do_basic_tokenize": true, "never_split": null, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": "/root/.cache/huggingface/transformers/aeaaa3afd086a040be912f92ffe7b5f85008b744624f4517c4216bcc32b51cf0.054ece8d16bd524c8a00f0e8a976c00d5de22a755ffb79e353ee2954d9289e26", "name_or_path": "minilm_klue", "
|
|
|
1 |
+
{"do_lower_case": false, "do_basic_tokenize": true, "never_split": null, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": "/root/.cache/huggingface/transformers/aeaaa3afd086a040be912f92ffe7b5f85008b744624f4517c4216bcc32b51cf0.054ece8d16bd524c8a00f0e8a976c00d5de22a755ffb79e353ee2954d9289e26", "name_or_path": "minilm_klue", "tokenizer_class": "BertTokenizer"}
|