rahulydc zc277584121 commited on
Commit
217b7cb
·
0 Parent(s):

Duplicate from zilliz/semantic-highlight-bilingual-v1

Browse files

Co-authored-by: Cheney Zhang <zc277584121@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
README.md ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - zh
5
+ - en
6
+ metrics:
7
+ - f1
8
+ base_model:
9
+ - BAAI/bge-reranker-v2-m3
10
+ tags:
11
+ - RAG
12
+ - highlight
13
+ - context-pruning
14
+ - context-engineering
15
+ - semantic-highlight
16
+ datasets:
17
+ - zilliz/msmarco-context-relevance-with-think
18
+ - zilliz/natural_questions-context-relevance-with-think
19
+ - zilliz/gooaq-context-relevance-130k-context-relevance-with-think
20
+ - zilliz/wikipedia_zh_cn_500k-context-relevance-with-think
21
+ - zilliz/mmarco_chinese_200k-context-relevance-with-think
22
+ - zilliz/dureader-context-relevance-with-think
23
+ pipeline_tag: token-classification
24
+ ---
25
+ # Semantic Highlight Bilingual Model
26
+
27
+ ## What is Semantic Highlight?
28
+
29
+ ![Traditional Highlight vs Semantic Highlight](https://zc277584121.github.io/images/highlight-preview/traditional_vs_semantic_highlight.png)
30
+ Traditional search highlighting works by matching keywords. When you search for "iPhone performance" on an e-commerce site, only the words "iPhone" and "performance" get highlighted in the results. But what if the product description says "Powered by A15 Bionic chip, scores over 1 million in benchmarks, smooth performance with no lag"? This clearly answers the performance question, yet nothing gets highlighted because it doesn't contain the exact word "performance".
31
+
32
+ **Semantic Highlight** solves this problem by understanding meaning, not just matching words. It highlights text segments that are semantically relevant to your query, even if they don't contain the exact keywords. This is crucial in RAG (Retrieval-Augmented Generation) scenarios where users need to quickly identify relevant information in long retrieved documents.
33
+
34
+ For more technical details, check out our blog here: https://huggingface.co/blog/zilliz/zilliz-semantic-highlight-model
35
+
36
+ ### Why a Lightweight Model?
37
+
38
+ Highlighting happens on every search query - it needs to be fast and cost-effective. Large language models would be too slow and expensive for this real-time task. This model is designed to be:
39
+ - **Small**: ~0.6B, deployable on standard servers
40
+ - **Fast**: Millisecond-level inference
41
+ - **Accurate**: Trained on context-relevance datasets
42
+
43
+ ## Model Details
44
+
45
+ - **Base Model**: BAAI/bge-reranker-v2-m3
46
+ - **Languages**: Chinese and English
47
+ - **Task**: Context relevance prediction for semantic highlighting, almost the same as context pruning
48
+
49
+ ## Quick Start
50
+
51
+ ### Installation
52
+
53
+ ```bash
54
+ pip install transformers torch
55
+ ```
56
+
57
+ ### Usage
58
+
59
+ #### English Example
60
+
61
+ ```python
62
+ from transformers import AutoModel
63
+
64
+ model = AutoModel.from_pretrained(
65
+ "zilliz/semantic-highlight-bilingual-v1",
66
+ trust_remote_code=True
67
+ )
68
+
69
+ question = "What are the symptoms of dehydration?"
70
+ context = """
71
+ Dehydration occurs when your body loses more fluid than you take in.
72
+ Common signs include feeling thirsty and having a dry mouth.
73
+ The human body is composed of about 60% water.
74
+ Dark yellow urine and infrequent urination are warning signs.
75
+ Water is essential for many bodily functions.
76
+ Dizziness, fatigue, and headaches can indicate severe dehydration.
77
+ Drinking 8 glasses of water daily is often recommended.
78
+ """
79
+
80
+ result = model.process(
81
+ question=question,
82
+ context=context,
83
+ threshold=0.5,
84
+ # language="en", # Language can be auto-detected, or explicitly specified
85
+ return_sentence_metrics=True, # Enable sentence probabilities
86
+ )
87
+
88
+ highlighted = result["highlighted_sentences"]
89
+ print(f"Highlighted {len(highlighted)} sentences:")
90
+ for i, sent in enumerate(highlighted, 1):
91
+ print(f" {i}. {sent}")
92
+ print(f"\nTotal sentences in context: {len(context.strip().split('.')) - 1}")
93
+
94
+ # Print sentence probabilities if available
95
+ if "sentence_probabilities" in result:
96
+ probs = result["sentence_probabilities"]
97
+ print(f"\nSentence probabilities: {probs}")
98
+ ```
99
+
100
+ ```
101
+ Highlighted 3 sentences:
102
+ 1. Common signs include feeling thirsty and having a dry mouth.
103
+
104
+ 2. Dark yellow urine and infrequent urination are warning signs.
105
+
106
+ 3. Dizziness, fatigue, and headaches can indicate severe dehydration.
107
+
108
+
109
+ Total sentences in context: 7
110
+
111
+ Sentence probabilities: [0.01702437922358513, 0.9901671409606934, 0.002306025242432952, 0.9472107887268066, 0.0009636427275836468, 0.9724337458610535, 0.0009910146472975612]
112
+ ```
113
+
114
+ #### Chinese Example
115
+
116
+ ```python
117
+ from transformers import AutoModel
118
+
119
+ model = AutoModel.from_pretrained(
120
+ "zilliz/semantic-highlight-bilingual-v1",
121
+ trust_remote_code=True
122
+ )
123
+
124
+ question = "北京有什么好吃的?"
125
+ context = """
126
+ 北京烤鸭是北京最著名的特色美食,皮酥肉嫩,配上薄饼和甜面酱。
127
+ 故宫是明清两代的皇家宫殿,也是世界上现存规模最大的木质结构古建筑群。
128
+ 炸酱面是北京的传统面食,用黄酱配上黄瓜丝和豆芽菜。
129
+ 长城是中国古代的军事防御工程,绵延数千公里。
130
+ 老北京涮羊肉以铜锅为特色,羊肉鲜嫩,蘸料丰富。
131
+ 天坛是明清两代皇帝祭天的场所,建筑精美。
132
+ 豆汁儿是北京独特的传统小吃,口味特别,配上焦圈最地道。
133
+ 颐和园是清朝的皇家园林,以昆明湖和万寿山为主体。
134
+ """
135
+
136
+ result = model.process(
137
+ question=question,
138
+ context=context,
139
+ threshold=0.5,
140
+ # language="zh", # Language can be auto-detected, or explicitly specified
141
+ return_sentence_metrics=True, # Enable sentence probabilities
142
+ )
143
+
144
+ highlighted = result["highlighted_sentences"]
145
+ print(f"高亮了 {len(highlighted)} 个句子:")
146
+ for i, sent in enumerate(highlighted, 1):
147
+ print(f" {i}. {sent}")
148
+ print(f"\n上下文总句子数: {len([s for s in context.strip().split('。') if s.strip()])}")
149
+
150
+ # Print sentence probabilities if available
151
+ if "sentence_probabilities" in result:
152
+ probs = result["sentence_probabilities"]
153
+ print(f"\n句子概率: {probs}")
154
+ ```
155
+
156
+ ```
157
+ 高亮了 4 个句子:
158
+ 1. 北京烤鸭是北京最著名的特色美食,皮酥肉嫩,配上薄饼和甜面酱。
159
+ 2. 炸酱面是北京的传统面食,用黄酱配上黄瓜丝和豆芽菜。
160
+ 3. 老北京涮羊肉以铜锅为特色,羊肉鲜嫩,蘸料丰富。
161
+ 4. 豆汁儿是北京独特的传统小吃,口味特别,配上焦圈最地道。
162
+
163
+ 上下文总句子数: 8
164
+
165
+ 句子概率: [0.9885324239730835, 0.2653350234031677, 0.9058853983879089, 0.13888002932071686, 0.9659912586212158, 0.39620667695999146, 0.968794584274292, 0.23973196744918823]
166
+ ```
167
+
168
+ ## Parameters
169
+
170
+ - `question`: Query text
171
+ - `context`: Document text to highlight
172
+ - `threshold`: Relevance threshold (0-1), default 0.5. Lower values include more sentences.
173
+ - `language`: Language code ("en", "zh", or "auto"). If not specified, language will be auto-detected.
174
+ - `return_sentence_metrics`: Return per-sentence relevance scores
175
+
176
+ ## Output
177
+
178
+ - `highlighted_sentences`: List of highlighted sentences (relevant sentences only)
179
+ - `compression_rate`: Percentage of text removed
180
+ - `sentence_probabilities`: Relevance score for each sentence (if `return_sentence_metrics=True`)
181
+
182
+ ## How does it work?
183
+ ![semantic-highlight-with-sentence-filter](https://zc277584121.github.io/images/semantic-highlight-released/semantic-highlight-with-sentence-filter.png)
184
+ The input consists of a query and a text passage, and the output is a relevance score for each token position in the text. Token scores are then aggregated into sentence scores, and a threshold is applied to highlight or remove sentences accordingly.
185
+
186
+ Specifically, the model concatenates inputs as `[BOS] + Query + Context`, scores each token in the context (between 0 and 1), averages token scores within each sentence to obtain sentence scores, and finally highlights sentences with high scores while removing those with low scores. The model essentially performs a single pass over the context, using scores to indicate which parts merit attention.
187
+
188
+ ## Evaluation
189
+ ![semantic-highlight-released/model-evaluation-results](https://zc277584121.github.io/images/semantic-highlight-released/model-evaluation-results.png)
190
+ The model ranks SOTA across all four evaluation datasets. Notably, it’s the only model that demonstrates strong performance on both Chinese and English datasets. Other models either support only English or show significant performance degradation on Chinese text.
191
+
192
+ ## Acknowledgments
193
+
194
+ This work draws its core ideas and theoretical underpinnings from Provence (https://arxiv.org/abs/2501.16214), whose seminal research laid the essential groundwork for our exploration.
195
+
196
+ For the practical implementation of code and training strategies, we build entirely upon the exceptional efforts of the Open Provence project (https://github.com/hotchpotch/open_provence). We extend our sincere gratitude to the Open Provence team for generously open-sourcing the complete framework—including the high-quality dataset and toolkit for model training—thus making this valuable resource accessible to the broader research community.
197
+
198
+ This model stands firmly on the shoulders of these foundational contributions, while we have tailored it to better align with specific business needs: we enhanced data generation and training quality for bilingual datasets, and removed the rerank head to optimize its applicability to our use case. Our sincere thanks go to all the researchers and developers behind these remarkable works.
199
+
200
+ ## License
201
+
202
+ MIT License
203
+
204
+ ## Citation
205
+
206
+ ```bibtex
207
+ @misc{chirkova2025provenceefficientrobustcontext,
208
+ title={Provence: efficient and robust context pruning for retrieval-augmented generation},
209
+ author={Nadezhda Chirkova and Thibault Formal and Vassilina Nikoulina and Stéphane Clinchant},
210
+ year={2025},
211
+ eprint={2501.16214},
212
+ archivePrefix={arXiv},
213
+ primaryClass={cs.CL},
214
+ url={https://arxiv.org/abs/2501.16214},
215
+ }
216
+
217
+ @misc{yuichi-tateno-2025-open-provence,
218
+ url = {https://github.com/hotchpotch/open_provence},
219
+ title = {OpenProvence: An Open-Source Implementation of Efficient and Robust Context Pruning for Retrieval-Augmented Generation},
220
+ author = {Yuichi Tateno},
221
+ year = {2025}
222
+ }
223
+
224
+ @misc{chen2024bge,
225
+ title={BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation},
226
+ author={Jianlv Chen and Shitao Xiao and Peitian Zhang and Kun Luo and Defu Lian and Zheng Liu},
227
+ year={2024},
228
+ eprint={2402.03216},
229
+ archivePrefix={arXiv},
230
+ primaryClass={cs.CL}
231
+ }
232
+ ```
233
+
234
+ For more information, check out the blog here: https://huggingface.co/blog/zilliz/zilliz-semantic-highlight-model
config.json ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "OpenProvenceForSequenceClassification"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "modeling_open_provence_standalone.OpenProvenceConfig",
7
+ "AutoModel": "modeling_open_provence_standalone.OpenProvenceForSequenceClassification",
8
+ "AutoModelForSequenceClassification": "modeling_open_provence_standalone.OpenProvenceForSequenceClassification",
9
+ "AutoModelForTokenClassification": "modeling_open_provence_standalone.OpenProvenceForTokenClassification"
10
+ },
11
+ "base_model_config": {
12
+ "_name_or_path": "BAAI/bge-reranker-v2-m3",
13
+ "add_cross_attention": false,
14
+ "architectures": [
15
+ "XLMRobertaForSequenceClassification"
16
+ ],
17
+ "attention_probs_dropout_prob": 0.1,
18
+ "bad_words_ids": null,
19
+ "begin_suppress_tokens": null,
20
+ "bos_token_id": 0,
21
+ "chunk_size_feed_forward": 0,
22
+ "classifier_dropout": null,
23
+ "cross_attention_hidden_size": null,
24
+ "decoder_start_token_id": null,
25
+ "diversity_penalty": 0.0,
26
+ "do_sample": false,
27
+ "dtype": "float32",
28
+ "early_stopping": false,
29
+ "encoder_no_repeat_ngram_size": 0,
30
+ "eos_token_id": 2,
31
+ "exponential_decay_length_penalty": null,
32
+ "finetuning_task": null,
33
+ "forced_bos_token_id": null,
34
+ "forced_eos_token_id": null,
35
+ "hidden_act": "gelu",
36
+ "hidden_dropout_prob": 0.1,
37
+ "hidden_size": 1024,
38
+ "id2label": {
39
+ "0": "LABEL_0"
40
+ },
41
+ "initializer_range": 0.02,
42
+ "intermediate_size": 4096,
43
+ "is_decoder": false,
44
+ "is_encoder_decoder": false,
45
+ "label2id": {
46
+ "LABEL_0": 0
47
+ },
48
+ "layer_norm_eps": 1e-05,
49
+ "length_penalty": 1.0,
50
+ "max_length": 20,
51
+ "max_position_embeddings": 8194,
52
+ "min_length": 0,
53
+ "model_type": "xlm-roberta",
54
+ "no_repeat_ngram_size": 0,
55
+ "num_attention_heads": 16,
56
+ "num_beam_groups": 1,
57
+ "num_beams": 1,
58
+ "num_hidden_layers": 24,
59
+ "num_return_sequences": 1,
60
+ "output_attentions": false,
61
+ "output_hidden_states": false,
62
+ "output_past": true,
63
+ "output_scores": false,
64
+ "pad_token_id": 1,
65
+ "position_embedding_type": "absolute",
66
+ "prefix": null,
67
+ "problem_type": null,
68
+ "pruned_heads": {},
69
+ "remove_invalid_values": false,
70
+ "repetition_penalty": 1.0,
71
+ "return_dict": true,
72
+ "return_dict_in_generate": false,
73
+ "sep_token_id": null,
74
+ "suppress_tokens": null,
75
+ "task_specific_params": null,
76
+ "temperature": 1.0,
77
+ "tf_legacy_loss": false,
78
+ "tie_encoder_decoder": false,
79
+ "tie_word_embeddings": true,
80
+ "tokenizer_class": null,
81
+ "top_k": 50,
82
+ "top_p": 1.0,
83
+ "torchscript": false,
84
+ "transformers_version": "4.57.1",
85
+ "type_vocab_size": 1,
86
+ "typical_p": 1.0,
87
+ "use_bfloat16": false,
88
+ "use_cache": true,
89
+ "vocab_size": 250002
90
+ },
91
+ "base_model_name_or_path": "BAAI/bge-reranker-v2-m3",
92
+ "default_threadshold": null,
93
+ "default_threshold": null,
94
+ "encoder_architecture": "xlm-roberta",
95
+ "hidden_size": 1024,
96
+ "id2label": {
97
+ "0": "LABEL_0"
98
+ },
99
+ "label2id": {
100
+ "LABEL_0": 0
101
+ },
102
+ "max_length": 512,
103
+ "mode": "reranking_pruning",
104
+ "model_type": "open_provence",
105
+ "num_pruning_labels": 2,
106
+ "pruning_config": {
107
+ "_name_or_path": "",
108
+ "add_cross_attention": false,
109
+ "architectures": null,
110
+ "bad_words_ids": null,
111
+ "begin_suppress_tokens": null,
112
+ "bos_token_id": null,
113
+ "chunk_size_feed_forward": 0,
114
+ "classifier_dropout": 0.1,
115
+ "cross_attention_hidden_size": null,
116
+ "decoder_start_token_id": null,
117
+ "diversity_penalty": 0.0,
118
+ "do_sample": false,
119
+ "dtype": null,
120
+ "early_stopping": false,
121
+ "encoder_no_repeat_ngram_size": 0,
122
+ "eos_token_id": null,
123
+ "exponential_decay_length_penalty": null,
124
+ "finetuning_task": null,
125
+ "forced_bos_token_id": null,
126
+ "forced_eos_token_id": null,
127
+ "hidden_size": 1024,
128
+ "id2label": {
129
+ "0": "LABEL_0",
130
+ "1": "LABEL_1"
131
+ },
132
+ "is_decoder": false,
133
+ "is_encoder_decoder": false,
134
+ "label2id": {
135
+ "LABEL_0": 0,
136
+ "LABEL_1": 1
137
+ },
138
+ "length_penalty": 1.0,
139
+ "max_length": 20,
140
+ "min_length": 0,
141
+ "model_type": "open_provence_head",
142
+ "no_repeat_ngram_size": 0,
143
+ "num_beam_groups": 1,
144
+ "num_beams": 1,
145
+ "num_return_sequences": 1,
146
+ "output_attentions": false,
147
+ "output_hidden_states": false,
148
+ "output_scores": false,
149
+ "pad_token_id": null,
150
+ "prefix": null,
151
+ "problem_type": null,
152
+ "pruned_heads": {},
153
+ "remove_invalid_values": false,
154
+ "repetition_penalty": 1.0,
155
+ "return_dict": true,
156
+ "return_dict_in_generate": false,
157
+ "sentence_pooling": "mean",
158
+ "sep_token_id": null,
159
+ "suppress_tokens": null,
160
+ "task_specific_params": null,
161
+ "temperature": 1.0,
162
+ "tf_legacy_loss": false,
163
+ "tie_encoder_decoder": false,
164
+ "tie_word_embeddings": true,
165
+ "tokenizer_class": null,
166
+ "top_k": 50,
167
+ "top_p": 1.0,
168
+ "torchscript": false,
169
+ "transformers_version": "4.57.1",
170
+ "typical_p": 1.0,
171
+ "use_bfloat16": false,
172
+ "use_weighted_pooling": false
173
+ },
174
+ "tokenizer_name_or_path": null,
175
+ "transformers_version": "4.57.1",
176
+ "vocab_size": 250002,
177
+ "_rerank_head_removed": true,
178
+ "_note": "Rerank head weights were removed as they were not trained (ranking_weight=0.0)"
179
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4f22359cbbb4db90edb6377f35ecd93e0c822feed3db1530c5558f6a0558cad
3
+ size 2266882776
modeling_open_provence_standalone.py ADDED
The diff for this file is too large to render. See raw diff
 
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": true,
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:8bf8afbfd11306bd872018c53bfdf2e160a56f8edbcf49933324404791c148d3
3
+ size 17082900
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
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
+ "extra_special_tokens": {},
49
+ "mask_token": "<mask>",
50
+ "model_max_length": 8192,
51
+ "pad_token": "<pad>",
52
+ "sep_token": "</s>",
53
+ "sp_model_kwargs": {},
54
+ "tokenizer_class": "XLMRobertaTokenizer",
55
+ "unk_token": "<unk>"
56
+ }