Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +358 -3
- config.json +25 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +55 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 384,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": true,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": false,
|
| 9 |
+
"include_prompt": true
|
| 10 |
+
}
|
README.md
CHANGED
|
@@ -1,3 +1,358 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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| 4 |
+
- af
|
| 5 |
+
- am
|
| 6 |
+
- ar
|
| 7 |
+
- as
|
| 8 |
+
- az
|
| 9 |
+
- be
|
| 10 |
+
- bg
|
| 11 |
+
- bn
|
| 12 |
+
- br
|
| 13 |
+
- bs
|
| 14 |
+
- ca
|
| 15 |
+
- cs
|
| 16 |
+
- cy
|
| 17 |
+
- da
|
| 18 |
+
- de
|
| 19 |
+
- el
|
| 20 |
+
- en
|
| 21 |
+
- eo
|
| 22 |
+
- es
|
| 23 |
+
- et
|
| 24 |
+
- eu
|
| 25 |
+
- fa
|
| 26 |
+
- fi
|
| 27 |
+
- fr
|
| 28 |
+
- fy
|
| 29 |
+
- ga
|
| 30 |
+
- gd
|
| 31 |
+
- gl
|
| 32 |
+
- gu
|
| 33 |
+
- ha
|
| 34 |
+
- he
|
| 35 |
+
- hi
|
| 36 |
+
- hr
|
| 37 |
+
- hu
|
| 38 |
+
- hy
|
| 39 |
+
- id
|
| 40 |
+
- is
|
| 41 |
+
- it
|
| 42 |
+
- ja
|
| 43 |
+
- jv
|
| 44 |
+
- ka
|
| 45 |
+
- kk
|
| 46 |
+
- km
|
| 47 |
+
- kn
|
| 48 |
+
- ko
|
| 49 |
+
- ku
|
| 50 |
+
- ky
|
| 51 |
+
- la
|
| 52 |
+
- lo
|
| 53 |
+
- lt
|
| 54 |
+
- lv
|
| 55 |
+
- mg
|
| 56 |
+
- mk
|
| 57 |
+
- ml
|
| 58 |
+
- mn
|
| 59 |
+
- mr
|
| 60 |
+
- ms
|
| 61 |
+
- my
|
| 62 |
+
- ne
|
| 63 |
+
- nl
|
| 64 |
+
- 'no'
|
| 65 |
+
- om
|
| 66 |
+
- or
|
| 67 |
+
- pa
|
| 68 |
+
- pl
|
| 69 |
+
- ps
|
| 70 |
+
- pt
|
| 71 |
+
- ro
|
| 72 |
+
- ru
|
| 73 |
+
- sa
|
| 74 |
+
- sd
|
| 75 |
+
- si
|
| 76 |
+
- sk
|
| 77 |
+
- sl
|
| 78 |
+
- so
|
| 79 |
+
- sq
|
| 80 |
+
- sr
|
| 81 |
+
- su
|
| 82 |
+
- sv
|
| 83 |
+
- sw
|
| 84 |
+
- ta
|
| 85 |
+
- te
|
| 86 |
+
- th
|
| 87 |
+
- tl
|
| 88 |
+
- tr
|
| 89 |
+
- ug
|
| 90 |
+
- uk
|
| 91 |
+
- ur
|
| 92 |
+
- uz
|
| 93 |
+
- vi
|
| 94 |
+
- xh
|
| 95 |
+
- yi
|
| 96 |
+
- zh
|
| 97 |
+
license: mit
|
| 98 |
+
library_name: sentence-transformers
|
| 99 |
+
tags:
|
| 100 |
+
- korean
|
| 101 |
+
- sentence-transformers
|
| 102 |
+
- transformers
|
| 103 |
+
- multilingual
|
| 104 |
+
- sentence-transformers
|
| 105 |
+
- sentence-similarity
|
| 106 |
+
- feature-extraction
|
| 107 |
+
base_model: intfloat/multilingual-e5-small
|
| 108 |
+
datasets: []
|
| 109 |
+
metrics:
|
| 110 |
+
- pearson_cosine
|
| 111 |
+
- spearman_cosine
|
| 112 |
+
- pearson_manhattan
|
| 113 |
+
- spearman_manhattan
|
| 114 |
+
- pearson_euclidean
|
| 115 |
+
- spearman_euclidean
|
| 116 |
+
- pearson_dot
|
| 117 |
+
- spearman_dot
|
| 118 |
+
- pearson_max
|
| 119 |
+
- spearman_max
|
| 120 |
+
widget:
|
| 121 |
+
- source_sentence: 이집트 군대가 형제애를 단속하다
|
| 122 |
+
sentences:
|
| 123 |
+
- 이집트의 군대가 무슬림 형제애를 단속하다
|
| 124 |
+
- 아르헨티나의 기예르모 코리아와 네덜란드의 마틴 버커크의 또 다른 준결승전도 매력적이다.
|
| 125 |
+
- 그것이 사실일 수도 있다고 생각하는 것은 재미있다.
|
| 126 |
+
- source_sentence: 오, 그리고 다시 결혼은 근본적인 인권이라고 주장한다.
|
| 127 |
+
sentences:
|
| 128 |
+
- 특히 결혼은 근본적인 인권이라고 말한 후에.
|
| 129 |
+
- 해변에 있는 흑인과 그의 개...
|
| 130 |
+
- 이란은 핵 프로그램이 평화적인 목적을 위한 것이라고 주장한다
|
| 131 |
+
- source_sentence: 한 소년이 파란 플라스틱 슬라이드 위에서 뛰어내린다.
|
| 132 |
+
sentences:
|
| 133 |
+
- 아이들이 놀고 있다
|
| 134 |
+
- 한 소년이 빨간 플라스틱 사다리 꼭대기에서 뛰어내린다.
|
| 135 |
+
- 슬라이드가 있다.
|
| 136 |
+
- source_sentence: 감각주의자들은 일부러 오르가즘 없이 섹스를 한다. 그녀는 촛불을 좋아하고, 몸에 기름을 바른 히보스에 대해 쓰고
|
| 137 |
+
있다.
|
| 138 |
+
sentences:
|
| 139 |
+
- 감각주의자들은 섹스하는 동안 오르가즘을 느끼고 싶어한다.
|
| 140 |
+
- 하지만 밤마다 드로잉을 하는 것보다 전국적으로 방송되는 대질심문을 하는 것이 훨씬 더 힘든 일이다, 그래서 미스.
|
| 141 |
+
- 감각주의자들은 일부러 오르가즘 없이 섹스를 한다.
|
| 142 |
+
- source_sentence: 조지 샤힌은 안데르센 컨설팅 사업부에서 일했다.
|
| 143 |
+
sentences:
|
| 144 |
+
- 심장 박동이 빨라졌다.
|
| 145 |
+
- 안데르센 컨설팅은 여전히 번창하는 사업이다.
|
| 146 |
+
- 이것은 내가 영국의 아서 안데르센 사업부의 파트너인 짐 와디아를 아서 안데르센 경영진이 선택한 것보다 래리 웨인바흐를 안데르센 월드와이드의
|
| 147 |
+
경영 파트너로 승계하기 위해 안데르센 컨설팅 사업부(현재의 엑센츄어라고 알려져 있음)의 전 관리 파트너인 조지 샤힌에 대한 지지를 표명했을
|
| 148 |
+
때 가장 명백했다.
|
| 149 |
+
pipeline_tag: sentence-similarity
|
| 150 |
+
model-index:
|
| 151 |
+
- name: upskyy/e5-small-korean
|
| 152 |
+
results:
|
| 153 |
+
- task:
|
| 154 |
+
type: semantic-similarity
|
| 155 |
+
name: Semantic Similarity
|
| 156 |
+
dataset:
|
| 157 |
+
name: sts dev
|
| 158 |
+
type: sts-dev
|
| 159 |
+
metrics:
|
| 160 |
+
- type: pearson_cosine
|
| 161 |
+
value: 0.8479945412588525
|
| 162 |
+
name: Pearson Cosine
|
| 163 |
+
- type: spearman_cosine
|
| 164 |
+
value: 0.8466656037931976
|
| 165 |
+
name: Spearman Cosine
|
| 166 |
+
- type: pearson_manhattan
|
| 167 |
+
value: 0.8309207821128262
|
| 168 |
+
name: Pearson Manhattan
|
| 169 |
+
- type: spearman_manhattan
|
| 170 |
+
value: 0.8372540023545114
|
| 171 |
+
name: Spearman Manhattan
|
| 172 |
+
- type: pearson_euclidean
|
| 173 |
+
value: 0.8328087877425099
|
| 174 |
+
name: Pearson Euclidean
|
| 175 |
+
- type: spearman_euclidean
|
| 176 |
+
value: 0.8395342346643203
|
| 177 |
+
name: Spearman Euclidean
|
| 178 |
+
- type: pearson_dot
|
| 179 |
+
value: 0.8212157223150336
|
| 180 |
+
name: Pearson Dot
|
| 181 |
+
- type: spearman_dot
|
| 182 |
+
value: 0.8225569441483638
|
| 183 |
+
name: Spearman Dot
|
| 184 |
+
- type: pearson_max
|
| 185 |
+
value: 0.8479945412588525
|
| 186 |
+
name: Pearson Max
|
| 187 |
+
- type: spearman_max
|
| 188 |
+
value: 0.8466656037931976
|
| 189 |
+
name: Spearman Max
|
| 190 |
+
---
|
| 191 |
+
|
| 192 |
+
# SentenceTransformer based on intfloat/multilingual-e5-small
|
| 193 |
+
|
| 194 |
+
This model is korsts and kornli finetuning model from [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 195 |
+
|
| 196 |
+
## Model Details
|
| 197 |
+
|
| 198 |
+
### Model Description
|
| 199 |
+
- **Model Type:** Sentence Transformer
|
| 200 |
+
- **Base model:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) <!-- at revision fd1525a9fd15316a2d503bf26ab031a61d056e98 -->
|
| 201 |
+
- **Maximum Sequence Length:** 512 tokens
|
| 202 |
+
- **Output Dimensionality:** 384 tokens
|
| 203 |
+
- **Similarity Function:** Cosine Similarity
|
| 204 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 205 |
+
<!-- - **Language:** Unknown -->
|
| 206 |
+
<!-- - **License:** Unknown -->
|
| 207 |
+
|
| 208 |
+
### Full Model Architecture
|
| 209 |
+
|
| 210 |
+
```
|
| 211 |
+
SentenceTransformer(
|
| 212 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
| 213 |
+
(1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
| 214 |
+
)
|
| 215 |
+
```
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
## Usage
|
| 219 |
+
|
| 220 |
+
### Usage (Sentence-Transformers)
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
First install the Sentence Transformers library:
|
| 224 |
+
|
| 225 |
+
```bash
|
| 226 |
+
pip install -U sentence-transformers
|
| 227 |
+
```
|
| 228 |
+
|
| 229 |
+
Then you can load this model and run inference.
|
| 230 |
+
```python
|
| 231 |
+
from sentence_transformers import SentenceTransformer
|
| 232 |
+
|
| 233 |
+
# Download from the 🤗 Hub
|
| 234 |
+
model = SentenceTransformer("upskyy/e5-small-korean")
|
| 235 |
+
|
| 236 |
+
# Run inference
|
| 237 |
+
sentences = [
|
| 238 |
+
'아이를 가진 엄마가 해변을 걷는다.',
|
| 239 |
+
'두 사람이 해변을 걷는다.',
|
| 240 |
+
'한 남자가 해변에서 개를 산책시킨다.',
|
| 241 |
+
]
|
| 242 |
+
embeddings = model.encode(sentences)
|
| 243 |
+
print(embeddings.shape)
|
| 244 |
+
# [3, 384]
|
| 245 |
+
|
| 246 |
+
# Get the similarity scores for the embeddings
|
| 247 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 248 |
+
print(similarities.shape)
|
| 249 |
+
# [3, 3]
|
| 250 |
+
```
|
| 251 |
+
|
| 252 |
+
### Usage (HuggingFace Transformers)
|
| 253 |
+
|
| 254 |
+
Without sentence-transformers, you can use the model like this:
|
| 255 |
+
First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
|
| 256 |
+
|
| 257 |
+
```python
|
| 258 |
+
from transformers import AutoTokenizer, AutoModel
|
| 259 |
+
import torch
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
# Mean Pooling - Take attention mask into account for correct averaging
|
| 263 |
+
def mean_pooling(model_output, attention_mask):
|
| 264 |
+
token_embeddings = model_output[0] # First element of model_output contains all token embeddings
|
| 265 |
+
input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
|
| 266 |
+
return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
# Sentences we want sentence embeddings for
|
| 270 |
+
sentences = ["안녕하세요?", "한국어 문장 임베딩을 위한 버트 모델입니다."]
|
| 271 |
+
|
| 272 |
+
# Load model from HuggingFace Hub
|
| 273 |
+
tokenizer = AutoTokenizer.from_pretrained("upskyy/e5-small-korean")
|
| 274 |
+
model = AutoModel.from_pretrained("upskyy/e5-small-korean")
|
| 275 |
+
|
| 276 |
+
# Tokenize sentences
|
| 277 |
+
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
|
| 278 |
+
|
| 279 |
+
# Compute token embeddings
|
| 280 |
+
with torch.no_grad():
|
| 281 |
+
model_output = model(**encoded_input)
|
| 282 |
+
|
| 283 |
+
# Perform pooling. In this case, mean pooling.
|
| 284 |
+
sentence_embeddings = mean_pooling(model_output, encoded_input["attention_mask"])
|
| 285 |
+
|
| 286 |
+
print("Sentence embeddings:")
|
| 287 |
+
print(sentence_embeddings)
|
| 288 |
+
```
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
## Evaluation
|
| 292 |
+
|
| 293 |
+
### Metrics
|
| 294 |
+
|
| 295 |
+
#### Semantic Similarity
|
| 296 |
+
* Dataset: `sts-dev`
|
| 297 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
| 298 |
+
|
| 299 |
+
| Metric | Value |
|
| 300 |
+
| :----------------- | :--------- |
|
| 301 |
+
| pearson_cosine | 0.848 |
|
| 302 |
+
| spearman_cosine | 0.8467 |
|
| 303 |
+
| pearson_manhattan | 0.8309 |
|
| 304 |
+
| spearman_manhattan | 0.8373 |
|
| 305 |
+
| pearson_euclidean | 0.8328 |
|
| 306 |
+
| spearman_euclidean | 0.8395 |
|
| 307 |
+
| pearson_dot | 0.8212 |
|
| 308 |
+
| spearman_dot | 0.8226 |
|
| 309 |
+
| **pearson_max** | **0.848** |
|
| 310 |
+
| **spearman_max** | **0.8467** |
|
| 311 |
+
|
| 312 |
+
<!--
|
| 313 |
+
## Bias, Risks and Limitations
|
| 314 |
+
|
| 315 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 316 |
+
-->
|
| 317 |
+
|
| 318 |
+
<!--
|
| 319 |
+
### Recommendations
|
| 320 |
+
|
| 321 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 322 |
+
-->
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
### Framework Versions
|
| 327 |
+
- Python: 3.10.13
|
| 328 |
+
- Sentence Transformers: 3.0.1
|
| 329 |
+
- Transformers: 4.42.4
|
| 330 |
+
- PyTorch: 2.3.0+cu121
|
| 331 |
+
- Accelerate: 0.30.1
|
| 332 |
+
- Datasets: 2.16.1
|
| 333 |
+
- Tokenizers: 0.19.1
|
| 334 |
+
|
| 335 |
+
## Citation
|
| 336 |
+
|
| 337 |
+
### BibTeX
|
| 338 |
+
|
| 339 |
+
```bibtex
|
| 340 |
+
@article{wang2024multilingual,
|
| 341 |
+
title={Multilingual E5 Text Embeddings: A Technical Report},
|
| 342 |
+
author={Wang, Liang and Yang, Nan and Huang, Xiaolong and Yang, Linjun and Majumder, Rangan and Wei, Furu},
|
| 343 |
+
journal={arXiv preprint arXiv:2402.05672},
|
| 344 |
+
year={2024}
|
| 345 |
+
}
|
| 346 |
+
```
|
| 347 |
+
|
| 348 |
+
```bibtex
|
| 349 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 350 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 351 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 352 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 353 |
+
month = "11",
|
| 354 |
+
year = "2019",
|
| 355 |
+
publisher = "Association for Computational Linguistics",
|
| 356 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 357 |
+
}
|
| 358 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"hidden_act": "gelu",
|
| 8 |
+
"hidden_dropout_prob": 0.1,
|
| 9 |
+
"hidden_size": 384,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 1536,
|
| 12 |
+
"layer_norm_eps": 1e-12,
|
| 13 |
+
"max_position_embeddings": 512,
|
| 14 |
+
"model_type": "bert",
|
| 15 |
+
"num_attention_heads": 12,
|
| 16 |
+
"num_hidden_layers": 12,
|
| 17 |
+
"pad_token_id": 0,
|
| 18 |
+
"position_embedding_type": "absolute",
|
| 19 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 20 |
+
"torch_dtype": "float32",
|
| 21 |
+
"transformers_version": "4.42.4",
|
| 22 |
+
"type_vocab_size": 2,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 250037
|
| 25 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8014bb534e1618ce4d80b4dd29b1553665169cec216113b8839f10dfa5a83a5
|
| 3 |
+
size 470637416
|
modules.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
}
|
| 14 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 512,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
sentencepiece.bpe.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
| 3 |
+
size 5069051
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "<pad>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "<unk>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef04f2b385d1514f500e779207ace0f53e30895ce37563179e29f4022d28ca38
|
| 3 |
+
size 17083053
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<pad>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"250001": {
|
| 36 |
+
"content": "<mask>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"bos_token": "<s>",
|
| 45 |
+
"clean_up_tokenization_spaces": true,
|
| 46 |
+
"cls_token": "<s>",
|
| 47 |
+
"eos_token": "</s>",
|
| 48 |
+
"mask_token": "<mask>",
|
| 49 |
+
"model_max_length": 512,
|
| 50 |
+
"pad_token": "<pad>",
|
| 51 |
+
"sep_token": "</s>",
|
| 52 |
+
"sp_model_kwargs": {},
|
| 53 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
| 54 |
+
"unk_token": "<unk>"
|
| 55 |
+
}
|