davidmezzetti commited on
Commit
fe52348
·
1 Parent(s): c0dc63f

Initial model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "embedding_dimension": 768,
3
+ "pooling_mode": "max",
4
+ "include_prompt": true
5
+ }
README.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: sentence-similarity
3
+ tags:
4
+ - sentence-transformers
5
+ - feature-extraction
6
+ - sentence-similarity
7
+ - transformers
8
+ base_model: NeuML/atto-50k-768d
9
+ language: en
10
+ license: apache-2.0
11
+ ---
12
+
13
+ # Atto Embeddings
14
+
15
+ ![atto](https://cdn-uploads.huggingface.co/production/uploads/5ed67cfa968f6028e0559fd1/KajrZ_rc2l2rluZo7QkWv.png)
16
+
17
+ Atto is a family of compact contextual models designed for parameter-efficient language representation learning.
18
+
19
+ This is a model fined-tuned using [sentence-transformers](https://www.SBERT.net).
20
+
21
+ ## Usage (txtai)
22
+
23
+ This model can be used to build embeddings databases with [txtai](https://github.com/neuml/txtai) for semantic search and/or as a knowledge source for retrieval augmented generation (RAG).
24
+
25
+ ```python
26
+ import txtai
27
+
28
+ model = "neuml/atto-50k-768d-embeddings"
29
+
30
+ embeddings = txtai.Embeddings(
31
+ path=model,
32
+ content=True,
33
+ vectors={"trust_remote_code": True}
34
+ )
35
+ embeddings.index(documents())
36
+
37
+ # Run a query
38
+ embeddings.search("query to run")
39
+ ```
40
+
41
+ ## Usage (Sentence-Transformers)
42
+
43
+ Alternatively, the model can be loaded with [sentence-transformers](https://www.SBERT.net).
44
+
45
+ ```python
46
+ from sentence_transformers import SentenceTransformer
47
+ sentences = ["This is an example sentence", "Each sentence is converted"]
48
+
49
+ model = SentenceTransformer(model, trust_remote_code=True)
50
+ embeddings = model.encode(sentences)
51
+ print(embeddings)
52
+ ```
53
+
54
+ ## Evaluation
55
+
56
+ The following table shows a subset of BEIR scored with the [txtai benchmarks script](https://github.com/neuml/txtai/blob/master/examples/benchmarks.py). Scores reported are `ndcg@10`.
57
+
58
+ | Model | Parameters | Dimensions | Vocab | ArguAna | NFCorpus | SciFact | Average |
59
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
60
+ | [atto-36k-384d](https://hf.co/neuml/atto-36k-384d-embeddings) | 36K | 384 | 1K | 0.3249 | 0.2286 | 0.4920 | 0.3485 |
61
+ | [**atto-50k-768d**](https://hf.co/neuml/atto-50k-768d-embeddings) | **50K** | **768** | **1K** | **0.3264** | **0.2430** | **0.5334** | **0.3676** |
62
+ | [atto-90k-2048d](https://hf.co/neuml/atto-90k-2048d-embeddings) | 90K | 2048 | 1K | 0.4021 | 0.2676 | 0.6074 | 0.4257 |
63
+ | [bert-hash-femto](https://hf.co/neuml/bert-hash-femto-embeddings) | 243K | 128 | 30K | 0.1964 | 0.1402 | 0.2830 | 0.2065 |
64
+ | [bert-hash-pico](https://hf.co/neuml/bert-hash-pico-embeddings) | 442K | 128 | 30K | 0.2853 | 0.2075 | 0.3912 | 0.2947 |
65
+ | [bert-hash-nano](https://hf.co/neuml/bert-hash-nano-embeddings) | 953K | 128 | 30K | 0.3828 | 0.2562 | 0.5032 | 0.3807 |
66
+ | [atto-1m-2048d](https://hf.co/neuml/atto-1m-2048d-embeddings) | 1M | 2048 | 4K | 0.4189 | 0.2941 | 0.6229 | 0.4453 |
67
+ | [atto-1m-4096d](https://hf.co/neuml/atto-1m-4096d-embeddings) | 1M | 4096 | 4K | 0.4223 | 0.3044 | 0.6417 | 0.4561 |
68
+ | [atto-2m-8192d](https://hf.co/neuml/atto-2m-8192d-embeddings) | 2M | 8192 | 4K | 0.4343 | 0.3125 | 0.6653 | 0.4707 |
69
+ | [atto-14m-384d](https://hf.co/neuml/atto-14m-384d-embeddings) | 14M | 384 | 30K | 0.4874 | 0.3329 | 0.6472 | 0.4892 |
70
+ | [atto-17m-8192d](https://hf.co/neuml/atto-17m-8192d-embeddings) | 17M | 8192 | 30K | 0.4963 | 0.3455 | 0.6909 | 0.5109 |
71
+ | [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) | 23M | 384 | 30K | 0.4789 | 0.3089 | 0.6527 | 0.4802 |
72
+ | [atto-25m-384d](https://hf.co/neuml/atto-25m-384d-embeddings) | 25M | 384 | 30K | 0.4879 | 0.3426 | 0.6600 | 0.4968 |
73
+ | [atto-28m-8192d](https://hf.co/neuml/atto-28m-8192d-embeddings) | 28M | 8192 | 30K | 0.5111 | 0.3461 | 0.6843 | 0.5138 |
74
+ | [DenseOn](https://huggingface.co/lightonai/denseon) | 110M | 768 | 50K | 0.5408 | 0.3915 | 0.7591 | 0.5638 |
75
+
76
+ ## Training Parameters
77
+
78
+ | Parameter | Value |
79
+ | --- | ---: |
80
+ | per_device_train_batch_size | 128 |
81
+ | num_train_epochs | 25 |
82
+ | learning_rate | 0.003 |
83
+ | warmup_steps | 1000 |
84
+ | weight_decay | 0.01 |
85
+ | fp16 | True |
86
+ | per_device_eval_batch_size | 128 |
87
+ | dataloader_num_workers | 20 |
88
+ | prompts | `{'query': 'query: ', 'document': 'document: '}` |
89
+
90
+ ### Full Model Architecture
91
+
92
+ ```
93
+ SentenceTransformer(
94
+ (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'AttoModel'})
95
+ (1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'max', 'include_prompt': True})
96
+ )
97
+ ```
98
+
99
+ ## More Information
100
+
101
+ See the [Introducing Atto article](https://hf.co/blog/neuml/introducing-atto) for benchmark results, architecture details, and training methodology.
config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "AttoModel"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_atto.AttoConfig",
7
+ "AutoModel": "modeling_atto.AttoModel",
8
+ "AutoModelForMaskedLM": "modeling_atto.AttoForMaskedLM",
9
+ "AutoModelForSequenceClassification": "modeling_atto.AttoForSequenceClassification"
10
+ },
11
+ "dtype": "float32",
12
+ "embedding_size": 768,
13
+ "hidden_size": 32,
14
+ "intermediate_size": 64,
15
+ "model_type": "atto",
16
+ "num_attention_heads": 1,
17
+ "num_hidden_layers": 1,
18
+ "pad_token_id": 0,
19
+ "projections": 10,
20
+ "transformers_version": "5.18.0",
21
+ "use_cache": false,
22
+ "vocab_size": 1000
23
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "pytorch": "2.14.0+cu130",
4
+ "sentence_transformers": "6.1.0",
5
+ "transformers": "5.18.0"
6
+ },
7
+ "default_prompt_name": null,
8
+ "model_type": "SentenceTransformer",
9
+ "prompts": {
10
+ "document": "document: ",
11
+ "query": "query: "
12
+ },
13
+ "similarity_fn_name": "cosine"
14
+ }
configuration_atto.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers.configuration_utils import PreTrainedConfig
2
+
3
+
4
+ class AttoConfig(PreTrainedConfig):
5
+ """
6
+ Holds all architecture hyperparameters in a single object.
7
+ """
8
+
9
+ # Define model and auto mapping
10
+ model_type = "atto"
11
+ auto_map = {
12
+ "AutoConfig": "configuration_atto.AttoConfig",
13
+ "AutoModel": "modeling_atto.AttoModel",
14
+ "AutoModelForMaskedLM": "modeling_atto.AttoForMaskedLM",
15
+ "AutoModelForSequenceClassification": "modeling_atto.AttoForSequenceClassification"
16
+ }
17
+
18
+ def __init__(self,
19
+ vocab_size=1_000, projections=10, hidden_size=32, intermediate_size=64,
20
+ num_attention_heads=1, num_hidden_layers=1, embedding_size=768, **kwargs
21
+ ):
22
+ super().__init__(**kwargs)
23
+
24
+ self.vocab_size = vocab_size
25
+ self.projections = projections
26
+ self.hidden_size = hidden_size
27
+ self.intermediate_size = intermediate_size
28
+ self.num_attention_heads = num_attention_heads
29
+ self.num_hidden_layers = num_hidden_layers
30
+ self.embedding_size = embedding_size
31
+ self.pad_token_id = 0
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd91816029807e0c78831a517b11bcb4c6db02cb88835329dcebc9341ac2453a
3
+ size 196384
modeling_atto.py ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn.functional as F
3
+
4
+ from torch import nn
5
+ from transformers.modeling_outputs import (
6
+ BaseModelOutput,
7
+ MaskedLMOutput,
8
+ SequenceClassifierOutput
9
+ )
10
+ from transformers.modeling_utils import PreTrainedModel
11
+
12
+ from .configuration_atto import AttoConfig
13
+
14
+
15
+ class GatedConvAttentionMixer(nn.Module):
16
+ """
17
+ A sequence mixer combining a depthwise convolutional local track and a global attention
18
+ mechanism with directional gating and pre-attention non-linear conditioning.
19
+ """
20
+
21
+ def __init__(self, config):
22
+ super().__init__()
23
+
24
+ self.hidden_size = config.hidden_size
25
+ self.num_heads = config.num_attention_heads
26
+ self.head_dim = self.hidden_size // self.num_heads
27
+
28
+ # Local Track: Dense Depthwise Convolution
29
+ self.local_conv = nn.Conv1d(
30
+ self.hidden_size, self.hidden_size, kernel_size=5, padding=2, groups=self.hidden_size,
31
+ bias=False
32
+ )
33
+
34
+ # Fully Fused Projections
35
+ self.total_proj_width = self.hidden_size * 5
36
+ self.pointwise_gate = nn.Linear(self.hidden_size, self.total_proj_width, bias=False)
37
+ self.global_out_proj = nn.Linear(self.hidden_size, self.hidden_size, bias=False)
38
+
39
+ def forward(self, x, attention_mask=None):
40
+ batch, seq_len, _ = x.shape
41
+
42
+ # Compute local 1D convolution context
43
+ x_perm = x.permute(0, 2, 1).contiguous()
44
+ conv_feats = self.local_conv(x_perm).permute(0, 2, 1).contiguous()
45
+
46
+ # Unpack fused projections
47
+ local_gate, local_val, q_raw, k_raw, v_raw = self.pointwise_gate(conv_feats).split(
48
+ self.hidden_size, dim=-1
49
+ )
50
+
51
+ # Compute Directional Gated Phrase
52
+ gate_a, gate_b = local_gate.chunk(2, dim=-1)
53
+ directional_gate = torch.tanh(gate_a) * torch.sigmoid(gate_b)
54
+ fused_gate = torch.cat([directional_gate, directional_gate], dim=-1)
55
+ local_features = F.silu(fused_gate) * local_val
56
+
57
+ # Compute multi-head gating condition
58
+ gate_condition = torch.sigmoid(local_features)
59
+
60
+ # Broadcast matching the multi-head structure
61
+ q = (q_raw * gate_condition).view(batch, seq_len, self.num_heads, self.head_dim).transpose(1, 2)
62
+ k = (k_raw * gate_condition).view(batch, seq_len, self.num_heads, self.head_dim).transpose(1, 2)
63
+ v = (v_raw * gate_condition).view(batch, seq_len, self.num_heads, self.head_dim).transpose(1, 2)
64
+
65
+ # Fused Native Multi-Head Attention Execution
66
+ # pylint: disable=E1102
67
+ attn_mask = attention_mask[:, None, None, :].bool() if attention_mask is not None else None
68
+ global_features = F.scaled_dot_product_attention(q, k, v, attn_mask=attn_mask, dropout_p=0.0, is_causal=False)
69
+
70
+ # Reshape attention features back to hidden coordinates
71
+ global_features = global_features.transpose(1, 2).reshape(batch, seq_len, self.hidden_size)
72
+ global_out = self.global_out_proj(global_features)
73
+
74
+ # Return raw contextual deltas directly to the Pre-LN highway
75
+ return local_features + global_out
76
+
77
+
78
+ class PhaseGatedMoE(nn.Module):
79
+ """
80
+ Phase-Gated Multi-Scale Mixture of Experts.
81
+ Combines a local phrase expert and a wide dilated clause expert
82
+ using a parameter-free element-wise cross-scale gating mask.
83
+ """
84
+
85
+ def __init__(self, config):
86
+ super().__init__()
87
+ self.hidden_size = config.hidden_size
88
+ self.d_ffn = config.intermediate_size
89
+
90
+ # Core Horizontal Projections
91
+ self.w_gate_val = nn.Linear(config.hidden_size, self.d_ffn * 2, bias=False)
92
+ self.w_out = nn.Linear(self.d_ffn, config.hidden_size, bias=False)
93
+ self.act = nn.SiLU()
94
+
95
+ # Variance Reset Envelope
96
+ self.envelope_norm = nn.LayerNorm(self.d_ffn)
97
+
98
+ # Scale 1: Tight Local Phrase Expert
99
+ self.expert_local = nn.Conv1d(
100
+ self.d_ffn, self.d_ffn, kernel_size=3, padding=1, groups=self.d_ffn, bias=False
101
+ )
102
+
103
+ # Scale 2: Wide Dilated Clause Expert
104
+ self.expert_global = nn.Conv1d(
105
+ self.d_ffn, self.d_ffn, kernel_size=3, padding=2, dilation=2, groups=self.d_ffn, bias=False
106
+ )
107
+
108
+ def forward(self, x):
109
+ # Compute Base Horizontal Feature Tracks
110
+ projected = self.w_gate_val(x)
111
+ gate_stream, value_stream = projected.chunk(2, dim=-1)
112
+
113
+ # Permute to execute sequence-length operations natively: [Batch, Channels, Seq_Len]
114
+ gate_perm = gate_stream.permute(0, 2, 1).contiguous()
115
+
116
+ # Execute Multi-Scale Spatial Experts
117
+ expert_local_out = self.expert_local(gate_perm).permute(0, 2, 1).contiguous()
118
+ expert_global_out = self.expert_global(gate_perm).permute(0, 2, 1).contiguous()
119
+
120
+ # Parameter-Free Cross-Scale Phase Masking
121
+ # Derives a bounded phase modulation track from the wide clause expert
122
+ phase_modulator = torch.tanh(expert_global_out)
123
+
124
+ # Modulates the local phrase expert vectors without parameter overhead
125
+ fused_expert_context = expert_local_out * (1.0 + phase_modulator)
126
+
127
+ # Variance Reset and Asymmetric Expert Gating
128
+ saliency_mask = torch.sigmoid(self.envelope_norm(fused_expert_context)) * self.act(value_stream)
129
+
130
+ # Coordinate Recovery
131
+ return self.w_out(saliency_mask)
132
+
133
+
134
+ class AttoLayer(nn.Module):
135
+ """
136
+ Unified sequential block wrapping exactly one sequence mixer
137
+ and one phase-gated expert layer together for clean stack loop tracking.
138
+ """
139
+
140
+ def __init__(self, config):
141
+ super().__init__()
142
+
143
+ # Gated Convolutional Attention Sequence Mixer
144
+ self.mixer = GatedConvAttentionMixer(config)
145
+
146
+ # Phase-Gated Multi-Scale Mixture of Experts Feed-Forward Network
147
+ self.moe = PhaseGatedMoE(config)
148
+
149
+ # Explicit layer normalizations for structural Pre-LN block isolation
150
+ self.norm_mixer = nn.RMSNorm(config.hidden_size)
151
+ self.norm_moe = nn.RMSNorm(config.hidden_size)
152
+
153
+ def forward(self, x, attention_mask=None):
154
+ # Execute Pre-LN Residual Highway Loop: x = x + sub_block(norm(x))
155
+ x = x + self.mixer(self.norm_mixer(x), attention_mask=attention_mask)
156
+ x = x + self.moe(self.norm_moe(x))
157
+
158
+ # Return processed tensor
159
+ return x
160
+
161
+
162
+ class AttoModel(PreTrainedModel):
163
+ """
164
+ Base Atto Model.
165
+ """
166
+
167
+ config_class = AttoConfig
168
+ base_model_prefix = "atto"
169
+
170
+ def __init__(self, config):
171
+ super().__init__(config)
172
+
173
+ # Embeddings layer
174
+ self.embeddings = nn.Embedding(config.vocab_size, config.projections)
175
+
176
+ # Low-rank projections
177
+ self.projections = nn.Sequential(
178
+ nn.Linear(config.projections, config.hidden_size),
179
+ nn.SiLU()
180
+ )
181
+
182
+ # Layers of Mixer + FFN
183
+ self.layers = nn.ModuleList([
184
+ AttoLayer(config) for _ in range(config.num_hidden_layers)
185
+ ])
186
+
187
+ # Linear expansion
188
+ self.expansion = nn.Linear(config.hidden_size, config.embedding_size)
189
+
190
+ self.post_init()
191
+
192
+ def get_input_embeddings(self):
193
+ return self.embeddings
194
+
195
+ def set_input_embeddings(self, value):
196
+ self.embeddings = value
197
+
198
+ def forward(self, input_ids, attention_mask=None, **kwargs):
199
+ # Calculate embeddings
200
+ x = self.embeddings(input_ids)
201
+
202
+ # Low-rank projections
203
+ x = self.projections(x)
204
+
205
+ # Iterate through layers
206
+ for layer in self.layers:
207
+ x = layer(x, attention_mask=attention_mask)
208
+
209
+ # Expand the output space
210
+ hidden_states = self.expansion(x)
211
+
212
+ return BaseModelOutput(last_hidden_state=hidden_states)
213
+
214
+
215
+ class AttoForMaskedLM(PreTrainedModel):
216
+ """
217
+ Atto model for masked language modeling.
218
+ """
219
+
220
+ config_class = AttoConfig
221
+ base_model_prefix = "atto"
222
+
223
+ def __init__(self, config):
224
+ super().__init__(config)
225
+
226
+ self.atto = AttoModel(config)
227
+
228
+ # MLM prediction head
229
+ self.decoder = nn.Sequential(
230
+ nn.Linear(config.embedding_size, config.hidden_size),
231
+ nn.SiLU(),
232
+ nn.RMSNorm(config.hidden_size),
233
+ nn.Linear(config.hidden_size, config.projections)
234
+ )
235
+
236
+ self.bias = nn.Parameter(torch.zeros(config.vocab_size))
237
+
238
+ # Initialize weights and apply final processing
239
+ self.post_init()
240
+
241
+ def forward(self, input_ids, attention_mask=None, labels=None, **kwargs):
242
+ outputs = self.atto(
243
+ input_ids=input_ids,
244
+ attention_mask=attention_mask
245
+ )
246
+
247
+ # Compute logits using a fused kernel
248
+ # pylint: disable=E1102
249
+ logits = F.linear(
250
+ self.decoder(outputs.last_hidden_state),
251
+ self.atto.embeddings.weight,
252
+ self.bias
253
+ )
254
+
255
+ loss = None
256
+ if labels is not None:
257
+ loss = F.cross_entropy(
258
+ logits.view(-1, self.config.vocab_size),
259
+ labels.view(-1),
260
+ ignore_index=-100,
261
+ )
262
+
263
+ return MaskedLMOutput(loss=loss, logits=logits)
264
+
265
+
266
+ class AttoForSequenceClassification(PreTrainedModel):
267
+ """
268
+ Atto model for sequence classification.
269
+ """
270
+
271
+ config_class = AttoConfig
272
+ base_model_prefix = "atto"
273
+
274
+ def __init__(self, config):
275
+ super().__init__(config)
276
+ self.num_labels = config.num_labels
277
+ self.config = config
278
+
279
+ self.atto = AttoModel(config)
280
+ classifier_dropout = (
281
+ config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
282
+ )
283
+ self.dropout = nn.Dropout(classifier_dropout)
284
+ self.classifier = nn.Linear(config.embedding_size, config.num_labels)
285
+
286
+ # Initialize weights and apply final processing
287
+ self.post_init()
288
+
289
+ def forward(self, input_ids, attention_mask=None, labels=None, **kwargs):
290
+ outputs = self.atto(
291
+ input_ids=input_ids,
292
+ attention_mask=attention_mask
293
+ )
294
+ hidden_states = outputs.last_hidden_state
295
+
296
+ if attention_mask is not None:
297
+ mask = attention_mask.unsqueeze(-1).to(hidden_states.dtype)
298
+ pooled_output = (hidden_states * mask).sum(dim=1) / mask.sum(dim=1).clamp(min=1e-9)
299
+ else:
300
+ pooled_output = hidden_states.mean(dim=1)
301
+
302
+ pooled_output = self.dropout(pooled_output)
303
+ logits = self.classifier(pooled_output)
304
+
305
+ loss = None
306
+ if labels is not None:
307
+ if self.config.problem_type is None:
308
+ if self.num_labels == 1:
309
+ self.config.problem_type = "regression"
310
+ elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
311
+ self.config.problem_type = "single_label_classification"
312
+ else:
313
+ self.config.problem_type = "multi_label_classification"
314
+
315
+ if self.config.problem_type == "regression":
316
+ loss = F.mse_loss(logits.squeeze(), labels.squeeze()) if self.num_labels == 1 else F.mse_loss(logits, labels)
317
+ elif self.config.problem_type == "single_label_classification":
318
+ loss = F.cross_entropy(logits.view(-1, self.num_labels), labels.view(-1))
319
+ elif self.config.problem_type == "multi_label_classification":
320
+ loss = F.binary_cross_entropy_with_logits(logits, labels)
321
+
322
+ return SequenceClassifierOutput(loss=loss, logits=logits)
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.base.modules.transformer.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "transformer_task": "feature-extraction",
3
+ "modality_config": {
4
+ "text": {
5
+ "method": "forward",
6
+ "method_output_name": "last_hidden_state"
7
+ }
8
+ },
9
+ "module_output_name": "token_embeddings"
10
+ }
tokenizer.json ADDED
@@ -0,0 +1,1162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "truncation": {
4
+ "direction": "Right",
5
+ "max_length": 512,
6
+ "strategy": "LongestFirst",
7
+ "stride": 0
8
+ },
9
+ "padding": {
10
+ "strategy": "BatchLongest",
11
+ "direction": "Right",
12
+ "pad_to_multiple_of": null,
13
+ "pad_id": 0,
14
+ "pad_type_id": 0,
15
+ "pad_token": "[PAD]"
16
+ },
17
+ "added_tokens": [
18
+ {
19
+ "id": 0,
20
+ "content": "[PAD]",
21
+ "single_word": false,
22
+ "lstrip": false,
23
+ "rstrip": false,
24
+ "normalized": false,
25
+ "special": true
26
+ },
27
+ {
28
+ "id": 1,
29
+ "content": "[UNK]",
30
+ "single_word": false,
31
+ "lstrip": false,
32
+ "rstrip": false,
33
+ "normalized": false,
34
+ "special": true
35
+ },
36
+ {
37
+ "id": 2,
38
+ "content": "[CLS]",
39
+ "single_word": false,
40
+ "lstrip": false,
41
+ "rstrip": false,
42
+ "normalized": false,
43
+ "special": true
44
+ },
45
+ {
46
+ "id": 3,
47
+ "content": "[SEP]",
48
+ "single_word": false,
49
+ "lstrip": false,
50
+ "rstrip": false,
51
+ "normalized": false,
52
+ "special": true
53
+ },
54
+ {
55
+ "id": 4,
56
+ "content": "[MASK]",
57
+ "single_word": false,
58
+ "lstrip": false,
59
+ "rstrip": false,
60
+ "normalized": false,
61
+ "special": true
62
+ }
63
+ ],
64
+ "normalizer": {
65
+ "type": "BertNormalizer",
66
+ "clean_text": true,
67
+ "handle_chinese_chars": true,
68
+ "strip_accents": null,
69
+ "lowercase": true
70
+ },
71
+ "pre_tokenizer": {
72
+ "type": "BertPreTokenizer"
73
+ },
74
+ "post_processor": {
75
+ "type": "TemplateProcessing",
76
+ "single": [
77
+ {
78
+ "SpecialToken": {
79
+ "id": "[CLS]",
80
+ "type_id": 0
81
+ }
82
+ },
83
+ {
84
+ "Sequence": {
85
+ "id": "A",
86
+ "type_id": 0
87
+ }
88
+ },
89
+ {
90
+ "SpecialToken": {
91
+ "id": "[SEP]",
92
+ "type_id": 0
93
+ }
94
+ }
95
+ ],
96
+ "pair": [
97
+ {
98
+ "SpecialToken": {
99
+ "id": "[CLS]",
100
+ "type_id": 0
101
+ }
102
+ },
103
+ {
104
+ "Sequence": {
105
+ "id": "A",
106
+ "type_id": 0
107
+ }
108
+ },
109
+ {
110
+ "SpecialToken": {
111
+ "id": "[SEP]",
112
+ "type_id": 0
113
+ }
114
+ },
115
+ {
116
+ "Sequence": {
117
+ "id": "B",
118
+ "type_id": 1
119
+ }
120
+ },
121
+ {
122
+ "SpecialToken": {
123
+ "id": "[SEP]",
124
+ "type_id": 1
125
+ }
126
+ }
127
+ ],
128
+ "special_tokens": {
129
+ "[CLS]": {
130
+ "id": "[CLS]",
131
+ "ids": [
132
+ 2
133
+ ],
134
+ "tokens": [
135
+ "[CLS]"
136
+ ]
137
+ },
138
+ "[SEP]": {
139
+ "id": "[SEP]",
140
+ "ids": [
141
+ 3
142
+ ],
143
+ "tokens": [
144
+ "[SEP]"
145
+ ]
146
+ }
147
+ }
148
+ },
149
+ "decoder": {
150
+ "type": "WordPiece",
151
+ "prefix": "##",
152
+ "cleanup": true
153
+ },
154
+ "model": {
155
+ "type": "WordPiece",
156
+ "unk_token": "[UNK]",
157
+ "continuing_subword_prefix": "##",
158
+ "max_input_chars_per_word": 100,
159
+ "vocab": {
160
+ "[PAD]": 0,
161
+ "[UNK]": 1,
162
+ "[CLS]": 2,
163
+ "[SEP]": 3,
164
+ "[MASK]": 4,
165
+ "!": 5,
166
+ "\"": 6,
167
+ "#": 7,
168
+ "$": 8,
169
+ "%": 9,
170
+ "&": 10,
171
+ "'": 11,
172
+ "(": 12,
173
+ ")": 13,
174
+ "*": 14,
175
+ "+": 15,
176
+ ",": 16,
177
+ "-": 17,
178
+ ".": 18,
179
+ "/": 19,
180
+ "0": 20,
181
+ "1": 21,
182
+ "2": 22,
183
+ "3": 23,
184
+ "4": 24,
185
+ "5": 25,
186
+ "6": 26,
187
+ "7": 27,
188
+ "8": 28,
189
+ "9": 29,
190
+ ":": 30,
191
+ ";": 31,
192
+ "<": 32,
193
+ "=": 33,
194
+ ">": 34,
195
+ "?": 35,
196
+ "@": 36,
197
+ "[": 37,
198
+ "\\": 38,
199
+ "]": 39,
200
+ "^": 40,
201
+ "_": 41,
202
+ "`": 42,
203
+ "a": 43,
204
+ "b": 44,
205
+ "c": 45,
206
+ "d": 46,
207
+ "e": 47,
208
+ "f": 48,
209
+ "g": 49,
210
+ "h": 50,
211
+ "i": 51,
212
+ "j": 52,
213
+ "k": 53,
214
+ "l": 54,
215
+ "m": 55,
216
+ "n": 56,
217
+ "o": 57,
218
+ "p": 58,
219
+ "q": 59,
220
+ "r": 60,
221
+ "s": 61,
222
+ "t": 62,
223
+ "u": 63,
224
+ "v": 64,
225
+ "w": 65,
226
+ "x": 66,
227
+ "y": 67,
228
+ "z": 68,
229
+ "{": 69,
230
+ "|": 70,
231
+ "}": 71,
232
+ "~": 72,
233
+ "##0": 73,
234
+ "##4": 74,
235
+ "##3": 75,
236
+ "##2": 76,
237
+ "##5": 77,
238
+ "##7": 78,
239
+ "##a": 79,
240
+ "##l": 80,
241
+ "##f": 81,
242
+ "##s": 82,
243
+ "##h": 83,
244
+ "##t": 84,
245
+ "##e": 85,
246
+ "##r": 86,
247
+ "##c": 87,
248
+ "##k": 88,
249
+ "##8": 89,
250
+ "##i": 90,
251
+ "##y": 91,
252
+ "##v": 92,
253
+ "##x": 93,
254
+ "##o": 94,
255
+ "##m": 95,
256
+ "##n": 96,
257
+ "##d": 97,
258
+ "##z": 98,
259
+ "##w": 99,
260
+ "##u": 100,
261
+ "##p": 101,
262
+ "##6": 102,
263
+ "##9": 103,
264
+ "##1": 104,
265
+ "##g": 105,
266
+ "##b": 106,
267
+ "##j": 107,
268
+ "##q": 108,
269
+ "##he": 109,
270
+ "##er": 110,
271
+ "the": 111,
272
+ "##in": 112,
273
+ "##on": 113,
274
+ "##an": 114,
275
+ "##or": 115,
276
+ "##ed": 116,
277
+ "##es": 117,
278
+ "##en": 118,
279
+ "##at": 119,
280
+ "in": 120,
281
+ "##ar": 121,
282
+ "##al": 122,
283
+ "of": 123,
284
+ "an": 124,
285
+ "##is": 125,
286
+ "##it": 126,
287
+ "##ic": 127,
288
+ "##as": 128,
289
+ "##ing": 129,
290
+ "and": 130,
291
+ "##ion": 131,
292
+ "##ou": 132,
293
+ "to": 133,
294
+ "##om": 134,
295
+ "##re": 135,
296
+ "##il": 136,
297
+ "##el": 137,
298
+ "##ent": 138,
299
+ "##ol": 139,
300
+ "##am": 140,
301
+ "##ec": 141,
302
+ "##st": 142,
303
+ "##et": 143,
304
+ "##ur": 144,
305
+ "##ac": 145,
306
+ "19": 146,
307
+ "st": 147,
308
+ "##ad": 148,
309
+ "##ro": 149,
310
+ "th": 150,
311
+ "##le": 151,
312
+ "##iv": 152,
313
+ "on": 153,
314
+ "was": 154,
315
+ "##ers": 155,
316
+ "for": 156,
317
+ "20": 157,
318
+ "##ation": 158,
319
+ "##ir": 159,
320
+ "##ig": 160,
321
+ "re": 161,
322
+ "##ot": 162,
323
+ "as": 163,
324
+ "##id": 164,
325
+ "##ter": 165,
326
+ "##ay": 166,
327
+ "al": 167,
328
+ "##ly": 168,
329
+ "##em": 169,
330
+ "is": 170,
331
+ "##ch": 171,
332
+ "##ist": 172,
333
+ "##th": 173,
334
+ "fr": 174,
335
+ "##im": 175,
336
+ "##us": 176,
337
+ "##ith": 177,
338
+ "##ow": 178,
339
+ "##ut": 179,
340
+ "ch": 180,
341
+ "with": 181,
342
+ "##and": 182,
343
+ "he": 183,
344
+ "##ul": 184,
345
+ "by": 185,
346
+ "##ag": 186,
347
+ "at": 187,
348
+ "con": 188,
349
+ "##ts": 189,
350
+ "be": 190,
351
+ "##un": 191,
352
+ "##ce": 192,
353
+ "##os": 193,
354
+ "##um": 194,
355
+ "##op": 195,
356
+ "##oun": 196,
357
+ "com": 197,
358
+ "un": 198,
359
+ "wh": 199,
360
+ "##oc": 200,
361
+ "##ain": 201,
362
+ "de": 202,
363
+ "##her": 203,
364
+ "pro": 204,
365
+ "##ian": 205,
366
+ "##ver": 206,
367
+ "from": 207,
368
+ "##ct": 208,
369
+ "##est": 209,
370
+ "##ap": 210,
371
+ "##ri": 211,
372
+ "se": 212,
373
+ "pl": 213,
374
+ "##av": 214,
375
+ "##ab": 215,
376
+ "that": 216,
377
+ "##ess": 217,
378
+ "##all": 218,
379
+ "##ber": 219,
380
+ "##ia": 220,
381
+ "##ity": 221,
382
+ "ar": 222,
383
+ "##ies": 223,
384
+ "##od": 224,
385
+ "ne": 225,
386
+ "##ect": 226,
387
+ "ex": 227,
388
+ "##ate": 228,
389
+ "it": 229,
390
+ "le": 230,
391
+ "or": 231,
392
+ "en": 232,
393
+ "##if": 233,
394
+ "pr": 234,
395
+ "##art": 235,
396
+ "sp": 236,
397
+ "his": 237,
398
+ "201": 238,
399
+ "##ard": 239,
400
+ "su": 240,
401
+ "##ill": 241,
402
+ "##ud": 242,
403
+ "##ak": 243,
404
+ "##ip": 244,
405
+ "##igh": 245,
406
+ "tr": 246,
407
+ "##our": 247,
408
+ "##ov": 248,
409
+ "##ary": 249,
410
+ "sh": 250,
411
+ "200": 251,
412
+ "##ich": 252,
413
+ "##ated": 253,
414
+ "##ort": 254,
415
+ "##ish": 255,
416
+ "##se": 256,
417
+ "##mer": 257,
418
+ "##ment": 258,
419
+ "##ive": 259,
420
+ "##fer": 260,
421
+ "##ge": 261,
422
+ "##ld": 262,
423
+ "##ear": 263,
424
+ "##ial": 264,
425
+ "##og": 265,
426
+ "##ere": 266,
427
+ "##pp": 267,
428
+ "##ong": 268,
429
+ "##ie": 269,
430
+ "18": 270,
431
+ "cl": 271,
432
+ "##ant": 272,
433
+ "are": 273,
434
+ "##ell": 274,
435
+ "##ue": 275,
436
+ "##ub": 276,
437
+ "##ks": 277,
438
+ "##ast": 278,
439
+ "##ine": 279,
440
+ "wor": 280,
441
+ "comp": 281,
442
+ "br": 282,
443
+ "##ces": 283,
444
+ "##ust": 284,
445
+ "##ound": 285,
446
+ "##ame": 286,
447
+ "af": 287,
448
+ "were": 288,
449
+ "##ions": 289,
450
+ "mar": 290,
451
+ "##so": 291,
452
+ "gr": 292,
453
+ "##gh": 293,
454
+ "##ical": 294,
455
+ "##ore": 295,
456
+ "play": 296,
457
+ "##ign": 297,
458
+ "##ost": 298,
459
+ "new": 299,
460
+ "also": 300,
461
+ "##end": 301,
462
+ "rec": 302,
463
+ "ad": 303,
464
+ "##ord": 304,
465
+ "##pt": 305,
466
+ "which": 306,
467
+ "ser": 307,
468
+ "sc": 308,
469
+ "##tern": 309,
470
+ "##ack": 310,
471
+ "##uc": 311,
472
+ "##qu": 312,
473
+ "not": 313,
474
+ "res": 314,
475
+ "fir": 315,
476
+ "ac": 316,
477
+ "##ther": 317,
478
+ "col": 318,
479
+ "##ight": 319,
480
+ "##age": 320,
481
+ "inc": 321,
482
+ "##ican": 322,
483
+ "cent": 323,
484
+ "##per": 324,
485
+ "##ure": 325,
486
+ "199": 326,
487
+ "##ember": 327,
488
+ "##ass": 328,
489
+ "##der": 329,
490
+ "man": 330,
491
+ "first": 331,
492
+ "##ire": 332,
493
+ "her": 333,
494
+ "##ous": 334,
495
+ "whe": 335,
496
+ "##ra": 336,
497
+ "202": 337,
498
+ "this": 338,
499
+ "##man": 339,
500
+ "car": 340,
501
+ "had": 341,
502
+ "##feren": 342,
503
+ "##iz": 343,
504
+ "part": 344,
505
+ "cont": 345,
506
+ "ab": 346,
507
+ "she": 347,
508
+ "##ount": 348,
509
+ "comm": 349,
510
+ "##ang": 350,
511
+ "##ry": 351,
512
+ "##ational": 352,
513
+ "te": 353,
514
+ "ind": 354,
515
+ "##hed": 355,
516
+ "pe": 356,
517
+ "##ough": 357,
518
+ "##ans": 358,
519
+ "##ations": 359,
520
+ "##ric": 360,
521
+ "##ond": 361,
522
+ "##ory": 362,
523
+ "##orn": 363,
524
+ "fil": 364,
525
+ "year": 365,
526
+ "amer": 366,
527
+ "##land": 367,
528
+ "##ice": 368,
529
+ "##mp": 369,
530
+ "el": 370,
531
+ "##ok": 371,
532
+ "int": 372,
533
+ "tw": 373,
534
+ "##ave": 374,
535
+ "rep": 375,
536
+ "##ru": 376,
537
+ "##ome": 377,
538
+ "##amp": 378,
539
+ "has": 379,
540
+ "go": 380,
541
+ "after": 381,
542
+ "all": 382,
543
+ "rel": 383,
544
+ "##ide": 384,
545
+ "co": 385,
546
+ "##ib": 386,
547
+ "##ater": 387,
548
+ "##ition": 388,
549
+ "##out": 389,
550
+ "its": 390,
551
+ "per": 391,
552
+ "referen": 392,
553
+ "ag": 393,
554
+ "us": 394,
555
+ "one": 395,
556
+ "##ey": 396,
557
+ "##ach": 397,
558
+ "par": 398,
559
+ "their": 399,
560
+ "pol": 400,
561
+ "bo": 401,
562
+ "des": 402,
563
+ "film": 403,
564
+ "##act": 404,
565
+ "references": 405,
566
+ "ro": 406,
567
+ "sch": 407,
568
+ "##ace": 408,
569
+ "can": 409,
570
+ "app": 410,
571
+ "198": 411,
572
+ "##ens": 412,
573
+ "##ates": 413,
574
+ "fe": 414,
575
+ "##wn": 415,
576
+ "who": 416,
577
+ "##ime": 417,
578
+ "but": 418,
579
+ "##ited": 419,
580
+ "##ree": 420,
581
+ "american": 421,
582
+ "dis": 422,
583
+ "##ual": 423,
584
+ "##ult": 424,
585
+ "jo": 425,
586
+ "##own": 426,
587
+ "##rit": 427,
588
+ "##ail": 428,
589
+ "##ople": 429,
590
+ "##ubl": 430,
591
+ "##aw": 431,
592
+ "##ath": 432,
593
+ "act": 433,
594
+ "##ff": 434,
595
+ "##ivers": 435,
596
+ "##ik": 436,
597
+ "##lud": 437,
598
+ "ed": 438,
599
+ "fin": 439,
600
+ "##00": 440,
601
+ "off": 441,
602
+ "two": 442,
603
+ "##ence": 443,
604
+ "##ball": 444,
605
+ "##ents": 445,
606
+ "##ors": 446,
607
+ "##gr": 447,
608
+ "##les": 448,
609
+ "##ild": 449,
610
+ "##ool": 450,
611
+ "mus": 451,
612
+ "ass": 452,
613
+ "197": 453,
614
+ "dec": 454,
615
+ "they": 455,
616
+ "##ite": 456,
617
+ "##ance": 457,
618
+ "includ": 458,
619
+ "people": 459,
620
+ "bec": 460,
621
+ "##ould": 461,
622
+ "reg": 462,
623
+ "##ug": 463,
624
+ "ph": 464,
625
+ "other": 465,
626
+ "fo": 466,
627
+ "##uring": 467,
628
+ "we": 468,
629
+ "##oll": 469,
630
+ "sec": 470,
631
+ "##iss": 471,
632
+ "##ade": 472,
633
+ "##ward": 473,
634
+ "bas": 474,
635
+ "##ied": 475,
636
+ "eng": 476,
637
+ "bl": 477,
638
+ "lin": 478,
639
+ "##ile": 479,
640
+ "count": 480,
641
+ "pre": 481,
642
+ "ev": 482,
643
+ "##ury": 483,
644
+ "##hip": 484,
645
+ "me": 485,
646
+ "fl": 486,
647
+ "serv": 487,
648
+ "gen": 488,
649
+ "have": 489,
650
+ "up": 490,
651
+ "##for": 491,
652
+ "##io": 492,
653
+ "##te": 493,
654
+ "##we": 494,
655
+ "##ings": 495,
656
+ "univers": 496,
657
+ "may": 497,
658
+ "sou": 498,
659
+ "##hn": 499,
660
+ "min": 500,
661
+ "##ason": 501,
662
+ "bu": 502,
663
+ "##old": 503,
664
+ "over": 504,
665
+ "196": 505,
666
+ "hist": 506,
667
+ "school": 507,
668
+ "out": 508,
669
+ "nor": 509,
670
+ "##ely": 510,
671
+ "been": 511,
672
+ "##ics": 512,
673
+ "dist": 513,
674
+ "pres": 514,
675
+ "##eld": 515,
676
+ "am": 516,
677
+ "war": 517,
678
+ "sy": 518,
679
+ "mon": 519,
680
+ "loc": 520,
681
+ "ma": 521,
682
+ "##ose": 522,
683
+ "##able": 523,
684
+ "during": 524,
685
+ "publ": 525,
686
+ "##ft": 526,
687
+ "ear": 527,
688
+ "##ished": 528,
689
+ "exp": 529,
690
+ "kn": 530,
691
+ "time": 531,
692
+ "##als": 532,
693
+ "foot": 533,
694
+ "art": 534,
695
+ "##ision": 535,
696
+ "##gan": 536,
697
+ "med": 537,
698
+ "##az": 538,
699
+ "national": 539,
700
+ "work": 540,
701
+ "##ton": 541,
702
+ "att": 542,
703
+ "win": 543,
704
+ "##vel": 544,
705
+ "##urn": 545,
706
+ "##ral": 546,
707
+ "cons": 547,
708
+ "under": 548,
709
+ "char": 549,
710
+ "team": 550,
711
+ "acc": 551,
712
+ "dr": 552,
713
+ "##rib": 553,
714
+ "university": 554,
715
+ "elect": 555,
716
+ "prod": 556,
717
+ "##ames": 557,
718
+ "when": 558,
719
+ "##olog": 559,
720
+ "world": 560,
721
+ "united": 561,
722
+ "##ict": 562,
723
+ "##ock": 563,
724
+ "17": 564,
725
+ "##ale": 565,
726
+ "bet": 566,
727
+ "##ah": 567,
728
+ "194": 568,
729
+ "there": 569,
730
+ "century": 570,
731
+ "bro": 571,
732
+ "##ists": 572,
733
+ "gre": 573,
734
+ "##way": 574,
735
+ "est": 575,
736
+ "gu": 576,
737
+ "into": 577,
738
+ "##one": 578,
739
+ "stud": 579,
740
+ "football": 580,
741
+ "##int": 581,
742
+ "##eas": 582,
743
+ "##cc": 583,
744
+ "195": 584,
745
+ "season": 585,
746
+ "##ction": 586,
747
+ "##oup": 587,
748
+ "no": 588,
749
+ "##ick": 589,
750
+ "##anc": 590,
751
+ "state": 591,
752
+ "po": 592,
753
+ "born": 593,
754
+ "sub": 594,
755
+ "##ev": 595,
756
+ "##au": 596,
757
+ "##ake": 597,
758
+ "spec": 598,
759
+ "##eral": 599,
760
+ "sing": 600,
761
+ "players": 601,
762
+ "found": 602,
763
+ "##ix": 603,
764
+ "south": 604,
765
+ "record": 605,
766
+ "##ious": 606,
767
+ "##rap": 607,
768
+ "##ily": 608,
769
+ "##ons": 609,
770
+ "##ife": 610,
771
+ "inter": 611,
772
+ "##ternal": 612,
773
+ "alb": 613,
774
+ "nov": 614,
775
+ "##oth": 615,
776
+ "city": 616,
777
+ "trans": 617,
778
+ "ret": 618,
779
+ "##let": 619,
780
+ "states": 620,
781
+ "air": 621,
782
+ "##ep": 622,
783
+ "form": 623,
784
+ "pop": 624,
785
+ "##ank": 625,
786
+ "dep": 626,
787
+ "##ince": 627,
788
+ "high": 628,
789
+ "him": 629,
790
+ "##emb": 630,
791
+ "##ier": 631,
792
+ "will": 632,
793
+ "thr": 633,
794
+ "more": 634,
795
+ "##ollow": 635,
796
+ "##oci": 636,
797
+ "##ative": 637,
798
+ "10": 638,
799
+ "so": 639,
800
+ "second": 640,
801
+ "again": 641,
802
+ "##att": 642,
803
+ "follow": 643,
804
+ "would": 644,
805
+ "def": 645,
806
+ "##hes": 646,
807
+ "later": 647,
808
+ "##vern": 648,
809
+ "##form": 649,
810
+ "prov": 650,
811
+ "##ork": 651,
812
+ "##ouse": 652,
813
+ "bir": 653,
814
+ "most": 654,
815
+ "fam": 655,
816
+ "dire": 656,
817
+ "where": 657,
818
+ "imp": 658,
819
+ "##lish": 659,
820
+ "ap": 660,
821
+ "##ities": 661,
822
+ "external": 662,
823
+ "years": 663,
824
+ "##ood": 664,
825
+ "##ina": 665,
826
+ "193": 666,
827
+ "##ating": 667,
828
+ "inst": 668,
829
+ "16": 669,
830
+ "links": 670,
831
+ "##air": 671,
832
+ "##up": 672,
833
+ "end": 673,
834
+ "##ween": 674,
835
+ "##res": 675,
836
+ "liv": 676,
837
+ "three": 677,
838
+ "##hy": 678,
839
+ "govern": 679,
840
+ "between": 680,
841
+ "qu": 681,
842
+ "wom": 682,
843
+ "group": 683,
844
+ "##ular": 684,
845
+ "15": 685,
846
+ "##ann": 686,
847
+ "##ement": 687,
848
+ "cap": 688,
849
+ "rem": 689,
850
+ "only": 690,
851
+ "north": 691,
852
+ "rev": 692,
853
+ "writ": 693,
854
+ "met": 694,
855
+ "jun": 695,
856
+ "##son": 696,
857
+ "cr": 697,
858
+ "how": 698,
859
+ "##enn": 699,
860
+ "ter": 700,
861
+ "some": 701,
862
+ "about": 702,
863
+ "##ional": 703,
864
+ "music": 704,
865
+ "##ague": 705,
866
+ "award": 706,
867
+ "releas": 707,
868
+ "song": 708,
869
+ "direct": 709,
870
+ "##ograp": 710,
871
+ "sa": 711,
872
+ "la": 712,
873
+ "mov": 713,
874
+ "ann": 714,
875
+ "inv": 715,
876
+ "bar": 716,
877
+ "through": 717,
878
+ "album": 718,
879
+ "sur": 719,
880
+ "ge": 720,
881
+ "sm": 721,
882
+ "##ific": 722,
883
+ "compan": 723,
884
+ "champ": 724,
885
+ "##enc": 725,
886
+ "ger": 726,
887
+ "op": 727,
888
+ "12": 728,
889
+ "aust": 729,
890
+ "##lo": 730,
891
+ "while": 731,
892
+ "##iam": 732,
893
+ "##ery": 733,
894
+ "series": 734,
895
+ "##rict": 735,
896
+ "day": 736,
897
+ "192": 737,
898
+ "list": 738,
899
+ "##aus": 739,
900
+ "##orts": 740,
901
+ "id": 741,
902
+ "arm": 742,
903
+ "set": 743,
904
+ "back": 744,
905
+ "four": 745,
906
+ "care": 746,
907
+ "made": 747,
908
+ "cre": 748,
909
+ "##sp": 749,
910
+ "num": 750,
911
+ "history": 751,
912
+ "offic": 752,
913
+ "polit": 753,
914
+ "john": 754,
915
+ "##ounc": 755,
916
+ "jan": 756,
917
+ "##ss": 757,
918
+ "then": 758,
919
+ "county": 759,
920
+ "##ally": 760,
921
+ "bel": 761,
922
+ "them": 762,
923
+ "league": 763,
924
+ "##ress": 764,
925
+ "##itt": 765,
926
+ "see": 766,
927
+ "##ident": 767,
928
+ "such": 768,
929
+ "lar": 769,
930
+ "intern": 770,
931
+ "##ths": 771,
932
+ "##fore": 772,
933
+ "##erson": 773,
934
+ "lead": 774,
935
+ "oper": 775,
936
+ "##ph": 776,
937
+ "house": 777,
938
+ "known": 778,
939
+ "##uss": 779,
940
+ "mod": 780,
941
+ "sw": 781,
942
+ "supp": 782,
943
+ "191": 783,
944
+ "##ese": 784,
945
+ "##0s": 785,
946
+ "##ield": 786,
947
+ "brit": 787,
948
+ "##ley": 788,
949
+ "estab": 789,
950
+ "##und": 790,
951
+ "##ures": 791,
952
+ "men": 792,
953
+ "##ten": 793,
954
+ "##velop": 794,
955
+ "used": 795,
956
+ "call": 796,
957
+ "ju": 797,
958
+ "mat": 798,
959
+ "commun": 799,
960
+ "women": 800,
961
+ "death": 801,
962
+ "prof": 802,
963
+ "##are": 803,
964
+ "##ys": 804,
965
+ "add": 805,
966
+ "11": 806,
967
+ "##oss": 807,
968
+ "including": 808,
969
+ "desc": 809,
970
+ "club": 810,
971
+ "div": 811,
972
+ "##ket": 812,
973
+ "than": 813,
974
+ "##ern": 814,
975
+ "##ism": 815,
976
+ "mil": 816,
977
+ "##ather": 817,
978
+ "films": 818,
979
+ "##iew": 819,
980
+ "life": 820,
981
+ "main": 821,
982
+ "german": 822,
983
+ "became": 823,
984
+ "well": 824,
985
+ "develop": 825,
986
+ "tel": 826,
987
+ "do": 827,
988
+ "##til": 828,
989
+ "const": 829,
990
+ "##ourn": 830,
991
+ "district": 831,
992
+ "##ope": 832,
993
+ "class": 833,
994
+ "build": 834,
995
+ "##fl": 835,
996
+ "general": 836,
997
+ "##ins": 837,
998
+ "##ower": 838,
999
+ "public": 839,
1000
+ "rece": 840,
1001
+ "##erv": 841,
1002
+ "being": 842,
1003
+ "##ural": 843,
1004
+ "##els": 844,
1005
+ "early": 845,
1006
+ "##ont": 846,
1007
+ "sign": 847,
1008
+ "##bs": 848,
1009
+ "##its": 849,
1010
+ "before": 850,
1011
+ "##ai": 851,
1012
+ "champions": 852,
1013
+ "str": 853,
1014
+ "cor": 854,
1015
+ "against": 855,
1016
+ "har": 856,
1017
+ "21": 857,
1018
+ "show": 858,
1019
+ "##ments": 859,
1020
+ "international": 860,
1021
+ "aug": 861,
1022
+ "##ase": 862,
1023
+ "##ise": 863,
1024
+ "oct": 864,
1025
+ "##ection": 865,
1026
+ "14": 866,
1027
+ "orig": 867,
1028
+ "##ert": 868,
1029
+ "west": 869,
1030
+ "em": 870,
1031
+ "both": 871,
1032
+ "march": 872,
1033
+ "these": 873,
1034
+ "town": 874,
1035
+ "dem": 875,
1036
+ "family": 876,
1037
+ "##red": 877,
1038
+ "law": 878,
1039
+ "13": 879,
1040
+ "career": 880,
1041
+ "sept": 881,
1042
+ "##uary": 882,
1043
+ "align": 883,
1044
+ "##urch": 884,
1045
+ "coll": 885,
1046
+ "##amed": 886,
1047
+ "colle": 887,
1048
+ "##other": 888,
1049
+ "##ived": 889,
1050
+ "leg": 890,
1051
+ "sl": 891,
1052
+ "august": 892,
1053
+ "cro": 893,
1054
+ "##ister": 894,
1055
+ "##ike": 895,
1056
+ "chr": 896,
1057
+ "##iver": 897,
1058
+ "##eng": 898,
1059
+ "im": 899,
1060
+ "##hen": 900,
1061
+ "september": 901,
1062
+ "##ober": 902,
1063
+ "games": 903,
1064
+ "many": 904,
1065
+ "open": 905,
1066
+ "following": 906,
1067
+ "##yp": 907,
1068
+ "long": 908,
1069
+ "former": 909,
1070
+ "cour": 910,
1071
+ "cal": 911,
1072
+ "##min": 912,
1073
+ "design": 913,
1074
+ "##co": 914,
1075
+ "october": 915,
1076
+ "##ke": 916,
1077
+ "##ians": 917,
1078
+ "austral": 918,
1079
+ "origin": 919,
1080
+ "##ution": 920,
1081
+ "##ected": 921,
1082
+ "##ained": 922,
1083
+ "##ning": 923,
1084
+ "red": 924,
1085
+ "var": 925,
1086
+ "progr": 926,
1087
+ "game": 927,
1088
+ "british": 928,
1089
+ "##ole": 929,
1090
+ "king": 930,
1091
+ "##ril": 931,
1092
+ "january": 932,
1093
+ "##stem": 933,
1094
+ "organ": 934,
1095
+ "own": 935,
1096
+ "produc": 936,
1097
+ "##ull": 937,
1098
+ "##ae": 938,
1099
+ "eur": 939,
1100
+ "contr": 940,
1101
+ "since": 941,
1102
+ "sim": 942,
1103
+ "until": 943,
1104
+ "##ever": 944,
1105
+ "government": 945,
1106
+ "sever": 946,
1107
+ "june": 947,
1108
+ "##lin": 948,
1109
+ "run": 949,
1110
+ "##ner": 950,
1111
+ "july": 951,
1112
+ "memb": 952,
1113
+ "##ene": 953,
1114
+ "land": 954,
1115
+ "york": 955,
1116
+ "val": 956,
1117
+ "miss": 957,
1118
+ "associ": 958,
1119
+ "won": 959,
1120
+ "system": 960,
1121
+ "company": 961,
1122
+ "##ized": 962,
1123
+ "cur": 963,
1124
+ "##led": 964,
1125
+ "appear": 965,
1126
+ "living": 966,
1127
+ "##ology": 967,
1128
+ "april": 968,
1129
+ "star": 969,
1130
+ "##ty": 970,
1131
+ "lo": 971,
1132
+ "english": 972,
1133
+ "##by": 973,
1134
+ "november": 974,
1135
+ "members": 975,
1136
+ "vill": 976,
1137
+ "av": 977,
1138
+ "arch": 978,
1139
+ "##ind": 979,
1140
+ "port": 980,
1141
+ "number": 981,
1142
+ "##xt": 982,
1143
+ "based": 983,
1144
+ "head": 984,
1145
+ "ep": 985,
1146
+ "championship": 986,
1147
+ "december": 987,
1148
+ "##ica": 988,
1149
+ "maj": 989,
1150
+ "child": 990,
1151
+ "name": 991,
1152
+ "released": 992,
1153
+ "educ": 993,
1154
+ "ext": 994,
1155
+ "however": 995,
1156
+ "played": 996,
1157
+ "bus": 997,
1158
+ "##ash": 998,
1159
+ "canad": 999
1160
+ }
1161
+ }
1162
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": true,
5
+ "is_local": true,
6
+ "local_files_only": false,
7
+ "mask_token": "[MASK]",
8
+ "model_max_length": 512,
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "strip_accents": null,
12
+ "tokenize_chinese_chars": true,
13
+ "tokenizer_class": "BertTokenizer",
14
+ "unk_token": "[UNK]"
15
+ }