Sentence Similarity
sentence-transformers
Safetensors
Italian
eurobert
feature-extraction
dense
Generated from Trainer
dataset_size:48119
loss:CachedMultipleNegativesRankingLoss
custom_code
Eval Results (legacy)
Instructions to use justifit/DARv2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use justifit/DARv2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("justifit/DARv2", trust_remote_code=True) sentences = [ "Query: Una SIM che offre servizi di consulenza in materia di investimenti organizza seminari saltuari di due ore per il proprio personale, sostenendo che l’assenza di contatti diretti con il denaro riduce il rischio di riciclaggio e giustifica un impegno formativo minimo. Questa condotta è conforme agli obblighi AML?", "Articolo 15\nDiritto di accesso dell'interessato\n1. L'interessato ha il diritto di ottenere dal titolare del trattamento la conferma che sia o meno in corso un trattamento di dati personali che lo riguardano e in tal caso, di ottenere l'accesso ai dati personali e alle seguenti informazioni:\na) le finalità del trattamento;\nb) le categorie di dati personali in questione;\nc) i destinatari o le categorie di destinatari a cui i dati personali sono stati o saranno comunicati, in particolare se destinatari di paesi terzi o organizzazioni internazionali;\nd) quando possibile, il periodo di conservazione dei dati personali previsto oppure, se non è possibile, i criteri utilizzati per determinare tale periodo;\ne) l'esistenza del diritto dell'interessato di chiedere al titolare del trattamento la rettifica o la cancellazione dei dati personali o la limitazione del trattamento dei dati personali che lo riguardano o di opporsi al loro trattamento;\nf) il diritto di proporre reclamo a un'autorità di controllo;\ng) qualora i dati non siano raccolti presso l'interessato, tutte le informazioni disponibili sulla loro origine;\nh) l'esistenza di un processo decisionale automatizzato, compresa la profilazione di cui all'articolo 22, paragrafi 1 e 4, e, almeno in tali casi, informazioni significative sulla logica utilizzata, nonché l'importanza e le conseguenze previste di tale trattamento per l'interessato.\n2. Qualora i dati personali siano trasferiti a un paese terzo o a un'organizzazione internazionale, l'interessato ha il diritto di essere informato dell'esistenza di garanzie adeguate ai sensi dell'articolo 46 relative al trasferimento.\n3. Il titolare del trattamento fornisce una copia dei dati personali oggetto di trattamento. In caso di ulteriori copie richieste dall'interessato, il titolare del trattamento può addebitare un contributo spese ragionevole basato sui costi amministrativi. Se l'interessato presenta la richiesta mediante mezzi elettronici, e salvo indicazione diversa dell'interessato, le informazioni sono fornite in un formato elettronico di uso comune.\n4. Il diritto di ottenere una copia di cui al paragrafo 3 non deve ledere i diritti e le libertà altrui.\n", "Art. 66.\n((1. Fermo quanto previsto dall'articolo 62, in caso di violazioni gravi, ripetute o sistematiche ovvero plurime delle disposizioni di cui al presente decreto, il Ministero dell'economia e delle finanze informa le competenti amministrazioni interessate e gli organismi di autoregolamentazione, ai fini dell'adozione, ai sensi degli articoli 9 e 11, di ogni atto idoneo ad intimare ai responsabili di porre termine alle violazioni e di astenersi dal ripeterle. Le medesime violazioni costituiscono presupposto per l'applicazione delle sanzioni disciplinari, ai sensi e per gli effetti dei rispettivi ordinamenti di settore. In tali ipotesi l'interdizione dallo svolgimento della funzione, dell'attivita' o dell'incarico non puo' essere inferiore a due mesi e superiore a cinque anni.\n2. Nei casi di violazioni gravi, ripetute o sistematiche ovvero plurime delle disposizioni in materia di adeguata verifica della clientela, di conservazione, di segnalazione di operazione sospetta e di controlli interni, il decreto che irroga le sanzioni e' pubblicato senza ritardo e per estratto, su apposita sezione del sito web del Ministero dell'economia e delle finanze ovvero delle autorita' di vigilanza di settore, in ragione delle attribuzioni e delle modalita' attuative di rispettiva pertinenza. La pubblicazione per estratto reca indicazione delle violazioni accertate, delle disposizioni violate, dei soggetti sanzionati, delle sanzioni rispettivamente applicate nonche', nel caso in cui sia adita l'autorita' giudiziaria, dell'avvio dell'azione giudiziaria e dell'esito della stessa. Le informazioni pubblicate restano sul sito web per un periodo di cinque anni.\n3. Ferma la discrezionalita' dell'autorita' procedente in ordine alla valutazione della proporzionalita' della misura rispetto alla violazione sanzionata, non si da' luogo alla pubblicazione nel caso in cui essa possa comportare rischi per la stabilita' dei mercati finanziari o pregiudicare lo svolgimento di un'indagine in corso.\nQualora detti impedimenti abbiano carattere temporaneo, la pubblicazione puo' essere differita al momento in cui essi siano venuti meno.\n4. Le sanzioni amministrative applicate dalle autorita' di vigilanza di settore ai sensi dell'articolo 62, ivi comprese quelle pubblicate in forma anonima, nonche' le informazioni ricevute dai soggetti interessati sulle azioni da essi avviate avverso i provvedimenti sanzionatori e sull'esito delle stesse sono comunicate all'ABE, all'AEAP e all'AESFEM dall'autorita' di vigilanza di settore che ne e' membro.))\n((23))\n<pre>-------------AGGIORNAMENTO (23)</pre>\n", "Art. 394.\n(Capacita' dell'emancipato).\nL'emancipazione conferisce al minore la capacita' di compiere gli atti che non eccedono l'ordinaria amministrazione.\nIl minore emancipato puo' con l'assistenza del curatore riscuotere i capitali sotto la condizione di un idoneo impiego e puo' stare in giudizio sia come attore sia come convenuto.\nPer gli altri atti eccedenti l'ordinaria amministrazione, oltre il consenso del curatore, e' necessaria l'autorizzazione del giudice tutelare. PERIODO SOPPRESSO DAL D.LGS. 10 OTTOBRE 2022, N. 149.\nQualora nasca conflitto di interessi fra il minore e il curatore, e' nominato un curatore speciale a norma dell'ultimo comma dell'art. 320.\n" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +0 -0
- config.json +59 -0
- config_sentence_transformers.json +14 -0
- configuration_eurobert.py +216 -0
- model.safetensors +3 -0
- modeling_eurobert.py +1094 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +30 -0
- tokenizer.json +3 -0
- tokenizer_config.json +2074 -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": 768,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": false,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": true,
|
| 9 |
+
"include_prompt": true
|
| 10 |
+
}
|
README.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
config.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"EuroBertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_eurobert.EuroBertConfig",
|
| 9 |
+
"AutoModel": "modeling_eurobert.EuroBertModel",
|
| 10 |
+
"AutoModelForMaskedLM": "modeling_eurobert.EuroBertForMaskedLM"
|
| 11 |
+
},
|
| 12 |
+
"bos_token": "<|begin_of_text|>",
|
| 13 |
+
"bos_token_id": 128000,
|
| 14 |
+
"clf_pooling": "late",
|
| 15 |
+
"dtype": "float32",
|
| 16 |
+
"eos_token": "<|end_of_text|>",
|
| 17 |
+
"eos_token_id": 128001,
|
| 18 |
+
"head_dim": 64,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_dropout": 0.0,
|
| 21 |
+
"hidden_size": 768,
|
| 22 |
+
"initializer_range": 0.02,
|
| 23 |
+
"intermediate_size": 3072,
|
| 24 |
+
"mask_token": "<|mask|>",
|
| 25 |
+
"mask_token_id": 128002,
|
| 26 |
+
"max_position_embeddings": 8192,
|
| 27 |
+
"mlp_bias": false,
|
| 28 |
+
"model_type": "eurobert",
|
| 29 |
+
"num_attention_heads": 12,
|
| 30 |
+
"num_hidden_layers": 12,
|
| 31 |
+
"num_key_value_heads": 12,
|
| 32 |
+
"pad_token": "<|end_of_text|>",
|
| 33 |
+
"pad_token_id": 128001,
|
| 34 |
+
"pretraining_tp": 1,
|
| 35 |
+
"rms_norm_eps": 1e-05,
|
| 36 |
+
"rope_parameters": {
|
| 37 |
+
"factor": 1.0,
|
| 38 |
+
"rope_theta": 1000000,
|
| 39 |
+
"rope_type": "default"
|
| 40 |
+
},
|
| 41 |
+
"rope_scaling": {
|
| 42 |
+
"factor": 1.0,
|
| 43 |
+
"rope_type": "linear"
|
| 44 |
+
},
|
| 45 |
+
"rope_theta": 250000.0,
|
| 46 |
+
"task_names": [
|
| 47 |
+
"retrieval",
|
| 48 |
+
"text-matching",
|
| 49 |
+
"clustering",
|
| 50 |
+
"classification"
|
| 51 |
+
],
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"transformers.js_config": {
|
| 54 |
+
"use_external_data_format": true
|
| 55 |
+
},
|
| 56 |
+
"transformers_version": "4.57.6",
|
| 57 |
+
"use_cache": false,
|
| 58 |
+
"vocab_size": 128256
|
| 59 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "5.2.3",
|
| 4 |
+
"transformers": "4.57.6",
|
| 5 |
+
"pytorch": "2.6.0+cu124"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {
|
| 8 |
+
"query": "Query: ",
|
| 9 |
+
"document": ""
|
| 10 |
+
},
|
| 11 |
+
"default_prompt_name": null,
|
| 12 |
+
"similarity_fn_name": "cosine",
|
| 13 |
+
"model_type": "SentenceTransformer"
|
| 14 |
+
}
|
configuration_eurobert.py
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/eurobert/modular_eurobert.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_eurobert.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# coding=utf-8
|
| 8 |
+
# Copyright 2025 Nicolas Boizard, Duarte M. Alves, Hippolyte Gisserot-Boukhlef and the EuroBert team. All rights reserved.
|
| 9 |
+
#
|
| 10 |
+
#
|
| 11 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 12 |
+
# you may not use this file except in compliance with the License.
|
| 13 |
+
# You may obtain a copy of the License at
|
| 14 |
+
#
|
| 15 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 16 |
+
#
|
| 17 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 18 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 19 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 20 |
+
# See the License for the specific language governing permissions and
|
| 21 |
+
# limitations under the License.
|
| 22 |
+
|
| 23 |
+
from transformers.utils import logging
|
| 24 |
+
from transformers.models.llama import LlamaConfig
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
logger = logging.get_logger(__name__)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class EuroBertConfig(LlamaConfig):
|
| 31 |
+
r"""
|
| 32 |
+
This is the configuration class to store the configuration of a [`EuroBertModel`]. It is used to instantiate an EuroBert
|
| 33 |
+
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
|
| 34 |
+
defaults will yield a similar configuration to that of the EuroBERT-210m.
|
| 35 |
+
|
| 36 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
| 37 |
+
documentation from [`PretrainedConfig`] for more information.
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
Args:
|
| 41 |
+
vocab_size (`int`, *optional*, defaults to 128256):
|
| 42 |
+
Vocabulary size of the EuroBert model. Defines the number of different tokens that can be represented by the
|
| 43 |
+
`inputs_ids` passed when calling [`EuroBertModel`]
|
| 44 |
+
hidden_size (`int`, *optional*, defaults to 768):
|
| 45 |
+
Dimensionality of the encoder layers and the pooler layer.
|
| 46 |
+
intermediate_size (`int`, *optional*, defaults to 3072):
|
| 47 |
+
Dimensionality of the "intermediate" (often named feed-forward) layer in the Transformer encoder.
|
| 48 |
+
num_hidden_layers (`int`, *optional*, defaults to 12):
|
| 49 |
+
Number of hidden layers in the Transformer encoder.
|
| 50 |
+
num_attention_heads (`int`, *optional*, defaults to 12):
|
| 51 |
+
Number of attention heads for each attention layer in the Transformer encoder.
|
| 52 |
+
num_key_value_heads (`int`, *optional*):
|
| 53 |
+
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
|
| 54 |
+
`num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
|
| 55 |
+
`num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
|
| 56 |
+
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
|
| 57 |
+
by meanpooling all the original heads within that group. For more details checkout [this
|
| 58 |
+
paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
|
| 59 |
+
`num_attention_heads`.
|
| 60 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
|
| 61 |
+
The non-linear activation function (function or string) in the encoder and pooler.
|
| 62 |
+
max_position_embeddings (`int`, *optional*, defaults to 8192):
|
| 63 |
+
The maximum sequence length that this model might ever be used with. EuroBert supports up to 8192 tokens,
|
| 64 |
+
EuroBert-pretrained up to 2048.
|
| 65 |
+
initializer_range (`float`, *optional*, defaults to 0.02):
|
| 66 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
| 67 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-05):
|
| 68 |
+
The epsilon used by the rms normalization layers.
|
| 69 |
+
bos_token_id (`int`, *optional*, defaults to 128000):
|
| 70 |
+
Beginning of stream token id.
|
| 71 |
+
eos_token_id (`int`, *optional*, defaults to 128001):
|
| 72 |
+
End of stream token id.
|
| 73 |
+
pad_token_id (`int`, *optional*, defaults to 128001):
|
| 74 |
+
Padding token id.
|
| 75 |
+
mask_token_id (`int`, *optional*, defaults to 128002):
|
| 76 |
+
Mask token id.
|
| 77 |
+
pretraining_tp (`int`, *optional*, defaults to 1):
|
| 78 |
+
Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
|
| 79 |
+
document](https://huggingface.co/docs/transformers/main/perf_train_gpu_many#tensor-parallelism) to
|
| 80 |
+
understand more about it. This value is necessary to ensure exact reproducibility of the pretraining
|
| 81 |
+
results. Please refer to [this issue](https://github.com/pytorch/pytorch/issues/76232).
|
| 82 |
+
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
|
| 83 |
+
Whether to tie weight embeddings
|
| 84 |
+
rope_theta (`float`, *optional*, defaults to 250000.0):
|
| 85 |
+
The base period of the RoPE embeddings. EuroBert used base period of 250000.0,
|
| 86 |
+
EuroBert-pretrained 10000.0.
|
| 87 |
+
rope_scaling (`Dict`, *optional*):
|
| 88 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type
|
| 89 |
+
and you expect the model to work on longer `max_position_embeddings`, we recommend you to update this value
|
| 90 |
+
accordingly.
|
| 91 |
+
Expected contents:
|
| 92 |
+
`rope_type` (`str`):
|
| 93 |
+
The sub-variant of RoPE to use. Can be one of ['default', 'linear', 'dynamic', 'yarn', 'longrope',
|
| 94 |
+
'eurobert3'], with 'default' being the original RoPE implementation.
|
| 95 |
+
`factor` (`float`, *optional*):
|
| 96 |
+
Used with all rope types except 'default'. The scaling factor to apply to the RoPE embeddings. In
|
| 97 |
+
most scaling types, a `factor` of x will enable the model to handle sequences of length x *
|
| 98 |
+
original maximum pre-trained length.
|
| 99 |
+
`original_max_position_embeddings` (`int`, *optional*):
|
| 100 |
+
Used with 'dynamic', 'longrope' and 'eurobert3'. The original max position embeddings used during
|
| 101 |
+
pretraining.
|
| 102 |
+
`attention_factor` (`float`, *optional*):
|
| 103 |
+
Used with 'yarn' and 'longrope'. The scaling factor to be applied on the attention
|
| 104 |
+
computation. If unspecified, it defaults to value recommended by the implementation, using the
|
| 105 |
+
`factor` field to infer the suggested value.
|
| 106 |
+
`beta_fast` (`float`, *optional*):
|
| 107 |
+
Only used with 'yarn'. Parameter to set the boundary for extrapolation (only) in the linear
|
| 108 |
+
ramp function. If unspecified, it defaults to 32.
|
| 109 |
+
`beta_slow` (`float`, *optional*):
|
| 110 |
+
Only used with 'yarn'. Parameter to set the boundary for interpolation (only) in the linear
|
| 111 |
+
ramp function. If unspecified, it defaults to 1.
|
| 112 |
+
`short_factor` (`List[float]`, *optional*):
|
| 113 |
+
Only used with 'longrope'. The scaling factor to be applied to short contexts (<
|
| 114 |
+
`original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
|
| 115 |
+
size divided by the number of attention heads divided by 2
|
| 116 |
+
`long_factor` (`List[float]`, *optional*):
|
| 117 |
+
Only used with 'longrope'. The scaling factor to be applied to long contexts (<
|
| 118 |
+
`original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
|
| 119 |
+
size divided by the number of attention heads divided by 2
|
| 120 |
+
`low_freq_factor` (`float`, *optional*):
|
| 121 |
+
Only used with 'eurobert3'. Scaling factor applied to low frequency components of the RoPE
|
| 122 |
+
`high_freq_factor` (`float`, *optional*):
|
| 123 |
+
Only used with 'eurobert3'. Scaling factor applied to high frequency components of the RoPE
|
| 124 |
+
attention_bias (`bool`, *optional*, defaults to `False`):
|
| 125 |
+
Whether to use a bias in the query, key, value and output projection layers during self-attention.
|
| 126 |
+
attention_dropout (`float`, *optional*, defaults to 0.0):
|
| 127 |
+
The dropout ratio for the attention probabilities.
|
| 128 |
+
mlp_bias (`bool`, *optional*, defaults to `False`):
|
| 129 |
+
Whether to use a bias in up_proj, down_proj and gate_proj layers in the MLP layers.
|
| 130 |
+
head_dim (`int`, *optional*):
|
| 131 |
+
The attention head dimension. If None, it will default to hidden_size // num_attention_heads
|
| 132 |
+
classifier_pooling (`str`, *optional*, defaults to `"late"`):
|
| 133 |
+
The pooling strategy to use for the classifier. Can be one of ['bos', 'mean', 'late'].
|
| 134 |
+
|
| 135 |
+
```python
|
| 136 |
+
>>> from transformers import EuroBertModel, EuroBertConfig
|
| 137 |
+
|
| 138 |
+
>>> # Initializing a EuroBert eurobert-base style configuration
|
| 139 |
+
>>> configuration = EuroBertConfig()
|
| 140 |
+
|
| 141 |
+
>>> # Initializing a model from the eurobert-base style configuration
|
| 142 |
+
>>> model = EuroBertModel(configuration)
|
| 143 |
+
|
| 144 |
+
>>> # Accessing the model configuration
|
| 145 |
+
>>> configuration = model.config
|
| 146 |
+
```"""
|
| 147 |
+
|
| 148 |
+
model_type = "eurobert"
|
| 149 |
+
|
| 150 |
+
def __init__(
|
| 151 |
+
self,
|
| 152 |
+
vocab_size=128256,
|
| 153 |
+
hidden_size=768,
|
| 154 |
+
intermediate_size=3072,
|
| 155 |
+
num_hidden_layers=12,
|
| 156 |
+
num_attention_heads=12,
|
| 157 |
+
num_key_value_heads=None,
|
| 158 |
+
hidden_act="silu",
|
| 159 |
+
max_position_embeddings=8192,
|
| 160 |
+
initializer_range=0.02,
|
| 161 |
+
rms_norm_eps=1e-05,
|
| 162 |
+
bos_token_id=128000,
|
| 163 |
+
eos_token_id=128001,
|
| 164 |
+
pad_token_id=128001,
|
| 165 |
+
mask_token_id=128002,
|
| 166 |
+
pretraining_tp=1,
|
| 167 |
+
tie_word_embeddings=False,
|
| 168 |
+
rope_theta=250000.0,
|
| 169 |
+
rope_scaling=None,
|
| 170 |
+
attention_bias=False,
|
| 171 |
+
attention_dropout=0.0,
|
| 172 |
+
mlp_bias=False,
|
| 173 |
+
head_dim=None,
|
| 174 |
+
classifier_pooling="late",
|
| 175 |
+
**kwargs,
|
| 176 |
+
):
|
| 177 |
+
# use_cache is specific to decoder models and should be set to False for encoder models
|
| 178 |
+
use_cache = kwargs.pop("use_cache", None)
|
| 179 |
+
if use_cache:
|
| 180 |
+
logger.warning_once(
|
| 181 |
+
"The `use_cache` argument to EuroBertConfig is set to `False`, as caching is never used for encoder models."
|
| 182 |
+
)
|
| 183 |
+
|
| 184 |
+
if num_key_value_heads is None:
|
| 185 |
+
num_key_value_heads = num_attention_heads
|
| 186 |
+
|
| 187 |
+
super().__init__(
|
| 188 |
+
vocab_size=vocab_size,
|
| 189 |
+
hidden_size=hidden_size,
|
| 190 |
+
intermediate_size=intermediate_size,
|
| 191 |
+
num_hidden_layers=num_hidden_layers,
|
| 192 |
+
num_attention_heads=num_attention_heads,
|
| 193 |
+
num_key_value_heads=num_key_value_heads,
|
| 194 |
+
hidden_act=hidden_act,
|
| 195 |
+
max_position_embeddings=max_position_embeddings,
|
| 196 |
+
initializer_range=initializer_range,
|
| 197 |
+
rms_norm_eps=rms_norm_eps,
|
| 198 |
+
use_cache=False,
|
| 199 |
+
bos_token_id=bos_token_id,
|
| 200 |
+
eos_token_id=eos_token_id,
|
| 201 |
+
pad_token_id=pad_token_id,
|
| 202 |
+
pretraining_tp=pretraining_tp,
|
| 203 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 204 |
+
rope_theta=rope_theta,
|
| 205 |
+
rope_scaling=rope_scaling,
|
| 206 |
+
attention_bias=attention_bias,
|
| 207 |
+
attention_dropout=attention_dropout,
|
| 208 |
+
mlp_bias=mlp_bias,
|
| 209 |
+
head_dim=head_dim,
|
| 210 |
+
**kwargs,
|
| 211 |
+
)
|
| 212 |
+
self.mask_token_id = mask_token_id
|
| 213 |
+
self.clf_pooling = classifier_pooling
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
__all__ = ["EuroBertConfig"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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/eurobert/modular_eurobert.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_eurobert.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# coding=utf-8
|
| 8 |
+
# Copyright 2025 Nicolas Boizard, Duarte M. Alves, Hippolyte Gisserot-Boukhlef and the EuroBert team. All rights reserved.
|
| 9 |
+
#
|
| 10 |
+
#
|
| 11 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 12 |
+
# you may not use this file except in compliance with the License.
|
| 13 |
+
# You may obtain a copy of the License at
|
| 14 |
+
#
|
| 15 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 16 |
+
#
|
| 17 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 18 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 19 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 20 |
+
# See the License for the specific language governing permissions and
|
| 21 |
+
# limitations under the License.
|
| 22 |
+
|
| 23 |
+
from typing import Callable, Optional, Tuple, Union
|
| 24 |
+
|
| 25 |
+
import torch
|
| 26 |
+
from torch import nn
|
| 27 |
+
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
| 28 |
+
|
| 29 |
+
try:
|
| 30 |
+
from transformers import initialization as init
|
| 31 |
+
except ImportError: # transformers < v5
|
| 32 |
+
from transformers import modeling_utils as _modeling_utils
|
| 33 |
+
init = getattr(_modeling_utils, "init", torch.nn.init)
|
| 34 |
+
|
| 35 |
+
from transformers.activations import ACT2FN
|
| 36 |
+
from transformers.cache_utils import Cache, StaticCache
|
| 37 |
+
from transformers.modeling_attn_mask_utils import AttentionMaskConverter
|
| 38 |
+
from transformers.modeling_flash_attention_utils import FlashAttentionKwargs
|
| 39 |
+
from transformers.modeling_outputs import (
|
| 40 |
+
BaseModelOutput,
|
| 41 |
+
BaseModelOutputWithPast,
|
| 42 |
+
MaskedLMOutput,
|
| 43 |
+
QuestionAnsweringModelOutput,
|
| 44 |
+
SequenceClassifierOutput,
|
| 45 |
+
TokenClassifierOutput,
|
| 46 |
+
)
|
| 47 |
+
from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS
|
| 48 |
+
from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
|
| 49 |
+
from transformers.processing_utils import Unpack
|
| 50 |
+
from transformers.utils import (
|
| 51 |
+
add_code_sample_docstrings,
|
| 52 |
+
add_start_docstrings,
|
| 53 |
+
add_start_docstrings_to_model_forward,
|
| 54 |
+
logging,
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
try:
|
| 58 |
+
from .configuration_eurobert import EuroBertConfig
|
| 59 |
+
except ImportError:
|
| 60 |
+
from configuration_eurobert import EuroBertConfig
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
logger = logging.get_logger(__name__)
|
| 64 |
+
|
| 65 |
+
_CHECKPOINT_FOR_DOC = "EuroBERT/EuroBERT-210m"
|
| 66 |
+
_CONFIG_FOR_DOC = "EuroBertConfig"
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
class EuroBertRMSNorm(nn.Module):
|
| 70 |
+
def __init__(self, hidden_size, eps=1e-5):
|
| 71 |
+
"""
|
| 72 |
+
EuroBertRMSNorm is equivalent to T5LayerNorm
|
| 73 |
+
"""
|
| 74 |
+
super().__init__()
|
| 75 |
+
self.weight = nn.Parameter(torch.ones(hidden_size))
|
| 76 |
+
self.variance_epsilon = eps
|
| 77 |
+
|
| 78 |
+
def forward(self, hidden_states):
|
| 79 |
+
input_dtype = hidden_states.dtype
|
| 80 |
+
hidden_states = hidden_states.to(torch.float32)
|
| 81 |
+
variance = hidden_states.pow(2).mean(-1, keepdim=True)
|
| 82 |
+
hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon)
|
| 83 |
+
return self.weight * hidden_states.to(input_dtype)
|
| 84 |
+
|
| 85 |
+
def extra_repr(self):
|
| 86 |
+
return f"{tuple(self.weight.shape)}, eps={self.variance_epsilon}"
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
def rotate_half(x):
|
| 90 |
+
"""Rotates half the hidden dims of the input."""
|
| 91 |
+
x1 = x[..., : x.shape[-1] // 2]
|
| 92 |
+
x2 = x[..., x.shape[-1] // 2 :]
|
| 93 |
+
return torch.cat((-x2, x1), dim=-1)
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_dim=1):
|
| 97 |
+
"""Applies Rotary Position Embedding to the query and key tensors.
|
| 98 |
+
|
| 99 |
+
Args:
|
| 100 |
+
q (`torch.Tensor`): The query tensor.
|
| 101 |
+
k (`torch.Tensor`): The key tensor.
|
| 102 |
+
cos (`torch.Tensor`): The cosine part of the rotary embedding.
|
| 103 |
+
sin (`torch.Tensor`): The sine part of the rotary embedding.
|
| 104 |
+
position_ids (`torch.Tensor`, *optional*):
|
| 105 |
+
Deprecated and unused.
|
| 106 |
+
unsqueeze_dim (`int`, *optional*, defaults to 1):
|
| 107 |
+
The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
|
| 108 |
+
sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
|
| 109 |
+
that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
|
| 110 |
+
k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
|
| 111 |
+
cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
|
| 112 |
+
the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
|
| 113 |
+
Returns:
|
| 114 |
+
`tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
|
| 115 |
+
"""
|
| 116 |
+
cos = cos.unsqueeze(unsqueeze_dim)
|
| 117 |
+
sin = sin.unsqueeze(unsqueeze_dim)
|
| 118 |
+
q_embed = (q * cos) + (rotate_half(q) * sin)
|
| 119 |
+
k_embed = (k * cos) + (rotate_half(k) * sin)
|
| 120 |
+
return q_embed, k_embed
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
|
| 124 |
+
"""
|
| 125 |
+
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
|
| 126 |
+
num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
|
| 127 |
+
"""
|
| 128 |
+
batch, num_key_value_heads, slen, head_dim = hidden_states.shape
|
| 129 |
+
if n_rep == 1:
|
| 130 |
+
return hidden_states
|
| 131 |
+
hidden_states = hidden_states[:, :, None, :, :].expand(batch, num_key_value_heads, n_rep, slen, head_dim)
|
| 132 |
+
return hidden_states.reshape(batch, num_key_value_heads * n_rep, slen, head_dim)
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def eager_attention_forward(
|
| 136 |
+
module: nn.Module,
|
| 137 |
+
query: torch.Tensor,
|
| 138 |
+
key: torch.Tensor,
|
| 139 |
+
value: torch.Tensor,
|
| 140 |
+
attention_mask: Optional[torch.Tensor],
|
| 141 |
+
scaling: float,
|
| 142 |
+
dropout: float = 0.0,
|
| 143 |
+
**kwargs,
|
| 144 |
+
):
|
| 145 |
+
key_states = repeat_kv(key, module.num_key_value_groups)
|
| 146 |
+
value_states = repeat_kv(value, module.num_key_value_groups)
|
| 147 |
+
|
| 148 |
+
attn_weights = torch.matmul(query, key_states.transpose(2, 3)) * scaling
|
| 149 |
+
if attention_mask is not None:
|
| 150 |
+
causal_mask = attention_mask[:, :, :, : key_states.shape[-2]]
|
| 151 |
+
attn_weights = attn_weights + causal_mask
|
| 152 |
+
|
| 153 |
+
attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
|
| 154 |
+
attn_weights = nn.functional.dropout(attn_weights, p=dropout, training=module.training)
|
| 155 |
+
attn_output = torch.matmul(attn_weights, value_states)
|
| 156 |
+
attn_output = attn_output.transpose(1, 2).contiguous()
|
| 157 |
+
|
| 158 |
+
return attn_output, attn_weights
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
class EuroBertAttention(nn.Module):
|
| 162 |
+
"""Multi-headed attention from 'Attention Is All You Need' paper"""
|
| 163 |
+
|
| 164 |
+
def __init__(self, config: EuroBertConfig, layer_idx: int):
|
| 165 |
+
super().__init__()
|
| 166 |
+
self.config = config
|
| 167 |
+
self.layer_idx = layer_idx
|
| 168 |
+
self.head_dim = getattr(config, "head_dim", config.hidden_size // config.num_attention_heads)
|
| 169 |
+
self.num_key_value_groups = config.num_attention_heads // config.num_key_value_heads
|
| 170 |
+
self.scaling = self.head_dim**-0.5
|
| 171 |
+
self.attention_dropout = config.attention_dropout
|
| 172 |
+
self.is_causal = False
|
| 173 |
+
|
| 174 |
+
self.q_proj = nn.Linear(
|
| 175 |
+
config.hidden_size, config.num_attention_heads * self.head_dim, bias=config.attention_bias
|
| 176 |
+
)
|
| 177 |
+
self.k_proj = nn.Linear(
|
| 178 |
+
config.hidden_size, config.num_key_value_heads * self.head_dim, bias=config.attention_bias
|
| 179 |
+
)
|
| 180 |
+
self.v_proj = nn.Linear(
|
| 181 |
+
config.hidden_size, config.num_key_value_heads * self.head_dim, bias=config.attention_bias
|
| 182 |
+
)
|
| 183 |
+
self.o_proj = nn.Linear(
|
| 184 |
+
config.num_attention_heads * self.head_dim, config.hidden_size, bias=config.attention_bias
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
def forward(
|
| 188 |
+
self,
|
| 189 |
+
hidden_states: torch.Tensor,
|
| 190 |
+
position_embeddings: Tuple[torch.Tensor, torch.Tensor],
|
| 191 |
+
attention_mask: Optional[torch.Tensor],
|
| 192 |
+
**kwargs: Unpack[FlashAttentionKwargs],
|
| 193 |
+
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
|
| 194 |
+
input_shape = hidden_states.shape[:-1]
|
| 195 |
+
|
| 196 |
+
hidden_shape = (*input_shape, -1, self.head_dim)
|
| 197 |
+
|
| 198 |
+
query_states = self.q_proj(hidden_states).view(hidden_shape).transpose(1, 2)
|
| 199 |
+
key_states = self.k_proj(hidden_states).view(hidden_shape).transpose(1, 2)
|
| 200 |
+
value_states = self.v_proj(hidden_states).view(hidden_shape).transpose(1, 2)
|
| 201 |
+
|
| 202 |
+
cos, sin = position_embeddings
|
| 203 |
+
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
|
| 204 |
+
|
| 205 |
+
attention_interface: Callable = eager_attention_forward
|
| 206 |
+
if self.config._attn_implementation != "eager":
|
| 207 |
+
if self.config._attn_implementation == "sdpa" and kwargs.get("output_attentions", False):
|
| 208 |
+
logger.warning_once(
|
| 209 |
+
"`torch.nn.functional.scaled_dot_product_attention` does not support `output_attentions=True`. Falling back to "
|
| 210 |
+
'eager attention. This warning can be removed using the argument `attn_implementation="eager"` when loading the model.'
|
| 211 |
+
)
|
| 212 |
+
else:
|
| 213 |
+
attention_interface = ALL_ATTENTION_FUNCTIONS[self.config._attn_implementation]
|
| 214 |
+
attn_output, attn_weights = attention_interface(
|
| 215 |
+
self,
|
| 216 |
+
query_states,
|
| 217 |
+
key_states,
|
| 218 |
+
value_states,
|
| 219 |
+
attention_mask,
|
| 220 |
+
dropout=0.0 if not self.training else self.attention_dropout,
|
| 221 |
+
scaling=self.scaling,
|
| 222 |
+
is_causal=False,
|
| 223 |
+
**kwargs,
|
| 224 |
+
)
|
| 225 |
+
attn_output = attn_output.reshape(*input_shape, -1).contiguous()
|
| 226 |
+
attn_output = self.o_proj(attn_output)
|
| 227 |
+
return attn_output, attn_weights
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
EUROBERT_START_DOCSTRING = r"""
|
| 231 |
+
This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the
|
| 232 |
+
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
|
| 233 |
+
etc.)
|
| 234 |
+
|
| 235 |
+
This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass.
|
| 236 |
+
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
|
| 237 |
+
and behavior.
|
| 238 |
+
|
| 239 |
+
Parameters:
|
| 240 |
+
config ([`EuroBertConfig`]):
|
| 241 |
+
Model configuration class with all the parameters of the model. Initializing with a config file does not
|
| 242 |
+
load the weights associated with the model, only the configuration. Check out the
|
| 243 |
+
[`~PreTrainedModel.from_pretrained`] method to load the model weights.
|
| 244 |
+
"""
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
@add_start_docstrings(
|
| 248 |
+
"The bare EuroBERT Model outputting raw hidden-states without any specific head on top.",
|
| 249 |
+
EUROBERT_START_DOCSTRING,
|
| 250 |
+
)
|
| 251 |
+
class EuroBertPreTrainedModel(PreTrainedModel):
|
| 252 |
+
config_class = EuroBertConfig
|
| 253 |
+
base_model_prefix = "model"
|
| 254 |
+
supports_gradient_checkpointing = True
|
| 255 |
+
_no_split_modules = ["EuroBertDecoderLayer"]
|
| 256 |
+
_skip_keys_device_placement = ["past_key_values"]
|
| 257 |
+
_supports_flash_attn_2 = True
|
| 258 |
+
_supports_sdpa = True
|
| 259 |
+
_supports_flex_attn = True
|
| 260 |
+
_supports_cache_class = True
|
| 261 |
+
_supports_quantized_cache = True
|
| 262 |
+
_supports_static_cache = True
|
| 263 |
+
_supports_attention_backend = True
|
| 264 |
+
|
| 265 |
+
def _init_weights(self, module):
|
| 266 |
+
std = self.config.initializer_range
|
| 267 |
+
if isinstance(module, nn.Linear):
|
| 268 |
+
init.normal_(module.weight, mean=0.0, std=std)
|
| 269 |
+
if module.bias is not None:
|
| 270 |
+
init.zeros_(module.bias)
|
| 271 |
+
elif isinstance(module, nn.Embedding):
|
| 272 |
+
init.normal_(module.weight, mean=0.0, std=std)
|
| 273 |
+
if module.padding_idx is not None and not getattr(module.weight, "_is_hf_initialized", False):
|
| 274 |
+
init.zeros_(module.weight[module.padding_idx])
|
| 275 |
+
elif isinstance(module, EuroBertRotaryEmbedding):
|
| 276 |
+
rope_fn = ROPE_INIT_FUNCTIONS[module.rope_type]
|
| 277 |
+
buffer_value, _ = rope_fn(module.config, device=module.inv_freq.device)
|
| 278 |
+
if hasattr(init, "copy_"):
|
| 279 |
+
init.copy_(module.inv_freq, buffer_value)
|
| 280 |
+
init.copy_(module.original_inv_freq, buffer_value)
|
| 281 |
+
else:
|
| 282 |
+
module.inv_freq.copy_(buffer_value)
|
| 283 |
+
module.original_inv_freq.copy_(buffer_value)
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
class EuroBertRotaryEmbedding(nn.Module):
|
| 287 |
+
def __init__(self, config: EuroBertConfig, device=None):
|
| 288 |
+
super().__init__()
|
| 289 |
+
# BC: "rope_type" was originally "type"
|
| 290 |
+
if hasattr(config, "rope_scaling") and config.rope_scaling is not None:
|
| 291 |
+
self.rope_type = config.rope_scaling.get("rope_type", config.rope_scaling.get("type"))
|
| 292 |
+
else:
|
| 293 |
+
self.rope_type = "default"
|
| 294 |
+
if self.rope_type == "default":
|
| 295 |
+
self.rope_type = "linear"
|
| 296 |
+
# Ensure rope_scaling is set up with factor=1.0 for linear (no scaling, equivalent to default)
|
| 297 |
+
if not hasattr(config, "rope_scaling") or config.rope_scaling is None:
|
| 298 |
+
config.rope_scaling = {"rope_type": "linear", "factor": 1.0}
|
| 299 |
+
elif "factor" not in config.rope_scaling:
|
| 300 |
+
config.rope_scaling["factor"] = 1.0
|
| 301 |
+
self.max_seq_len_cached = config.max_position_embeddings
|
| 302 |
+
self.original_max_seq_len = config.max_position_embeddings
|
| 303 |
+
|
| 304 |
+
self.config = config
|
| 305 |
+
self.rope_init_fn = ROPE_INIT_FUNCTIONS[self.rope_type]
|
| 306 |
+
inv_freq, self.attention_scaling = self.rope_init_fn(self.config, device)
|
| 307 |
+
self.register_buffer("inv_freq", inv_freq, persistent=False)
|
| 308 |
+
self.original_inv_freq = self.inv_freq
|
| 309 |
+
|
| 310 |
+
def _dynamic_frequency_update(self, position_ids, device):
|
| 311 |
+
"""
|
| 312 |
+
dynamic RoPE layers should recompute `inv_freq` in the following situations:
|
| 313 |
+
1 - growing beyond the cached sequence length (allow scaling)
|
| 314 |
+
2 - the current sequence length is in the original scale (avoid losing precision with small sequences)
|
| 315 |
+
"""
|
| 316 |
+
seq_len = torch.max(position_ids) + 1
|
| 317 |
+
if seq_len > self.max_seq_len_cached: # growth
|
| 318 |
+
inv_freq, self.attention_scaling = self.rope_init_fn(self.config, device, seq_len=seq_len)
|
| 319 |
+
self.register_buffer("inv_freq", inv_freq, persistent=False) # TODO joao: may break with compilation
|
| 320 |
+
self.max_seq_len_cached = seq_len
|
| 321 |
+
|
| 322 |
+
if seq_len < self.original_max_seq_len and self.max_seq_len_cached > self.original_max_seq_len: # reset
|
| 323 |
+
# This .to() is needed if the model has been moved to a device after being initialized (because
|
| 324 |
+
# the buffer is automatically moved, but not the original copy)
|
| 325 |
+
self.original_inv_freq = self.original_inv_freq.to(device)
|
| 326 |
+
self.register_buffer("inv_freq", self.original_inv_freq, persistent=False)
|
| 327 |
+
self.max_seq_len_cached = self.original_max_seq_len
|
| 328 |
+
|
| 329 |
+
@torch.no_grad()
|
| 330 |
+
def forward(self, x, position_ids):
|
| 331 |
+
if "dynamic" in self.rope_type:
|
| 332 |
+
self._dynamic_frequency_update(position_ids, device=x.device)
|
| 333 |
+
|
| 334 |
+
# Core RoPE block
|
| 335 |
+
inv_freq_expanded = self.inv_freq[None, :, None].float().expand(position_ids.shape[0], -1, 1)
|
| 336 |
+
position_ids_expanded = position_ids[:, None, :].float()
|
| 337 |
+
# Force float32 (see https://github.com/huggingface/transformers/pull/29285)
|
| 338 |
+
device_type = x.device.type
|
| 339 |
+
device_type = device_type if isinstance(device_type, str) and device_type != "mps" else "cpu"
|
| 340 |
+
with torch.autocast(device_type=device_type, enabled=False):
|
| 341 |
+
freqs = (inv_freq_expanded.float() @ position_ids_expanded.float()).transpose(1, 2)
|
| 342 |
+
emb = torch.cat((freqs, freqs), dim=-1)
|
| 343 |
+
cos = emb.cos()
|
| 344 |
+
sin = emb.sin()
|
| 345 |
+
|
| 346 |
+
# Advanced RoPE types (e.g. yarn) apply a post-processing scaling factor, equivalent to scaling attention
|
| 347 |
+
cos = cos * self.attention_scaling
|
| 348 |
+
sin = sin * self.attention_scaling
|
| 349 |
+
|
| 350 |
+
return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
class EuroBertMLP(nn.Module):
|
| 354 |
+
def __init__(self, config):
|
| 355 |
+
super().__init__()
|
| 356 |
+
self.config = config
|
| 357 |
+
self.hidden_size = config.hidden_size
|
| 358 |
+
self.intermediate_size = config.intermediate_size
|
| 359 |
+
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=config.mlp_bias)
|
| 360 |
+
self.up_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=config.mlp_bias)
|
| 361 |
+
self.down_proj = nn.Linear(self.intermediate_size, self.hidden_size, bias=config.mlp_bias)
|
| 362 |
+
self.act_fn = ACT2FN[config.hidden_act]
|
| 363 |
+
|
| 364 |
+
def forward(self, x):
|
| 365 |
+
down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
|
| 366 |
+
return down_proj
|
| 367 |
+
|
| 368 |
+
|
| 369 |
+
class EuroBertDecoderLayer(nn.Module):
|
| 370 |
+
def __init__(self, config: EuroBertConfig, layer_idx: int):
|
| 371 |
+
super().__init__()
|
| 372 |
+
self.hidden_size = config.hidden_size
|
| 373 |
+
|
| 374 |
+
self.self_attn = EuroBertAttention(config=config, layer_idx=layer_idx)
|
| 375 |
+
|
| 376 |
+
self.mlp = EuroBertMLP(config)
|
| 377 |
+
self.input_layernorm = EuroBertRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 378 |
+
self.post_attention_layernorm = EuroBertRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 379 |
+
|
| 380 |
+
def forward(
|
| 381 |
+
self,
|
| 382 |
+
hidden_states: torch.Tensor,
|
| 383 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 384 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 385 |
+
past_key_value: Optional[Cache] = None,
|
| 386 |
+
output_attentions: Optional[bool] = False,
|
| 387 |
+
use_cache: Optional[bool] = False,
|
| 388 |
+
cache_position: Optional[torch.LongTensor] = None,
|
| 389 |
+
position_embeddings: Optional[Tuple[torch.Tensor, torch.Tensor]] = None, # necessary, but kept here for BC
|
| 390 |
+
**kwargs: Unpack[FlashAttentionKwargs],
|
| 391 |
+
) -> Tuple[torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]]:
|
| 392 |
+
residual = hidden_states
|
| 393 |
+
|
| 394 |
+
hidden_states = self.input_layernorm(hidden_states)
|
| 395 |
+
|
| 396 |
+
# Self Attention
|
| 397 |
+
hidden_states, self_attn_weights = self.self_attn(
|
| 398 |
+
hidden_states=hidden_states,
|
| 399 |
+
attention_mask=attention_mask,
|
| 400 |
+
position_ids=position_ids,
|
| 401 |
+
past_key_value=past_key_value,
|
| 402 |
+
output_attentions=output_attentions,
|
| 403 |
+
use_cache=use_cache,
|
| 404 |
+
cache_position=cache_position,
|
| 405 |
+
position_embeddings=position_embeddings,
|
| 406 |
+
**kwargs,
|
| 407 |
+
)
|
| 408 |
+
|
| 409 |
+
hidden_states = residual + hidden_states
|
| 410 |
+
|
| 411 |
+
# Fully Connected
|
| 412 |
+
residual = hidden_states
|
| 413 |
+
hidden_states = self.post_attention_layernorm(hidden_states)
|
| 414 |
+
hidden_states = self.mlp(hidden_states)
|
| 415 |
+
hidden_states = residual + hidden_states
|
| 416 |
+
|
| 417 |
+
outputs = (hidden_states,)
|
| 418 |
+
if output_attentions:
|
| 419 |
+
outputs += (self_attn_weights,)
|
| 420 |
+
|
| 421 |
+
return outputs
|
| 422 |
+
|
| 423 |
+
|
| 424 |
+
EUROBERT_INPUTS_DOCSTRING = r"""
|
| 425 |
+
Args:
|
| 426 |
+
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
|
| 427 |
+
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
|
| 428 |
+
it.
|
| 429 |
+
|
| 430 |
+
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
|
| 431 |
+
[`PreTrainedTokenizer.__call__`] for details.
|
| 432 |
+
|
| 433 |
+
[What are input IDs?](../glossary#input-ids)
|
| 434 |
+
attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
|
| 435 |
+
Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
|
| 436 |
+
|
| 437 |
+
- 1 for tokens that are **not masked**,
|
| 438 |
+
- 0 for tokens that are **masked**.
|
| 439 |
+
|
| 440 |
+
[What are attention masks?](../glossary#attention-mask)
|
| 441 |
+
|
| 442 |
+
Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
|
| 443 |
+
[`PreTrainedTokenizer.__call__`] for details.
|
| 444 |
+
|
| 445 |
+
If `past_key_values` is used, optionally only the last `input_ids` have to be input (see
|
| 446 |
+
`past_key_values`).
|
| 447 |
+
|
| 448 |
+
If you want to change padding behavior, you should read [`modeling_opt._prepare_decoder_attention_mask`]
|
| 449 |
+
and modify to your needs. See diagram 1 in [the paper](https://arxiv.org/abs/1910.13461) for more
|
| 450 |
+
information on the default strategy.
|
| 451 |
+
|
| 452 |
+
- 1 indicates the head is **not masked**,
|
| 453 |
+
- 0 indicates the head is **masked**.
|
| 454 |
+
position_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
|
| 455 |
+
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range `[0,
|
| 456 |
+
config.n_positions - 1]`.
|
| 457 |
+
|
| 458 |
+
[What are position IDs?](../glossary#position-ids)
|
| 459 |
+
past_key_values (`Cache` or `tuple(tuple(torch.FloatTensor))`, *optional*):
|
| 460 |
+
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
|
| 461 |
+
blocks) that can be used to speed up sequential decoding. This typically consists in the `past_key_values`
|
| 462 |
+
returned by the model at a previous stage of decoding, when `use_cache=True` or `config.use_cache=True`.
|
| 463 |
+
|
| 464 |
+
Two formats are allowed:
|
| 465 |
+
- a [`~cache_utils.Cache`] instance, see our
|
| 466 |
+
[kv cache guide](https://huggingface.co/docs/transformers/en/kv_cache);
|
| 467 |
+
- Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of
|
| 468 |
+
shape `(batch_size, num_heads, sequence_length, embed_size_per_head)`). This is also known as the legacy
|
| 469 |
+
cache format.
|
| 470 |
+
|
| 471 |
+
The model will output the same cache format that is fed as input. If no `past_key_values` are passed, the
|
| 472 |
+
legacy cache format will be returned.
|
| 473 |
+
|
| 474 |
+
If `past_key_values` are used, the user can optionally input only the last `input_ids` (those that don't
|
| 475 |
+
have their past key value states given to this model) of shape `(batch_size, 1)` instead of all `input_ids`
|
| 476 |
+
of shape `(batch_size, sequence_length)`.
|
| 477 |
+
inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
|
| 478 |
+
Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
|
| 479 |
+
is useful if you want more control over how to convert `input_ids` indices into associated vectors than the
|
| 480 |
+
model's internal embedding lookup matrix.
|
| 481 |
+
use_cache (`bool`, *optional*):
|
| 482 |
+
If set to `True`, `past_key_values` key value states are returned and can be used to speed up decoding (see
|
| 483 |
+
`past_key_values`).
|
| 484 |
+
output_attentions (`bool`, *optional*):
|
| 485 |
+
Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
|
| 486 |
+
tensors for more detail.
|
| 487 |
+
output_hidden_states (`bool`, *optional*):
|
| 488 |
+
Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
|
| 489 |
+
more detail.
|
| 490 |
+
return_dict (`bool`, *optional*):
|
| 491 |
+
Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
|
| 492 |
+
cache_position (`torch.LongTensor` of shape `(sequence_length)`, *optional*):
|
| 493 |
+
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to `position_ids`,
|
| 494 |
+
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
|
| 495 |
+
the complete sequence length.
|
| 496 |
+
"""
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
@add_start_docstrings(
|
| 500 |
+
"The bare EuroBert Model outputting raw hidden-states without any specific head on top.",
|
| 501 |
+
EUROBERT_START_DOCSTRING,
|
| 502 |
+
)
|
| 503 |
+
class EuroBertModel(EuroBertPreTrainedModel):
|
| 504 |
+
"""
|
| 505 |
+
Transformer encoder consisting of *config.num_hidden_layers* layers. Each layer is a [`EuroBertDecoderLayer`]
|
| 506 |
+
|
| 507 |
+
Args:
|
| 508 |
+
config: EuroBertConfig
|
| 509 |
+
"""
|
| 510 |
+
|
| 511 |
+
def __init__(self, config: EuroBertConfig):
|
| 512 |
+
super().__init__(config)
|
| 513 |
+
self.padding_idx = config.pad_token_id
|
| 514 |
+
self.vocab_size = config.vocab_size
|
| 515 |
+
|
| 516 |
+
self.embed_tokens = nn.Embedding(config.vocab_size, config.hidden_size, self.padding_idx)
|
| 517 |
+
self.layers = nn.ModuleList(
|
| 518 |
+
[EuroBertDecoderLayer(config, layer_idx) for layer_idx in range(config.num_hidden_layers)]
|
| 519 |
+
)
|
| 520 |
+
self.norm = EuroBertRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 521 |
+
self.rotary_emb = EuroBertRotaryEmbedding(config=config)
|
| 522 |
+
self.gradient_checkpointing = False
|
| 523 |
+
self.mask_converter = AttentionMaskConverter(is_causal=False)
|
| 524 |
+
|
| 525 |
+
# Initialize weights and apply final processing
|
| 526 |
+
self.post_init()
|
| 527 |
+
|
| 528 |
+
def get_input_embeddings(self):
|
| 529 |
+
return self.embed_tokens
|
| 530 |
+
|
| 531 |
+
def set_input_embeddings(self, value):
|
| 532 |
+
self.embed_tokens = value
|
| 533 |
+
|
| 534 |
+
@add_start_docstrings_to_model_forward(EUROBERT_INPUTS_DOCSTRING)
|
| 535 |
+
@add_code_sample_docstrings(
|
| 536 |
+
checkpoint=_CHECKPOINT_FOR_DOC,
|
| 537 |
+
output_type=BaseModelOutput,
|
| 538 |
+
config_class=_CONFIG_FOR_DOC,
|
| 539 |
+
)
|
| 540 |
+
def forward(
|
| 541 |
+
self,
|
| 542 |
+
input_ids: torch.LongTensor = None,
|
| 543 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 544 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 545 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 546 |
+
output_attentions: Optional[bool] = None,
|
| 547 |
+
output_hidden_states: Optional[bool] = None,
|
| 548 |
+
return_dict: Optional[bool] = None,
|
| 549 |
+
**flash_attn_kwargs: Unpack[FlashAttentionKwargs],
|
| 550 |
+
) -> Union[Tuple, BaseModelOutputWithPast]:
|
| 551 |
+
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
|
| 552 |
+
output_hidden_states = (
|
| 553 |
+
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
|
| 554 |
+
)
|
| 555 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
| 556 |
+
|
| 557 |
+
if (input_ids is None) ^ (inputs_embeds is not None):
|
| 558 |
+
raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
|
| 559 |
+
|
| 560 |
+
if inputs_embeds is None:
|
| 561 |
+
inputs_embeds = self.embed_tokens(input_ids)
|
| 562 |
+
|
| 563 |
+
if attention_mask is not None and self.config._attn_implementation != "flash_attention_2":
|
| 564 |
+
mask = self.mask_converter.to_4d(attention_mask, attention_mask.shape[1], inputs_embeds.dtype)
|
| 565 |
+
else:
|
| 566 |
+
mask = attention_mask
|
| 567 |
+
|
| 568 |
+
hidden_states = inputs_embeds
|
| 569 |
+
|
| 570 |
+
# create position embeddings to be shared across the encoder layers
|
| 571 |
+
if position_ids is None:
|
| 572 |
+
position_ids = torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device).unsqueeze(0)
|
| 573 |
+
position_embeddings = self.rotary_emb(hidden_states, position_ids)
|
| 574 |
+
|
| 575 |
+
# encoder layers
|
| 576 |
+
all_hidden_states = () if output_hidden_states else None
|
| 577 |
+
all_self_attns = () if output_attentions else None
|
| 578 |
+
|
| 579 |
+
for encoder_layer in self.layers[: self.config.num_hidden_layers]:
|
| 580 |
+
if output_hidden_states:
|
| 581 |
+
all_hidden_states += (hidden_states,)
|
| 582 |
+
|
| 583 |
+
if self.gradient_checkpointing and self.training:
|
| 584 |
+
layer_outputs = self._gradient_checkpointing_func(
|
| 585 |
+
encoder_layer.__call__,
|
| 586 |
+
hidden_states,
|
| 587 |
+
mask,
|
| 588 |
+
position_ids,
|
| 589 |
+
None,
|
| 590 |
+
output_attentions,
|
| 591 |
+
False,
|
| 592 |
+
None,
|
| 593 |
+
position_embeddings,
|
| 594 |
+
)
|
| 595 |
+
else:
|
| 596 |
+
layer_outputs = encoder_layer(
|
| 597 |
+
hidden_states,
|
| 598 |
+
attention_mask=mask,
|
| 599 |
+
position_ids=position_ids,
|
| 600 |
+
output_attentions=output_attentions,
|
| 601 |
+
position_embeddings=position_embeddings,
|
| 602 |
+
**flash_attn_kwargs,
|
| 603 |
+
)
|
| 604 |
+
|
| 605 |
+
hidden_states = layer_outputs[0]
|
| 606 |
+
|
| 607 |
+
if output_attentions:
|
| 608 |
+
all_self_attns += (layer_outputs[1],)
|
| 609 |
+
|
| 610 |
+
hidden_states = self.norm(hidden_states)
|
| 611 |
+
|
| 612 |
+
# add hidden states from the last encoder layer
|
| 613 |
+
if output_hidden_states:
|
| 614 |
+
all_hidden_states += (hidden_states,)
|
| 615 |
+
|
| 616 |
+
output = BaseModelOutput(
|
| 617 |
+
last_hidden_state=hidden_states,
|
| 618 |
+
hidden_states=all_hidden_states,
|
| 619 |
+
attentions=all_self_attns,
|
| 620 |
+
)
|
| 621 |
+
return output if return_dict else output.to_tuple()
|
| 622 |
+
|
| 623 |
+
def _update_causal_mask(
|
| 624 |
+
self,
|
| 625 |
+
attention_mask: torch.Tensor,
|
| 626 |
+
input_tensor: torch.Tensor,
|
| 627 |
+
cache_position: torch.Tensor,
|
| 628 |
+
past_key_values: Cache,
|
| 629 |
+
output_attentions: bool,
|
| 630 |
+
):
|
| 631 |
+
if self.config._attn_implementation == "flash_attention_2":
|
| 632 |
+
if attention_mask is not None and (attention_mask == 0.0).any():
|
| 633 |
+
return attention_mask
|
| 634 |
+
return None
|
| 635 |
+
|
| 636 |
+
# For SDPA, when possible, we will rely on its `is_causal` argument instead of its `attn_mask` argument, in
|
| 637 |
+
# order to dispatch on Flash Attention 2. This feature is not compatible with static cache, as SDPA will fail
|
| 638 |
+
# to infer the attention mask.
|
| 639 |
+
past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
|
| 640 |
+
using_static_cache = isinstance(past_key_values, StaticCache)
|
| 641 |
+
|
| 642 |
+
# When output attentions is True, sdpa implementation's forward method calls the eager implementation's forward
|
| 643 |
+
if self.config._attn_implementation == "sdpa" and not using_static_cache and not output_attentions:
|
| 644 |
+
if AttentionMaskConverter._ignore_causal_mask_sdpa(
|
| 645 |
+
attention_mask,
|
| 646 |
+
inputs_embeds=input_tensor,
|
| 647 |
+
past_key_values_length=past_seen_tokens,
|
| 648 |
+
is_training=self.training,
|
| 649 |
+
):
|
| 650 |
+
return None
|
| 651 |
+
|
| 652 |
+
dtype, device = input_tensor.dtype, input_tensor.device
|
| 653 |
+
sequence_length = input_tensor.shape[1]
|
| 654 |
+
if using_static_cache:
|
| 655 |
+
target_length = past_key_values.get_max_cache_shape()
|
| 656 |
+
else:
|
| 657 |
+
target_length = (
|
| 658 |
+
attention_mask.shape[-1]
|
| 659 |
+
if isinstance(attention_mask, torch.Tensor)
|
| 660 |
+
else past_seen_tokens + sequence_length + 1
|
| 661 |
+
)
|
| 662 |
+
|
| 663 |
+
# In case the provided `attention` mask is 2D, we generate a causal mask here (4D).
|
| 664 |
+
causal_mask = self._prepare_4d_causal_attention_mask_with_cache_position(
|
| 665 |
+
attention_mask,
|
| 666 |
+
sequence_length=sequence_length,
|
| 667 |
+
target_length=target_length,
|
| 668 |
+
dtype=dtype,
|
| 669 |
+
device=device,
|
| 670 |
+
cache_position=cache_position,
|
| 671 |
+
batch_size=input_tensor.shape[0],
|
| 672 |
+
)
|
| 673 |
+
|
| 674 |
+
if (
|
| 675 |
+
self.config._attn_implementation == "sdpa"
|
| 676 |
+
and attention_mask is not None
|
| 677 |
+
and attention_mask.device.type in ["cuda", "xpu"]
|
| 678 |
+
and not output_attentions
|
| 679 |
+
):
|
| 680 |
+
# Attend to all tokens in fully masked rows in the causal_mask, for example the relevant first rows when
|
| 681 |
+
# using left padding. This is required by F.scaled_dot_product_attention memory-efficient attention path.
|
| 682 |
+
# Details: https://github.com/pytorch/pytorch/issues/110213
|
| 683 |
+
min_dtype = torch.finfo(dtype).min
|
| 684 |
+
causal_mask = AttentionMaskConverter._unmask_unattended(causal_mask, min_dtype)
|
| 685 |
+
|
| 686 |
+
return causal_mask
|
| 687 |
+
|
| 688 |
+
@staticmethod
|
| 689 |
+
def _prepare_4d_causal_attention_mask_with_cache_position(
|
| 690 |
+
attention_mask: torch.Tensor,
|
| 691 |
+
sequence_length: int,
|
| 692 |
+
target_length: int,
|
| 693 |
+
dtype: torch.dtype,
|
| 694 |
+
device: torch.device,
|
| 695 |
+
cache_position: torch.Tensor,
|
| 696 |
+
batch_size: int,
|
| 697 |
+
**kwargs,
|
| 698 |
+
):
|
| 699 |
+
"""
|
| 700 |
+
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape
|
| 701 |
+
`(batch_size, key_value_length)`, or if the input `attention_mask` is already 4D, do nothing.
|
| 702 |
+
|
| 703 |
+
Args:
|
| 704 |
+
attention_mask (`torch.Tensor`):
|
| 705 |
+
A 2D attention mask of shape `(batch_size, key_value_length)` or a 4D attention mask of shape
|
| 706 |
+
`(batch_size, 1, query_length, key_value_length)`.
|
| 707 |
+
sequence_length (`int`):
|
| 708 |
+
The sequence length being processed.
|
| 709 |
+
target_length (`int`):
|
| 710 |
+
The target length: when generating with static cache, the mask should be as long as the static cache,
|
| 711 |
+
to account for the 0 padding, the part of the cache that is not filled yet.
|
| 712 |
+
dtype (`torch.dtype`):
|
| 713 |
+
The dtype to use for the 4D attention mask.
|
| 714 |
+
device (`torch.device`):
|
| 715 |
+
The device to plcae the 4D attention mask on.
|
| 716 |
+
cache_position (`torch.Tensor`):
|
| 717 |
+
Indices depicting the position of the input sequence tokens in the sequence.
|
| 718 |
+
batch_size (`torch.Tensor`):
|
| 719 |
+
Batch size.
|
| 720 |
+
"""
|
| 721 |
+
if attention_mask is not None and attention_mask.dim() == 4:
|
| 722 |
+
# In this case we assume that the mask comes already in inverted form and requires no inversion or slicing.
|
| 723 |
+
causal_mask = attention_mask
|
| 724 |
+
else:
|
| 725 |
+
min_dtype = torch.finfo(dtype).min
|
| 726 |
+
causal_mask = torch.full(
|
| 727 |
+
(sequence_length, target_length), fill_value=min_dtype, dtype=dtype, device=device
|
| 728 |
+
)
|
| 729 |
+
if sequence_length != 1:
|
| 730 |
+
causal_mask = torch.triu(causal_mask, diagonal=1)
|
| 731 |
+
causal_mask *= torch.arange(target_length, device=device) > cache_position.reshape(-1, 1)
|
| 732 |
+
causal_mask = causal_mask[None, None, :, :].expand(batch_size, 1, -1, -1)
|
| 733 |
+
if attention_mask is not None:
|
| 734 |
+
causal_mask = causal_mask.clone() # copy to contiguous memory for in-place edit
|
| 735 |
+
mask_length = attention_mask.shape[-1]
|
| 736 |
+
padding_mask = causal_mask[:, :, :, :mask_length] + attention_mask[:, None, None, :].to(
|
| 737 |
+
causal_mask.device
|
| 738 |
+
)
|
| 739 |
+
padding_mask = padding_mask == 0
|
| 740 |
+
causal_mask[:, :, :, :mask_length] = causal_mask[:, :, :, :mask_length].masked_fill(
|
| 741 |
+
padding_mask, min_dtype
|
| 742 |
+
)
|
| 743 |
+
|
| 744 |
+
return causal_mask
|
| 745 |
+
|
| 746 |
+
|
| 747 |
+
@add_start_docstrings(
|
| 748 |
+
"The EuroBert Model with a decoder head on top that is used for masked language modeling.",
|
| 749 |
+
EUROBERT_START_DOCSTRING,
|
| 750 |
+
)
|
| 751 |
+
class EuroBertForMaskedLM(EuroBertPreTrainedModel):
|
| 752 |
+
def __init__(self, config: EuroBertConfig):
|
| 753 |
+
super().__init__(config)
|
| 754 |
+
self.model = EuroBertModel(config)
|
| 755 |
+
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, config.mlp_bias)
|
| 756 |
+
self.post_init()
|
| 757 |
+
|
| 758 |
+
@add_start_docstrings_to_model_forward(EUROBERT_INPUTS_DOCSTRING)
|
| 759 |
+
@add_code_sample_docstrings(
|
| 760 |
+
checkpoint=_CHECKPOINT_FOR_DOC,
|
| 761 |
+
output_type=BaseModelOutput,
|
| 762 |
+
config_class=_CONFIG_FOR_DOC,
|
| 763 |
+
)
|
| 764 |
+
def forward(
|
| 765 |
+
self,
|
| 766 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 767 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 768 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 769 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 770 |
+
labels: Optional[torch.LongTensor] = None,
|
| 771 |
+
output_attentions: Optional[bool] = None,
|
| 772 |
+
output_hidden_states: Optional[bool] = None,
|
| 773 |
+
return_dict: Optional[bool] = None,
|
| 774 |
+
) -> Union[Tuple[torch.Tensor], MaskedLMOutput]:
|
| 775 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
| 776 |
+
|
| 777 |
+
encoder_output = self.model(
|
| 778 |
+
input_ids,
|
| 779 |
+
attention_mask=attention_mask,
|
| 780 |
+
position_ids=position_ids,
|
| 781 |
+
inputs_embeds=inputs_embeds,
|
| 782 |
+
output_attentions=output_attentions,
|
| 783 |
+
output_hidden_states=output_hidden_states,
|
| 784 |
+
return_dict=return_dict,
|
| 785 |
+
)
|
| 786 |
+
|
| 787 |
+
prediction_scores = self.lm_head(encoder_output[0])
|
| 788 |
+
masked_lm_loss = None
|
| 789 |
+
if labels is not None:
|
| 790 |
+
labels = labels.to(prediction_scores.device)
|
| 791 |
+
masked_lm_loss = self.loss_function(prediction_scores, labels, vocab_size=self.config.vocab_size)
|
| 792 |
+
|
| 793 |
+
if not return_dict:
|
| 794 |
+
output = (prediction_scores,) + encoder_output[1:]
|
| 795 |
+
return ((masked_lm_loss,) + output) if masked_lm_loss is not None else output
|
| 796 |
+
|
| 797 |
+
return MaskedLMOutput(
|
| 798 |
+
loss=masked_lm_loss,
|
| 799 |
+
logits=prediction_scores,
|
| 800 |
+
hidden_states=encoder_output.hidden_states,
|
| 801 |
+
attentions=encoder_output.attentions,
|
| 802 |
+
)
|
| 803 |
+
|
| 804 |
+
|
| 805 |
+
@add_start_docstrings(
|
| 806 |
+
"The EuroBert Model with a sequence classification head on top that performs pooling.",
|
| 807 |
+
EUROBERT_START_DOCSTRING,
|
| 808 |
+
)
|
| 809 |
+
class EuroBertForSequenceClassification(EuroBertPreTrainedModel):
|
| 810 |
+
def __init__(self, config: EuroBertConfig):
|
| 811 |
+
super().__init__(config)
|
| 812 |
+
self.num_labels = config.num_labels
|
| 813 |
+
self.clf_pooling = config.clf_pooling
|
| 814 |
+
|
| 815 |
+
self.model = EuroBertModel(config)
|
| 816 |
+
self.dense = nn.Linear(config.hidden_size, config.hidden_size)
|
| 817 |
+
self.activation = nn.GELU()
|
| 818 |
+
self.classifier = nn.Linear(config.hidden_size, self.num_labels)
|
| 819 |
+
self.post_init()
|
| 820 |
+
|
| 821 |
+
@add_start_docstrings_to_model_forward(EUROBERT_INPUTS_DOCSTRING)
|
| 822 |
+
@add_code_sample_docstrings(
|
| 823 |
+
checkpoint=_CHECKPOINT_FOR_DOC,
|
| 824 |
+
output_type=BaseModelOutput,
|
| 825 |
+
config_class=_CONFIG_FOR_DOC,
|
| 826 |
+
)
|
| 827 |
+
def forward(
|
| 828 |
+
self,
|
| 829 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 830 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 831 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 832 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 833 |
+
labels: Optional[torch.LongTensor] = None,
|
| 834 |
+
output_attentions: Optional[bool] = None,
|
| 835 |
+
output_hidden_states: Optional[bool] = None,
|
| 836 |
+
return_dict: Optional[bool] = None,
|
| 837 |
+
) -> Union[Tuple[torch.Tensor], SequenceClassifierOutput]:
|
| 838 |
+
r"""
|
| 839 |
+
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
| 840 |
+
Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
|
| 841 |
+
config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
|
| 842 |
+
`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
|
| 843 |
+
"""
|
| 844 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
| 845 |
+
|
| 846 |
+
encoder_output = self.model(
|
| 847 |
+
input_ids,
|
| 848 |
+
attention_mask=attention_mask,
|
| 849 |
+
position_ids=position_ids,
|
| 850 |
+
inputs_embeds=inputs_embeds,
|
| 851 |
+
output_attentions=output_attentions,
|
| 852 |
+
output_hidden_states=output_hidden_states,
|
| 853 |
+
return_dict=return_dict,
|
| 854 |
+
)
|
| 855 |
+
last_hidden_state = encoder_output[0]
|
| 856 |
+
|
| 857 |
+
if self.clf_pooling in ["bos", "mean"]:
|
| 858 |
+
if self.clf_pooling == "bos":
|
| 859 |
+
pooled_output = last_hidden_state[:, 0]
|
| 860 |
+
|
| 861 |
+
elif self.clf_pooling == "mean":
|
| 862 |
+
if attention_mask is None:
|
| 863 |
+
pooled_output = last_hidden_state.mean(dim=1)
|
| 864 |
+
else:
|
| 865 |
+
pooled_output = (last_hidden_state * attention_mask.unsqueeze(-1)).sum(dim=1)
|
| 866 |
+
pooled_output /= attention_mask.sum(dim=1, keepdim=True)
|
| 867 |
+
|
| 868 |
+
pooled_output = self.dense(pooled_output)
|
| 869 |
+
pooled_output = self.activation(pooled_output)
|
| 870 |
+
logits = self.classifier(pooled_output)
|
| 871 |
+
|
| 872 |
+
elif self.clf_pooling == "late":
|
| 873 |
+
x = self.dense(last_hidden_state)
|
| 874 |
+
x = self.activation(x)
|
| 875 |
+
logits = self.classifier(x)
|
| 876 |
+
if attention_mask is None:
|
| 877 |
+
logits = logits.mean(dim=1)
|
| 878 |
+
else:
|
| 879 |
+
logits = (logits * attention_mask.unsqueeze(-1)).sum(dim=1)
|
| 880 |
+
logits /= attention_mask.sum(dim=1, keepdim=True)
|
| 881 |
+
|
| 882 |
+
loss = None
|
| 883 |
+
if labels is not None:
|
| 884 |
+
labels = labels.to(logits.device)
|
| 885 |
+
if self.config.problem_type is None:
|
| 886 |
+
if self.num_labels == 1:
|
| 887 |
+
self.config.problem_type = "regression"
|
| 888 |
+
elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
|
| 889 |
+
self.config.problem_type = "single_label_classification"
|
| 890 |
+
else:
|
| 891 |
+
self.config.problem_type = "multi_label_classification"
|
| 892 |
+
|
| 893 |
+
if self.config.problem_type == "regression":
|
| 894 |
+
loss_fct = MSELoss()
|
| 895 |
+
if self.num_labels == 1:
|
| 896 |
+
loss = loss_fct(logits.squeeze(), labels.squeeze())
|
| 897 |
+
else:
|
| 898 |
+
loss = loss_fct(logits, labels)
|
| 899 |
+
elif self.config.problem_type == "single_label_classification":
|
| 900 |
+
loss_fct = CrossEntropyLoss()
|
| 901 |
+
loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
|
| 902 |
+
elif self.config.problem_type == "multi_label_classification":
|
| 903 |
+
loss_fct = BCEWithLogitsLoss()
|
| 904 |
+
loss = loss_fct(logits, labels)
|
| 905 |
+
|
| 906 |
+
if not return_dict:
|
| 907 |
+
output = (logits,) + encoder_output[1:]
|
| 908 |
+
return ((loss,) + output) if loss is not None else output
|
| 909 |
+
|
| 910 |
+
return SequenceClassifierOutput(
|
| 911 |
+
loss=loss,
|
| 912 |
+
logits=logits,
|
| 913 |
+
hidden_states=encoder_output.hidden_states,
|
| 914 |
+
attentions=encoder_output.attentions,
|
| 915 |
+
)
|
| 916 |
+
|
| 917 |
+
|
| 918 |
+
@add_start_docstrings(
|
| 919 |
+
"""
|
| 920 |
+
The EuroBert Model with a token classification head on top (a linear layer on top of the hidden-states
|
| 921 |
+
output) e.g. for Named-Entity-Recognition (NER) tasks."
|
| 922 |
+
""",
|
| 923 |
+
EUROBERT_START_DOCSTRING,
|
| 924 |
+
)
|
| 925 |
+
class EuroBertForTokenClassification(EuroBertPreTrainedModel):
|
| 926 |
+
def __init__(self, config: EuroBertConfig):
|
| 927 |
+
super().__init__(config)
|
| 928 |
+
self.num_labels = config.num_labels
|
| 929 |
+
self.model = EuroBertModel(config)
|
| 930 |
+
|
| 931 |
+
self.classifier = nn.Linear(config.hidden_size, config.num_labels)
|
| 932 |
+
self.post_init()
|
| 933 |
+
|
| 934 |
+
def get_input_embeddings(self):
|
| 935 |
+
return self.model.embed_tokens
|
| 936 |
+
|
| 937 |
+
def set_input_embeddings(self, value):
|
| 938 |
+
self.model.embed_tokens = value
|
| 939 |
+
|
| 940 |
+
@add_start_docstrings_to_model_forward(EUROBERT_INPUTS_DOCSTRING)
|
| 941 |
+
def forward(
|
| 942 |
+
self,
|
| 943 |
+
input_ids: Optional[torch.LongTensor] = None,
|
| 944 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 945 |
+
position_ids: Optional[torch.LongTensor] = None,
|
| 946 |
+
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 947 |
+
labels: Optional[torch.LongTensor] = None,
|
| 948 |
+
use_cache: Optional[bool] = None,
|
| 949 |
+
output_attentions: Optional[bool] = None,
|
| 950 |
+
output_hidden_states: Optional[bool] = None,
|
| 951 |
+
return_dict: Optional[bool] = None,
|
| 952 |
+
) -> Union[Tuple, TokenClassifierOutput]:
|
| 953 |
+
r"""
|
| 954 |
+
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
| 955 |
+
Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
|
| 956 |
+
config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
|
| 957 |
+
`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
|
| 958 |
+
"""
|
| 959 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
| 960 |
+
|
| 961 |
+
outputs = self.model(
|
| 962 |
+
input_ids,
|
| 963 |
+
attention_mask=attention_mask,
|
| 964 |
+
position_ids=position_ids,
|
| 965 |
+
inputs_embeds=inputs_embeds,
|
| 966 |
+
use_cache=use_cache,
|
| 967 |
+
output_attentions=output_attentions,
|
| 968 |
+
output_hidden_states=output_hidden_states,
|
| 969 |
+
return_dict=return_dict,
|
| 970 |
+
)
|
| 971 |
+
sequence_output = outputs[0]
|
| 972 |
+
logits = self.classifier(sequence_output)
|
| 973 |
+
|
| 974 |
+
loss = None
|
| 975 |
+
if labels is not None:
|
| 976 |
+
loss_fct = CrossEntropyLoss()
|
| 977 |
+
loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
|
| 978 |
+
|
| 979 |
+
if not return_dict:
|
| 980 |
+
output = (logits,) + outputs[2:]
|
| 981 |
+
return ((loss,) + output) if loss is not None else output
|
| 982 |
+
|
| 983 |
+
return TokenClassifierOutput(
|
| 984 |
+
loss=loss,
|
| 985 |
+
logits=logits,
|
| 986 |
+
hidden_states=outputs.hidden_states,
|
| 987 |
+
attentions=outputs.attentions,
|
| 988 |
+
)
|
| 989 |
+
|
| 990 |
+
|
| 991 |
+
@add_start_docstrings(
|
| 992 |
+
"""
|
| 993 |
+
The EuroBert Model with a span classification head on top for extractive question-answering tasks
|
| 994 |
+
like SQuAD (a linear layers on top of the hidden-states output to compute span start logits
|
| 995 |
+
and span end logits).
|
| 996 |
+
""",
|
| 997 |
+
EUROBERT_START_DOCSTRING,
|
| 998 |
+
)
|
| 999 |
+
class EuroBertForQuestionAnswering(EuroBertPreTrainedModel):
|
| 1000 |
+
def __init__(self, config: EuroBertConfig):
|
| 1001 |
+
super().__init__(config)
|
| 1002 |
+
self.num_labels = config.num_labels
|
| 1003 |
+
self.model = EuroBertModel(config)
|
| 1004 |
+
|
| 1005 |
+
self.qa_outputs = nn.Linear(config.hidden_size, config.num_labels)
|
| 1006 |
+
self.post_init()
|
| 1007 |
+
|
| 1008 |
+
def get_input_embeddings(self):
|
| 1009 |
+
return self.model.embed_tokens
|
| 1010 |
+
|
| 1011 |
+
def set_input_embeddings(self, value):
|
| 1012 |
+
self.model.embed_tokens = value
|
| 1013 |
+
|
| 1014 |
+
@add_start_docstrings_to_model_forward(EUROBERT_INPUTS_DOCSTRING)
|
| 1015 |
+
def forward(
|
| 1016 |
+
self,
|
| 1017 |
+
input_ids: Optional[torch.Tensor] = None,
|
| 1018 |
+
attention_mask: Optional[torch.Tensor] = None,
|
| 1019 |
+
position_ids: Optional[torch.Tensor] = None,
|
| 1020 |
+
inputs_embeds: Optional[torch.Tensor] = None,
|
| 1021 |
+
use_cache: Optional[bool] = None,
|
| 1022 |
+
start_positions: Optional[torch.Tensor] = None,
|
| 1023 |
+
end_positions: Optional[torch.Tensor] = None,
|
| 1024 |
+
output_attentions: Optional[bool] = None,
|
| 1025 |
+
output_hidden_states: Optional[bool] = None,
|
| 1026 |
+
return_dict: Optional[bool] = None,
|
| 1027 |
+
) -> Union[Tuple[torch.Tensor], QuestionAnsweringModelOutput]:
|
| 1028 |
+
r"""
|
| 1029 |
+
start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
| 1030 |
+
Labels for position (index) of the start of the labelled span for computing the token classification loss.
|
| 1031 |
+
Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
|
| 1032 |
+
are not taken into account for computing the loss.
|
| 1033 |
+
end_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
| 1034 |
+
Labels for position (index) of the end of the labelled span for computing the token classification loss.
|
| 1035 |
+
Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
|
| 1036 |
+
are not taken into account for computing the loss.
|
| 1037 |
+
"""
|
| 1038 |
+
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
| 1039 |
+
|
| 1040 |
+
outputs = self.model(
|
| 1041 |
+
input_ids,
|
| 1042 |
+
attention_mask=attention_mask,
|
| 1043 |
+
position_ids=position_ids,
|
| 1044 |
+
inputs_embeds=inputs_embeds,
|
| 1045 |
+
use_cache=use_cache,
|
| 1046 |
+
output_attentions=output_attentions,
|
| 1047 |
+
output_hidden_states=output_hidden_states,
|
| 1048 |
+
return_dict=return_dict,
|
| 1049 |
+
)
|
| 1050 |
+
sequence_output = outputs[0]
|
| 1051 |
+
|
| 1052 |
+
logits = self.qa_outputs(sequence_output)
|
| 1053 |
+
start_logits, end_logits = logits.split(1, dim=-1)
|
| 1054 |
+
start_logits = start_logits.squeeze(-1).contiguous()
|
| 1055 |
+
end_logits = end_logits.squeeze(-1).contiguous()
|
| 1056 |
+
|
| 1057 |
+
total_loss = None
|
| 1058 |
+
if start_positions is not None and end_positions is not None:
|
| 1059 |
+
# If we are on multi-GPU, split add a dimension
|
| 1060 |
+
if len(start_positions.size()) > 1:
|
| 1061 |
+
start_positions = start_positions.squeeze(-1)
|
| 1062 |
+
if len(end_positions.size()) > 1:
|
| 1063 |
+
end_positions = end_positions.squeeze(-1)
|
| 1064 |
+
# sometimes the start/end positions are outside our model inputs, we ignore these terms
|
| 1065 |
+
ignored_index = start_logits.size(1)
|
| 1066 |
+
start_positions = start_positions.clamp(0, ignored_index)
|
| 1067 |
+
end_positions = end_positions.clamp(0, ignored_index)
|
| 1068 |
+
|
| 1069 |
+
loss_fct = CrossEntropyLoss(ignore_index=ignored_index)
|
| 1070 |
+
start_loss = loss_fct(start_logits, start_positions)
|
| 1071 |
+
end_loss = loss_fct(end_logits, end_positions)
|
| 1072 |
+
total_loss = (start_loss + end_loss) / 2
|
| 1073 |
+
|
| 1074 |
+
if not return_dict:
|
| 1075 |
+
output = (start_logits, end_logits) + outputs[2:]
|
| 1076 |
+
return ((total_loss,) + output) if total_loss is not None else output
|
| 1077 |
+
|
| 1078 |
+
return QuestionAnsweringModelOutput(
|
| 1079 |
+
loss=total_loss,
|
| 1080 |
+
start_logits=start_logits,
|
| 1081 |
+
end_logits=end_logits,
|
| 1082 |
+
hidden_states=outputs.hidden_states,
|
| 1083 |
+
attentions=outputs.attentions,
|
| 1084 |
+
)
|
| 1085 |
+
|
| 1086 |
+
|
| 1087 |
+
__all__ = [
|
| 1088 |
+
"EuroBertPreTrainedModel",
|
| 1089 |
+
"EuroBertModel",
|
| 1090 |
+
"EuroBertForMaskedLM",
|
| 1091 |
+
"EuroBertForSequenceClassification",
|
| 1092 |
+
"EuroBertForTokenClassification",
|
| 1093 |
+
"EuroBertForQuestionAnswering",
|
| 1094 |
+
]
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.models.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 2048,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|begin_of_text|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|end_of_text|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"mask_token": {
|
| 17 |
+
"content": "<|mask|>",
|
| 18 |
+
"lstrip": true,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"pad_token": {
|
| 24 |
+
"content": "<|pad|>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"128000": {
|
| 4 |
+
"content": "<|begin_of_text|>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"128001": {
|
| 12 |
+
"content": "<|end_of_text|>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"128002": {
|
| 20 |
+
"content": "<|mask|>",
|
| 21 |
+
"lstrip": true,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"128003": {
|
| 28 |
+
"content": "<|parallel_sep|>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"128004": {
|
| 36 |
+
"content": "<|pad|>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"128005": {
|
| 44 |
+
"content": "<|reserved_special_token_2|>",
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
},
|
| 51 |
+
"128006": {
|
| 52 |
+
"content": "<|start_header_id|>",
|
| 53 |
+
"lstrip": false,
|
| 54 |
+
"normalized": false,
|
| 55 |
+
"rstrip": false,
|
| 56 |
+
"single_word": false,
|
| 57 |
+
"special": true
|
| 58 |
+
},
|
| 59 |
+
"128007": {
|
| 60 |
+
"content": "<|end_header_id|>",
|
| 61 |
+
"lstrip": false,
|
| 62 |
+
"normalized": false,
|
| 63 |
+
"rstrip": false,
|
| 64 |
+
"single_word": false,
|
| 65 |
+
"special": true
|
| 66 |
+
},
|
| 67 |
+
"128008": {
|
| 68 |
+
"content": "<|eom_id|>",
|
| 69 |
+
"lstrip": false,
|
| 70 |
+
"normalized": false,
|
| 71 |
+
"rstrip": false,
|
| 72 |
+
"single_word": false,
|
| 73 |
+
"special": true
|
| 74 |
+
},
|
| 75 |
+
"128009": {
|
| 76 |
+
"content": "<|eot_id|>",
|
| 77 |
+
"lstrip": false,
|
| 78 |
+
"normalized": false,
|
| 79 |
+
"rstrip": false,
|
| 80 |
+
"single_word": false,
|
| 81 |
+
"special": true
|
| 82 |
+
},
|
| 83 |
+
"128010": {
|
| 84 |
+
"content": "<|python_tag|>",
|
| 85 |
+
"lstrip": false,
|
| 86 |
+
"normalized": false,
|
| 87 |
+
"rstrip": false,
|
| 88 |
+
"single_word": false,
|
| 89 |
+
"special": true
|
| 90 |
+
},
|
| 91 |
+
"128011": {
|
| 92 |
+
"content": "<|reserved_special_token_3|>",
|
| 93 |
+
"lstrip": false,
|
| 94 |
+
"normalized": false,
|
| 95 |
+
"rstrip": false,
|
| 96 |
+
"single_word": false,
|
| 97 |
+
"special": true
|
| 98 |
+
},
|
| 99 |
+
"128012": {
|
| 100 |
+
"content": "<|reserved_special_token_4|>",
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"normalized": false,
|
| 103 |
+
"rstrip": false,
|
| 104 |
+
"single_word": false,
|
| 105 |
+
"special": true
|
| 106 |
+
},
|
| 107 |
+
"128013": {
|
| 108 |
+
"content": "<|reserved_special_token_5|>",
|
| 109 |
+
"lstrip": false,
|
| 110 |
+
"normalized": false,
|
| 111 |
+
"rstrip": false,
|
| 112 |
+
"single_word": false,
|
| 113 |
+
"special": true
|
| 114 |
+
},
|
| 115 |
+
"128014": {
|
| 116 |
+
"content": "<|reserved_special_token_6|>",
|
| 117 |
+
"lstrip": false,
|
| 118 |
+
"normalized": false,
|
| 119 |
+
"rstrip": false,
|
| 120 |
+
"single_word": false,
|
| 121 |
+
"special": true
|
| 122 |
+
},
|
| 123 |
+
"128015": {
|
| 124 |
+
"content": "<|reserved_special_token_7|>",
|
| 125 |
+
"lstrip": false,
|
| 126 |
+
"normalized": false,
|
| 127 |
+
"rstrip": false,
|
| 128 |
+
"single_word": false,
|
| 129 |
+
"special": true
|
| 130 |
+
},
|
| 131 |
+
"128016": {
|
| 132 |
+
"content": "<|reserved_special_token_8|>",
|
| 133 |
+
"lstrip": false,
|
| 134 |
+
"normalized": false,
|
| 135 |
+
"rstrip": false,
|
| 136 |
+
"single_word": false,
|
| 137 |
+
"special": true
|
| 138 |
+
},
|
| 139 |
+
"128017": {
|
| 140 |
+
"content": "<|reserved_special_token_9|>",
|
| 141 |
+
"lstrip": false,
|
| 142 |
+
"normalized": false,
|
| 143 |
+
"rstrip": false,
|
| 144 |
+
"single_word": false,
|
| 145 |
+
"special": true
|
| 146 |
+
},
|
| 147 |
+
"128018": {
|
| 148 |
+
"content": "<|reserved_special_token_10|>",
|
| 149 |
+
"lstrip": false,
|
| 150 |
+
"normalized": false,
|
| 151 |
+
"rstrip": false,
|
| 152 |
+
"single_word": false,
|
| 153 |
+
"special": true
|
| 154 |
+
},
|
| 155 |
+
"128019": {
|
| 156 |
+
"content": "<|reserved_special_token_11|>",
|
| 157 |
+
"lstrip": false,
|
| 158 |
+
"normalized": false,
|
| 159 |
+
"rstrip": false,
|
| 160 |
+
"single_word": false,
|
| 161 |
+
"special": true
|
| 162 |
+
},
|
| 163 |
+
"128020": {
|
| 164 |
+
"content": "<|reserved_special_token_12|>",
|
| 165 |
+
"lstrip": false,
|
| 166 |
+
"normalized": false,
|
| 167 |
+
"rstrip": false,
|
| 168 |
+
"single_word": false,
|
| 169 |
+
"special": true
|
| 170 |
+
},
|
| 171 |
+
"128021": {
|
| 172 |
+
"content": "<|reserved_special_token_13|>",
|
| 173 |
+
"lstrip": false,
|
| 174 |
+
"normalized": false,
|
| 175 |
+
"rstrip": false,
|
| 176 |
+
"single_word": false,
|
| 177 |
+
"special": true
|
| 178 |
+
},
|
| 179 |
+
"128022": {
|
| 180 |
+
"content": "<|reserved_special_token_14|>",
|
| 181 |
+
"lstrip": false,
|
| 182 |
+
"normalized": false,
|
| 183 |
+
"rstrip": false,
|
| 184 |
+
"single_word": false,
|
| 185 |
+
"special": true
|
| 186 |
+
},
|
| 187 |
+
"128023": {
|
| 188 |
+
"content": "<|reserved_special_token_15|>",
|
| 189 |
+
"lstrip": false,
|
| 190 |
+
"normalized": false,
|
| 191 |
+
"rstrip": false,
|
| 192 |
+
"single_word": false,
|
| 193 |
+
"special": true
|
| 194 |
+
},
|
| 195 |
+
"128024": {
|
| 196 |
+
"content": "<|reserved_special_token_16|>",
|
| 197 |
+
"lstrip": false,
|
| 198 |
+
"normalized": false,
|
| 199 |
+
"rstrip": false,
|
| 200 |
+
"single_word": false,
|
| 201 |
+
"special": true
|
| 202 |
+
},
|
| 203 |
+
"128025": {
|
| 204 |
+
"content": "<|reserved_special_token_17|>",
|
| 205 |
+
"lstrip": false,
|
| 206 |
+
"normalized": false,
|
| 207 |
+
"rstrip": false,
|
| 208 |
+
"single_word": false,
|
| 209 |
+
"special": true
|
| 210 |
+
},
|
| 211 |
+
"128026": {
|
| 212 |
+
"content": "<|reserved_special_token_18|>",
|
| 213 |
+
"lstrip": false,
|
| 214 |
+
"normalized": false,
|
| 215 |
+
"rstrip": false,
|
| 216 |
+
"single_word": false,
|
| 217 |
+
"special": true
|
| 218 |
+
},
|
| 219 |
+
"128027": {
|
| 220 |
+
"content": "<|reserved_special_token_19|>",
|
| 221 |
+
"lstrip": false,
|
| 222 |
+
"normalized": false,
|
| 223 |
+
"rstrip": false,
|
| 224 |
+
"single_word": false,
|
| 225 |
+
"special": true
|
| 226 |
+
},
|
| 227 |
+
"128028": {
|
| 228 |
+
"content": "<|reserved_special_token_20|>",
|
| 229 |
+
"lstrip": false,
|
| 230 |
+
"normalized": false,
|
| 231 |
+
"rstrip": false,
|
| 232 |
+
"single_word": false,
|
| 233 |
+
"special": true
|
| 234 |
+
},
|
| 235 |
+
"128029": {
|
| 236 |
+
"content": "<|reserved_special_token_21|>",
|
| 237 |
+
"lstrip": false,
|
| 238 |
+
"normalized": false,
|
| 239 |
+
"rstrip": false,
|
| 240 |
+
"single_word": false,
|
| 241 |
+
"special": true
|
| 242 |
+
},
|
| 243 |
+
"128030": {
|
| 244 |
+
"content": "<|reserved_special_token_22|>",
|
| 245 |
+
"lstrip": false,
|
| 246 |
+
"normalized": false,
|
| 247 |
+
"rstrip": false,
|
| 248 |
+
"single_word": false,
|
| 249 |
+
"special": true
|
| 250 |
+
},
|
| 251 |
+
"128031": {
|
| 252 |
+
"content": "<|reserved_special_token_23|>",
|
| 253 |
+
"lstrip": false,
|
| 254 |
+
"normalized": false,
|
| 255 |
+
"rstrip": false,
|
| 256 |
+
"single_word": false,
|
| 257 |
+
"special": true
|
| 258 |
+
},
|
| 259 |
+
"128032": {
|
| 260 |
+
"content": "<|reserved_special_token_24|>",
|
| 261 |
+
"lstrip": false,
|
| 262 |
+
"normalized": false,
|
| 263 |
+
"rstrip": false,
|
| 264 |
+
"single_word": false,
|
| 265 |
+
"special": true
|
| 266 |
+
},
|
| 267 |
+
"128033": {
|
| 268 |
+
"content": "<|reserved_special_token_25|>",
|
| 269 |
+
"lstrip": false,
|
| 270 |
+
"normalized": false,
|
| 271 |
+
"rstrip": false,
|
| 272 |
+
"single_word": false,
|
| 273 |
+
"special": true
|
| 274 |
+
},
|
| 275 |
+
"128034": {
|
| 276 |
+
"content": "<|reserved_special_token_26|>",
|
| 277 |
+
"lstrip": false,
|
| 278 |
+
"normalized": false,
|
| 279 |
+
"rstrip": false,
|
| 280 |
+
"single_word": false,
|
| 281 |
+
"special": true
|
| 282 |
+
},
|
| 283 |
+
"128035": {
|
| 284 |
+
"content": "<|reserved_special_token_27|>",
|
| 285 |
+
"lstrip": false,
|
| 286 |
+
"normalized": false,
|
| 287 |
+
"rstrip": false,
|
| 288 |
+
"single_word": false,
|
| 289 |
+
"special": true
|
| 290 |
+
},
|
| 291 |
+
"128036": {
|
| 292 |
+
"content": "<|reserved_special_token_28|>",
|
| 293 |
+
"lstrip": false,
|
| 294 |
+
"normalized": false,
|
| 295 |
+
"rstrip": false,
|
| 296 |
+
"single_word": false,
|
| 297 |
+
"special": true
|
| 298 |
+
},
|
| 299 |
+
"128037": {
|
| 300 |
+
"content": "<|reserved_special_token_29|>",
|
| 301 |
+
"lstrip": false,
|
| 302 |
+
"normalized": false,
|
| 303 |
+
"rstrip": false,
|
| 304 |
+
"single_word": false,
|
| 305 |
+
"special": true
|
| 306 |
+
},
|
| 307 |
+
"128038": {
|
| 308 |
+
"content": "<|reserved_special_token_30|>",
|
| 309 |
+
"lstrip": false,
|
| 310 |
+
"normalized": false,
|
| 311 |
+
"rstrip": false,
|
| 312 |
+
"single_word": false,
|
| 313 |
+
"special": true
|
| 314 |
+
},
|
| 315 |
+
"128039": {
|
| 316 |
+
"content": "<|reserved_special_token_31|>",
|
| 317 |
+
"lstrip": false,
|
| 318 |
+
"normalized": false,
|
| 319 |
+
"rstrip": false,
|
| 320 |
+
"single_word": false,
|
| 321 |
+
"special": true
|
| 322 |
+
},
|
| 323 |
+
"128040": {
|
| 324 |
+
"content": "<|reserved_special_token_32|>",
|
| 325 |
+
"lstrip": false,
|
| 326 |
+
"normalized": false,
|
| 327 |
+
"rstrip": false,
|
| 328 |
+
"single_word": false,
|
| 329 |
+
"special": true
|
| 330 |
+
},
|
| 331 |
+
"128041": {
|
| 332 |
+
"content": "<|reserved_special_token_33|>",
|
| 333 |
+
"lstrip": false,
|
| 334 |
+
"normalized": false,
|
| 335 |
+
"rstrip": false,
|
| 336 |
+
"single_word": false,
|
| 337 |
+
"special": true
|
| 338 |
+
},
|
| 339 |
+
"128042": {
|
| 340 |
+
"content": "<|reserved_special_token_34|>",
|
| 341 |
+
"lstrip": false,
|
| 342 |
+
"normalized": false,
|
| 343 |
+
"rstrip": false,
|
| 344 |
+
"single_word": false,
|
| 345 |
+
"special": true
|
| 346 |
+
},
|
| 347 |
+
"128043": {
|
| 348 |
+
"content": "<|reserved_special_token_35|>",
|
| 349 |
+
"lstrip": false,
|
| 350 |
+
"normalized": false,
|
| 351 |
+
"rstrip": false,
|
| 352 |
+
"single_word": false,
|
| 353 |
+
"special": true
|
| 354 |
+
},
|
| 355 |
+
"128044": {
|
| 356 |
+
"content": "<|reserved_special_token_36|>",
|
| 357 |
+
"lstrip": false,
|
| 358 |
+
"normalized": false,
|
| 359 |
+
"rstrip": false,
|
| 360 |
+
"single_word": false,
|
| 361 |
+
"special": true
|
| 362 |
+
},
|
| 363 |
+
"128045": {
|
| 364 |
+
"content": "<|reserved_special_token_37|>",
|
| 365 |
+
"lstrip": false,
|
| 366 |
+
"normalized": false,
|
| 367 |
+
"rstrip": false,
|
| 368 |
+
"single_word": false,
|
| 369 |
+
"special": true
|
| 370 |
+
},
|
| 371 |
+
"128046": {
|
| 372 |
+
"content": "<|reserved_special_token_38|>",
|
| 373 |
+
"lstrip": false,
|
| 374 |
+
"normalized": false,
|
| 375 |
+
"rstrip": false,
|
| 376 |
+
"single_word": false,
|
| 377 |
+
"special": true
|
| 378 |
+
},
|
| 379 |
+
"128047": {
|
| 380 |
+
"content": "<|reserved_special_token_39|>",
|
| 381 |
+
"lstrip": false,
|
| 382 |
+
"normalized": false,
|
| 383 |
+
"rstrip": false,
|
| 384 |
+
"single_word": false,
|
| 385 |
+
"special": true
|
| 386 |
+
},
|
| 387 |
+
"128048": {
|
| 388 |
+
"content": "<|reserved_special_token_40|>",
|
| 389 |
+
"lstrip": false,
|
| 390 |
+
"normalized": false,
|
| 391 |
+
"rstrip": false,
|
| 392 |
+
"single_word": false,
|
| 393 |
+
"special": true
|
| 394 |
+
},
|
| 395 |
+
"128049": {
|
| 396 |
+
"content": "<|reserved_special_token_41|>",
|
| 397 |
+
"lstrip": false,
|
| 398 |
+
"normalized": false,
|
| 399 |
+
"rstrip": false,
|
| 400 |
+
"single_word": false,
|
| 401 |
+
"special": true
|
| 402 |
+
},
|
| 403 |
+
"128050": {
|
| 404 |
+
"content": "<|reserved_special_token_42|>",
|
| 405 |
+
"lstrip": false,
|
| 406 |
+
"normalized": false,
|
| 407 |
+
"rstrip": false,
|
| 408 |
+
"single_word": false,
|
| 409 |
+
"special": true
|
| 410 |
+
},
|
| 411 |
+
"128051": {
|
| 412 |
+
"content": "<|reserved_special_token_43|>",
|
| 413 |
+
"lstrip": false,
|
| 414 |
+
"normalized": false,
|
| 415 |
+
"rstrip": false,
|
| 416 |
+
"single_word": false,
|
| 417 |
+
"special": true
|
| 418 |
+
},
|
| 419 |
+
"128052": {
|
| 420 |
+
"content": "<|reserved_special_token_44|>",
|
| 421 |
+
"lstrip": false,
|
| 422 |
+
"normalized": false,
|
| 423 |
+
"rstrip": false,
|
| 424 |
+
"single_word": false,
|
| 425 |
+
"special": true
|
| 426 |
+
},
|
| 427 |
+
"128053": {
|
| 428 |
+
"content": "<|reserved_special_token_45|>",
|
| 429 |
+
"lstrip": false,
|
| 430 |
+
"normalized": false,
|
| 431 |
+
"rstrip": false,
|
| 432 |
+
"single_word": false,
|
| 433 |
+
"special": true
|
| 434 |
+
},
|
| 435 |
+
"128054": {
|
| 436 |
+
"content": "<|reserved_special_token_46|>",
|
| 437 |
+
"lstrip": false,
|
| 438 |
+
"normalized": false,
|
| 439 |
+
"rstrip": false,
|
| 440 |
+
"single_word": false,
|
| 441 |
+
"special": true
|
| 442 |
+
},
|
| 443 |
+
"128055": {
|
| 444 |
+
"content": "<|reserved_special_token_47|>",
|
| 445 |
+
"lstrip": false,
|
| 446 |
+
"normalized": false,
|
| 447 |
+
"rstrip": false,
|
| 448 |
+
"single_word": false,
|
| 449 |
+
"special": true
|
| 450 |
+
},
|
| 451 |
+
"128056": {
|
| 452 |
+
"content": "<|reserved_special_token_48|>",
|
| 453 |
+
"lstrip": false,
|
| 454 |
+
"normalized": false,
|
| 455 |
+
"rstrip": false,
|
| 456 |
+
"single_word": false,
|
| 457 |
+
"special": true
|
| 458 |
+
},
|
| 459 |
+
"128057": {
|
| 460 |
+
"content": "<|reserved_special_token_49|>",
|
| 461 |
+
"lstrip": false,
|
| 462 |
+
"normalized": false,
|
| 463 |
+
"rstrip": false,
|
| 464 |
+
"single_word": false,
|
| 465 |
+
"special": true
|
| 466 |
+
},
|
| 467 |
+
"128058": {
|
| 468 |
+
"content": "<|reserved_special_token_50|>",
|
| 469 |
+
"lstrip": false,
|
| 470 |
+
"normalized": false,
|
| 471 |
+
"rstrip": false,
|
| 472 |
+
"single_word": false,
|
| 473 |
+
"special": true
|
| 474 |
+
},
|
| 475 |
+
"128059": {
|
| 476 |
+
"content": "<|reserved_special_token_51|>",
|
| 477 |
+
"lstrip": false,
|
| 478 |
+
"normalized": false,
|
| 479 |
+
"rstrip": false,
|
| 480 |
+
"single_word": false,
|
| 481 |
+
"special": true
|
| 482 |
+
},
|
| 483 |
+
"128060": {
|
| 484 |
+
"content": "<|reserved_special_token_52|>",
|
| 485 |
+
"lstrip": false,
|
| 486 |
+
"normalized": false,
|
| 487 |
+
"rstrip": false,
|
| 488 |
+
"single_word": false,
|
| 489 |
+
"special": true
|
| 490 |
+
},
|
| 491 |
+
"128061": {
|
| 492 |
+
"content": "<|reserved_special_token_53|>",
|
| 493 |
+
"lstrip": false,
|
| 494 |
+
"normalized": false,
|
| 495 |
+
"rstrip": false,
|
| 496 |
+
"single_word": false,
|
| 497 |
+
"special": true
|
| 498 |
+
},
|
| 499 |
+
"128062": {
|
| 500 |
+
"content": "<|reserved_special_token_54|>",
|
| 501 |
+
"lstrip": false,
|
| 502 |
+
"normalized": false,
|
| 503 |
+
"rstrip": false,
|
| 504 |
+
"single_word": false,
|
| 505 |
+
"special": true
|
| 506 |
+
},
|
| 507 |
+
"128063": {
|
| 508 |
+
"content": "<|reserved_special_token_55|>",
|
| 509 |
+
"lstrip": false,
|
| 510 |
+
"normalized": false,
|
| 511 |
+
"rstrip": false,
|
| 512 |
+
"single_word": false,
|
| 513 |
+
"special": true
|
| 514 |
+
},
|
| 515 |
+
"128064": {
|
| 516 |
+
"content": "<|reserved_special_token_56|>",
|
| 517 |
+
"lstrip": false,
|
| 518 |
+
"normalized": false,
|
| 519 |
+
"rstrip": false,
|
| 520 |
+
"single_word": false,
|
| 521 |
+
"special": true
|
| 522 |
+
},
|
| 523 |
+
"128065": {
|
| 524 |
+
"content": "<|reserved_special_token_57|>",
|
| 525 |
+
"lstrip": false,
|
| 526 |
+
"normalized": false,
|
| 527 |
+
"rstrip": false,
|
| 528 |
+
"single_word": false,
|
| 529 |
+
"special": true
|
| 530 |
+
},
|
| 531 |
+
"128066": {
|
| 532 |
+
"content": "<|reserved_special_token_58|>",
|
| 533 |
+
"lstrip": false,
|
| 534 |
+
"normalized": false,
|
| 535 |
+
"rstrip": false,
|
| 536 |
+
"single_word": false,
|
| 537 |
+
"special": true
|
| 538 |
+
},
|
| 539 |
+
"128067": {
|
| 540 |
+
"content": "<|reserved_special_token_59|>",
|
| 541 |
+
"lstrip": false,
|
| 542 |
+
"normalized": false,
|
| 543 |
+
"rstrip": false,
|
| 544 |
+
"single_word": false,
|
| 545 |
+
"special": true
|
| 546 |
+
},
|
| 547 |
+
"128068": {
|
| 548 |
+
"content": "<|reserved_special_token_60|>",
|
| 549 |
+
"lstrip": false,
|
| 550 |
+
"normalized": false,
|
| 551 |
+
"rstrip": false,
|
| 552 |
+
"single_word": false,
|
| 553 |
+
"special": true
|
| 554 |
+
},
|
| 555 |
+
"128069": {
|
| 556 |
+
"content": "<|reserved_special_token_61|>",
|
| 557 |
+
"lstrip": false,
|
| 558 |
+
"normalized": false,
|
| 559 |
+
"rstrip": false,
|
| 560 |
+
"single_word": false,
|
| 561 |
+
"special": true
|
| 562 |
+
},
|
| 563 |
+
"128070": {
|
| 564 |
+
"content": "<|reserved_special_token_62|>",
|
| 565 |
+
"lstrip": false,
|
| 566 |
+
"normalized": false,
|
| 567 |
+
"rstrip": false,
|
| 568 |
+
"single_word": false,
|
| 569 |
+
"special": true
|
| 570 |
+
},
|
| 571 |
+
"128071": {
|
| 572 |
+
"content": "<|reserved_special_token_63|>",
|
| 573 |
+
"lstrip": false,
|
| 574 |
+
"normalized": false,
|
| 575 |
+
"rstrip": false,
|
| 576 |
+
"single_word": false,
|
| 577 |
+
"special": true
|
| 578 |
+
},
|
| 579 |
+
"128072": {
|
| 580 |
+
"content": "<|reserved_special_token_64|>",
|
| 581 |
+
"lstrip": false,
|
| 582 |
+
"normalized": false,
|
| 583 |
+
"rstrip": false,
|
| 584 |
+
"single_word": false,
|
| 585 |
+
"special": true
|
| 586 |
+
},
|
| 587 |
+
"128073": {
|
| 588 |
+
"content": "<|reserved_special_token_65|>",
|
| 589 |
+
"lstrip": false,
|
| 590 |
+
"normalized": false,
|
| 591 |
+
"rstrip": false,
|
| 592 |
+
"single_word": false,
|
| 593 |
+
"special": true
|
| 594 |
+
},
|
| 595 |
+
"128074": {
|
| 596 |
+
"content": "<|reserved_special_token_66|>",
|
| 597 |
+
"lstrip": false,
|
| 598 |
+
"normalized": false,
|
| 599 |
+
"rstrip": false,
|
| 600 |
+
"single_word": false,
|
| 601 |
+
"special": true
|
| 602 |
+
},
|
| 603 |
+
"128075": {
|
| 604 |
+
"content": "<|reserved_special_token_67|>",
|
| 605 |
+
"lstrip": false,
|
| 606 |
+
"normalized": false,
|
| 607 |
+
"rstrip": false,
|
| 608 |
+
"single_word": false,
|
| 609 |
+
"special": true
|
| 610 |
+
},
|
| 611 |
+
"128076": {
|
| 612 |
+
"content": "<|reserved_special_token_68|>",
|
| 613 |
+
"lstrip": false,
|
| 614 |
+
"normalized": false,
|
| 615 |
+
"rstrip": false,
|
| 616 |
+
"single_word": false,
|
| 617 |
+
"special": true
|
| 618 |
+
},
|
| 619 |
+
"128077": {
|
| 620 |
+
"content": "<|reserved_special_token_69|>",
|
| 621 |
+
"lstrip": false,
|
| 622 |
+
"normalized": false,
|
| 623 |
+
"rstrip": false,
|
| 624 |
+
"single_word": false,
|
| 625 |
+
"special": true
|
| 626 |
+
},
|
| 627 |
+
"128078": {
|
| 628 |
+
"content": "<|reserved_special_token_70|>",
|
| 629 |
+
"lstrip": false,
|
| 630 |
+
"normalized": false,
|
| 631 |
+
"rstrip": false,
|
| 632 |
+
"single_word": false,
|
| 633 |
+
"special": true
|
| 634 |
+
},
|
| 635 |
+
"128079": {
|
| 636 |
+
"content": "<|reserved_special_token_71|>",
|
| 637 |
+
"lstrip": false,
|
| 638 |
+
"normalized": false,
|
| 639 |
+
"rstrip": false,
|
| 640 |
+
"single_word": false,
|
| 641 |
+
"special": true
|
| 642 |
+
},
|
| 643 |
+
"128080": {
|
| 644 |
+
"content": "<|reserved_special_token_72|>",
|
| 645 |
+
"lstrip": false,
|
| 646 |
+
"normalized": false,
|
| 647 |
+
"rstrip": false,
|
| 648 |
+
"single_word": false,
|
| 649 |
+
"special": true
|
| 650 |
+
},
|
| 651 |
+
"128081": {
|
| 652 |
+
"content": "<|reserved_special_token_73|>",
|
| 653 |
+
"lstrip": false,
|
| 654 |
+
"normalized": false,
|
| 655 |
+
"rstrip": false,
|
| 656 |
+
"single_word": false,
|
| 657 |
+
"special": true
|
| 658 |
+
},
|
| 659 |
+
"128082": {
|
| 660 |
+
"content": "<|reserved_special_token_74|>",
|
| 661 |
+
"lstrip": false,
|
| 662 |
+
"normalized": false,
|
| 663 |
+
"rstrip": false,
|
| 664 |
+
"single_word": false,
|
| 665 |
+
"special": true
|
| 666 |
+
},
|
| 667 |
+
"128083": {
|
| 668 |
+
"content": "<|reserved_special_token_75|>",
|
| 669 |
+
"lstrip": false,
|
| 670 |
+
"normalized": false,
|
| 671 |
+
"rstrip": false,
|
| 672 |
+
"single_word": false,
|
| 673 |
+
"special": true
|
| 674 |
+
},
|
| 675 |
+
"128084": {
|
| 676 |
+
"content": "<|reserved_special_token_76|>",
|
| 677 |
+
"lstrip": false,
|
| 678 |
+
"normalized": false,
|
| 679 |
+
"rstrip": false,
|
| 680 |
+
"single_word": false,
|
| 681 |
+
"special": true
|
| 682 |
+
},
|
| 683 |
+
"128085": {
|
| 684 |
+
"content": "<|reserved_special_token_77|>",
|
| 685 |
+
"lstrip": false,
|
| 686 |
+
"normalized": false,
|
| 687 |
+
"rstrip": false,
|
| 688 |
+
"single_word": false,
|
| 689 |
+
"special": true
|
| 690 |
+
},
|
| 691 |
+
"128086": {
|
| 692 |
+
"content": "<|reserved_special_token_78|>",
|
| 693 |
+
"lstrip": false,
|
| 694 |
+
"normalized": false,
|
| 695 |
+
"rstrip": false,
|
| 696 |
+
"single_word": false,
|
| 697 |
+
"special": true
|
| 698 |
+
},
|
| 699 |
+
"128087": {
|
| 700 |
+
"content": "<|reserved_special_token_79|>",
|
| 701 |
+
"lstrip": false,
|
| 702 |
+
"normalized": false,
|
| 703 |
+
"rstrip": false,
|
| 704 |
+
"single_word": false,
|
| 705 |
+
"special": true
|
| 706 |
+
},
|
| 707 |
+
"128088": {
|
| 708 |
+
"content": "<|reserved_special_token_80|>",
|
| 709 |
+
"lstrip": false,
|
| 710 |
+
"normalized": false,
|
| 711 |
+
"rstrip": false,
|
| 712 |
+
"single_word": false,
|
| 713 |
+
"special": true
|
| 714 |
+
},
|
| 715 |
+
"128089": {
|
| 716 |
+
"content": "<|reserved_special_token_81|>",
|
| 717 |
+
"lstrip": false,
|
| 718 |
+
"normalized": false,
|
| 719 |
+
"rstrip": false,
|
| 720 |
+
"single_word": false,
|
| 721 |
+
"special": true
|
| 722 |
+
},
|
| 723 |
+
"128090": {
|
| 724 |
+
"content": "<|reserved_special_token_82|>",
|
| 725 |
+
"lstrip": false,
|
| 726 |
+
"normalized": false,
|
| 727 |
+
"rstrip": false,
|
| 728 |
+
"single_word": false,
|
| 729 |
+
"special": true
|
| 730 |
+
},
|
| 731 |
+
"128091": {
|
| 732 |
+
"content": "<|reserved_special_token_83|>",
|
| 733 |
+
"lstrip": false,
|
| 734 |
+
"normalized": false,
|
| 735 |
+
"rstrip": false,
|
| 736 |
+
"single_word": false,
|
| 737 |
+
"special": true
|
| 738 |
+
},
|
| 739 |
+
"128092": {
|
| 740 |
+
"content": "<|reserved_special_token_84|>",
|
| 741 |
+
"lstrip": false,
|
| 742 |
+
"normalized": false,
|
| 743 |
+
"rstrip": false,
|
| 744 |
+
"single_word": false,
|
| 745 |
+
"special": true
|
| 746 |
+
},
|
| 747 |
+
"128093": {
|
| 748 |
+
"content": "<|reserved_special_token_85|>",
|
| 749 |
+
"lstrip": false,
|
| 750 |
+
"normalized": false,
|
| 751 |
+
"rstrip": false,
|
| 752 |
+
"single_word": false,
|
| 753 |
+
"special": true
|
| 754 |
+
},
|
| 755 |
+
"128094": {
|
| 756 |
+
"content": "<|reserved_special_token_86|>",
|
| 757 |
+
"lstrip": false,
|
| 758 |
+
"normalized": false,
|
| 759 |
+
"rstrip": false,
|
| 760 |
+
"single_word": false,
|
| 761 |
+
"special": true
|
| 762 |
+
},
|
| 763 |
+
"128095": {
|
| 764 |
+
"content": "<|reserved_special_token_87|>",
|
| 765 |
+
"lstrip": false,
|
| 766 |
+
"normalized": false,
|
| 767 |
+
"rstrip": false,
|
| 768 |
+
"single_word": false,
|
| 769 |
+
"special": true
|
| 770 |
+
},
|
| 771 |
+
"128096": {
|
| 772 |
+
"content": "<|reserved_special_token_88|>",
|
| 773 |
+
"lstrip": false,
|
| 774 |
+
"normalized": false,
|
| 775 |
+
"rstrip": false,
|
| 776 |
+
"single_word": false,
|
| 777 |
+
"special": true
|
| 778 |
+
},
|
| 779 |
+
"128097": {
|
| 780 |
+
"content": "<|reserved_special_token_89|>",
|
| 781 |
+
"lstrip": false,
|
| 782 |
+
"normalized": false,
|
| 783 |
+
"rstrip": false,
|
| 784 |
+
"single_word": false,
|
| 785 |
+
"special": true
|
| 786 |
+
},
|
| 787 |
+
"128098": {
|
| 788 |
+
"content": "<|reserved_special_token_90|>",
|
| 789 |
+
"lstrip": false,
|
| 790 |
+
"normalized": false,
|
| 791 |
+
"rstrip": false,
|
| 792 |
+
"single_word": false,
|
| 793 |
+
"special": true
|
| 794 |
+
},
|
| 795 |
+
"128099": {
|
| 796 |
+
"content": "<|reserved_special_token_91|>",
|
| 797 |
+
"lstrip": false,
|
| 798 |
+
"normalized": false,
|
| 799 |
+
"rstrip": false,
|
| 800 |
+
"single_word": false,
|
| 801 |
+
"special": true
|
| 802 |
+
},
|
| 803 |
+
"128100": {
|
| 804 |
+
"content": "<|reserved_special_token_92|>",
|
| 805 |
+
"lstrip": false,
|
| 806 |
+
"normalized": false,
|
| 807 |
+
"rstrip": false,
|
| 808 |
+
"single_word": false,
|
| 809 |
+
"special": true
|
| 810 |
+
},
|
| 811 |
+
"128101": {
|
| 812 |
+
"content": "<|reserved_special_token_93|>",
|
| 813 |
+
"lstrip": false,
|
| 814 |
+
"normalized": false,
|
| 815 |
+
"rstrip": false,
|
| 816 |
+
"single_word": false,
|
| 817 |
+
"special": true
|
| 818 |
+
},
|
| 819 |
+
"128102": {
|
| 820 |
+
"content": "<|reserved_special_token_94|>",
|
| 821 |
+
"lstrip": false,
|
| 822 |
+
"normalized": false,
|
| 823 |
+
"rstrip": false,
|
| 824 |
+
"single_word": false,
|
| 825 |
+
"special": true
|
| 826 |
+
},
|
| 827 |
+
"128103": {
|
| 828 |
+
"content": "<|reserved_special_token_95|>",
|
| 829 |
+
"lstrip": false,
|
| 830 |
+
"normalized": false,
|
| 831 |
+
"rstrip": false,
|
| 832 |
+
"single_word": false,
|
| 833 |
+
"special": true
|
| 834 |
+
},
|
| 835 |
+
"128104": {
|
| 836 |
+
"content": "<|reserved_special_token_96|>",
|
| 837 |
+
"lstrip": false,
|
| 838 |
+
"normalized": false,
|
| 839 |
+
"rstrip": false,
|
| 840 |
+
"single_word": false,
|
| 841 |
+
"special": true
|
| 842 |
+
},
|
| 843 |
+
"128105": {
|
| 844 |
+
"content": "<|reserved_special_token_97|>",
|
| 845 |
+
"lstrip": false,
|
| 846 |
+
"normalized": false,
|
| 847 |
+
"rstrip": false,
|
| 848 |
+
"single_word": false,
|
| 849 |
+
"special": true
|
| 850 |
+
},
|
| 851 |
+
"128106": {
|
| 852 |
+
"content": "<|reserved_special_token_98|>",
|
| 853 |
+
"lstrip": false,
|
| 854 |
+
"normalized": false,
|
| 855 |
+
"rstrip": false,
|
| 856 |
+
"single_word": false,
|
| 857 |
+
"special": true
|
| 858 |
+
},
|
| 859 |
+
"128107": {
|
| 860 |
+
"content": "<|reserved_special_token_99|>",
|
| 861 |
+
"lstrip": false,
|
| 862 |
+
"normalized": false,
|
| 863 |
+
"rstrip": false,
|
| 864 |
+
"single_word": false,
|
| 865 |
+
"special": true
|
| 866 |
+
},
|
| 867 |
+
"128108": {
|
| 868 |
+
"content": "<|reserved_special_token_100|>",
|
| 869 |
+
"lstrip": false,
|
| 870 |
+
"normalized": false,
|
| 871 |
+
"rstrip": false,
|
| 872 |
+
"single_word": false,
|
| 873 |
+
"special": true
|
| 874 |
+
},
|
| 875 |
+
"128109": {
|
| 876 |
+
"content": "<|reserved_special_token_101|>",
|
| 877 |
+
"lstrip": false,
|
| 878 |
+
"normalized": false,
|
| 879 |
+
"rstrip": false,
|
| 880 |
+
"single_word": false,
|
| 881 |
+
"special": true
|
| 882 |
+
},
|
| 883 |
+
"128110": {
|
| 884 |
+
"content": "<|reserved_special_token_102|>",
|
| 885 |
+
"lstrip": false,
|
| 886 |
+
"normalized": false,
|
| 887 |
+
"rstrip": false,
|
| 888 |
+
"single_word": false,
|
| 889 |
+
"special": true
|
| 890 |
+
},
|
| 891 |
+
"128111": {
|
| 892 |
+
"content": "<|reserved_special_token_103|>",
|
| 893 |
+
"lstrip": false,
|
| 894 |
+
"normalized": false,
|
| 895 |
+
"rstrip": false,
|
| 896 |
+
"single_word": false,
|
| 897 |
+
"special": true
|
| 898 |
+
},
|
| 899 |
+
"128112": {
|
| 900 |
+
"content": "<|reserved_special_token_104|>",
|
| 901 |
+
"lstrip": false,
|
| 902 |
+
"normalized": false,
|
| 903 |
+
"rstrip": false,
|
| 904 |
+
"single_word": false,
|
| 905 |
+
"special": true
|
| 906 |
+
},
|
| 907 |
+
"128113": {
|
| 908 |
+
"content": "<|reserved_special_token_105|>",
|
| 909 |
+
"lstrip": false,
|
| 910 |
+
"normalized": false,
|
| 911 |
+
"rstrip": false,
|
| 912 |
+
"single_word": false,
|
| 913 |
+
"special": true
|
| 914 |
+
},
|
| 915 |
+
"128114": {
|
| 916 |
+
"content": "<|reserved_special_token_106|>",
|
| 917 |
+
"lstrip": false,
|
| 918 |
+
"normalized": false,
|
| 919 |
+
"rstrip": false,
|
| 920 |
+
"single_word": false,
|
| 921 |
+
"special": true
|
| 922 |
+
},
|
| 923 |
+
"128115": {
|
| 924 |
+
"content": "<|reserved_special_token_107|>",
|
| 925 |
+
"lstrip": false,
|
| 926 |
+
"normalized": false,
|
| 927 |
+
"rstrip": false,
|
| 928 |
+
"single_word": false,
|
| 929 |
+
"special": true
|
| 930 |
+
},
|
| 931 |
+
"128116": {
|
| 932 |
+
"content": "<|reserved_special_token_108|>",
|
| 933 |
+
"lstrip": false,
|
| 934 |
+
"normalized": false,
|
| 935 |
+
"rstrip": false,
|
| 936 |
+
"single_word": false,
|
| 937 |
+
"special": true
|
| 938 |
+
},
|
| 939 |
+
"128117": {
|
| 940 |
+
"content": "<|reserved_special_token_109|>",
|
| 941 |
+
"lstrip": false,
|
| 942 |
+
"normalized": false,
|
| 943 |
+
"rstrip": false,
|
| 944 |
+
"single_word": false,
|
| 945 |
+
"special": true
|
| 946 |
+
},
|
| 947 |
+
"128118": {
|
| 948 |
+
"content": "<|reserved_special_token_110|>",
|
| 949 |
+
"lstrip": false,
|
| 950 |
+
"normalized": false,
|
| 951 |
+
"rstrip": false,
|
| 952 |
+
"single_word": false,
|
| 953 |
+
"special": true
|
| 954 |
+
},
|
| 955 |
+
"128119": {
|
| 956 |
+
"content": "<|reserved_special_token_111|>",
|
| 957 |
+
"lstrip": false,
|
| 958 |
+
"normalized": false,
|
| 959 |
+
"rstrip": false,
|
| 960 |
+
"single_word": false,
|
| 961 |
+
"special": true
|
| 962 |
+
},
|
| 963 |
+
"128120": {
|
| 964 |
+
"content": "<|reserved_special_token_112|>",
|
| 965 |
+
"lstrip": false,
|
| 966 |
+
"normalized": false,
|
| 967 |
+
"rstrip": false,
|
| 968 |
+
"single_word": false,
|
| 969 |
+
"special": true
|
| 970 |
+
},
|
| 971 |
+
"128121": {
|
| 972 |
+
"content": "<|reserved_special_token_113|>",
|
| 973 |
+
"lstrip": false,
|
| 974 |
+
"normalized": false,
|
| 975 |
+
"rstrip": false,
|
| 976 |
+
"single_word": false,
|
| 977 |
+
"special": true
|
| 978 |
+
},
|
| 979 |
+
"128122": {
|
| 980 |
+
"content": "<|reserved_special_token_114|>",
|
| 981 |
+
"lstrip": false,
|
| 982 |
+
"normalized": false,
|
| 983 |
+
"rstrip": false,
|
| 984 |
+
"single_word": false,
|
| 985 |
+
"special": true
|
| 986 |
+
},
|
| 987 |
+
"128123": {
|
| 988 |
+
"content": "<|reserved_special_token_115|>",
|
| 989 |
+
"lstrip": false,
|
| 990 |
+
"normalized": false,
|
| 991 |
+
"rstrip": false,
|
| 992 |
+
"single_word": false,
|
| 993 |
+
"special": true
|
| 994 |
+
},
|
| 995 |
+
"128124": {
|
| 996 |
+
"content": "<|reserved_special_token_116|>",
|
| 997 |
+
"lstrip": false,
|
| 998 |
+
"normalized": false,
|
| 999 |
+
"rstrip": false,
|
| 1000 |
+
"single_word": false,
|
| 1001 |
+
"special": true
|
| 1002 |
+
},
|
| 1003 |
+
"128125": {
|
| 1004 |
+
"content": "<|reserved_special_token_117|>",
|
| 1005 |
+
"lstrip": false,
|
| 1006 |
+
"normalized": false,
|
| 1007 |
+
"rstrip": false,
|
| 1008 |
+
"single_word": false,
|
| 1009 |
+
"special": true
|
| 1010 |
+
},
|
| 1011 |
+
"128126": {
|
| 1012 |
+
"content": "<|reserved_special_token_118|>",
|
| 1013 |
+
"lstrip": false,
|
| 1014 |
+
"normalized": false,
|
| 1015 |
+
"rstrip": false,
|
| 1016 |
+
"single_word": false,
|
| 1017 |
+
"special": true
|
| 1018 |
+
},
|
| 1019 |
+
"128127": {
|
| 1020 |
+
"content": "<|reserved_special_token_119|>",
|
| 1021 |
+
"lstrip": false,
|
| 1022 |
+
"normalized": false,
|
| 1023 |
+
"rstrip": false,
|
| 1024 |
+
"single_word": false,
|
| 1025 |
+
"special": true
|
| 1026 |
+
},
|
| 1027 |
+
"128128": {
|
| 1028 |
+
"content": "<|reserved_special_token_120|>",
|
| 1029 |
+
"lstrip": false,
|
| 1030 |
+
"normalized": false,
|
| 1031 |
+
"rstrip": false,
|
| 1032 |
+
"single_word": false,
|
| 1033 |
+
"special": true
|
| 1034 |
+
},
|
| 1035 |
+
"128129": {
|
| 1036 |
+
"content": "<|reserved_special_token_121|>",
|
| 1037 |
+
"lstrip": false,
|
| 1038 |
+
"normalized": false,
|
| 1039 |
+
"rstrip": false,
|
| 1040 |
+
"single_word": false,
|
| 1041 |
+
"special": true
|
| 1042 |
+
},
|
| 1043 |
+
"128130": {
|
| 1044 |
+
"content": "<|reserved_special_token_122|>",
|
| 1045 |
+
"lstrip": false,
|
| 1046 |
+
"normalized": false,
|
| 1047 |
+
"rstrip": false,
|
| 1048 |
+
"single_word": false,
|
| 1049 |
+
"special": true
|
| 1050 |
+
},
|
| 1051 |
+
"128131": {
|
| 1052 |
+
"content": "<|reserved_special_token_123|>",
|
| 1053 |
+
"lstrip": false,
|
| 1054 |
+
"normalized": false,
|
| 1055 |
+
"rstrip": false,
|
| 1056 |
+
"single_word": false,
|
| 1057 |
+
"special": true
|
| 1058 |
+
},
|
| 1059 |
+
"128132": {
|
| 1060 |
+
"content": "<|reserved_special_token_124|>",
|
| 1061 |
+
"lstrip": false,
|
| 1062 |
+
"normalized": false,
|
| 1063 |
+
"rstrip": false,
|
| 1064 |
+
"single_word": false,
|
| 1065 |
+
"special": true
|
| 1066 |
+
},
|
| 1067 |
+
"128133": {
|
| 1068 |
+
"content": "<|reserved_special_token_125|>",
|
| 1069 |
+
"lstrip": false,
|
| 1070 |
+
"normalized": false,
|
| 1071 |
+
"rstrip": false,
|
| 1072 |
+
"single_word": false,
|
| 1073 |
+
"special": true
|
| 1074 |
+
},
|
| 1075 |
+
"128134": {
|
| 1076 |
+
"content": "<|reserved_special_token_126|>",
|
| 1077 |
+
"lstrip": false,
|
| 1078 |
+
"normalized": false,
|
| 1079 |
+
"rstrip": false,
|
| 1080 |
+
"single_word": false,
|
| 1081 |
+
"special": true
|
| 1082 |
+
},
|
| 1083 |
+
"128135": {
|
| 1084 |
+
"content": "<|reserved_special_token_127|>",
|
| 1085 |
+
"lstrip": false,
|
| 1086 |
+
"normalized": false,
|
| 1087 |
+
"rstrip": false,
|
| 1088 |
+
"single_word": false,
|
| 1089 |
+
"special": true
|
| 1090 |
+
},
|
| 1091 |
+
"128136": {
|
| 1092 |
+
"content": "<|reserved_special_token_128|>",
|
| 1093 |
+
"lstrip": false,
|
| 1094 |
+
"normalized": false,
|
| 1095 |
+
"rstrip": false,
|
| 1096 |
+
"single_word": false,
|
| 1097 |
+
"special": true
|
| 1098 |
+
},
|
| 1099 |
+
"128137": {
|
| 1100 |
+
"content": "<|reserved_special_token_129|>",
|
| 1101 |
+
"lstrip": false,
|
| 1102 |
+
"normalized": false,
|
| 1103 |
+
"rstrip": false,
|
| 1104 |
+
"single_word": false,
|
| 1105 |
+
"special": true
|
| 1106 |
+
},
|
| 1107 |
+
"128138": {
|
| 1108 |
+
"content": "<|reserved_special_token_130|>",
|
| 1109 |
+
"lstrip": false,
|
| 1110 |
+
"normalized": false,
|
| 1111 |
+
"rstrip": false,
|
| 1112 |
+
"single_word": false,
|
| 1113 |
+
"special": true
|
| 1114 |
+
},
|
| 1115 |
+
"128139": {
|
| 1116 |
+
"content": "<|reserved_special_token_131|>",
|
| 1117 |
+
"lstrip": false,
|
| 1118 |
+
"normalized": false,
|
| 1119 |
+
"rstrip": false,
|
| 1120 |
+
"single_word": false,
|
| 1121 |
+
"special": true
|
| 1122 |
+
},
|
| 1123 |
+
"128140": {
|
| 1124 |
+
"content": "<|reserved_special_token_132|>",
|
| 1125 |
+
"lstrip": false,
|
| 1126 |
+
"normalized": false,
|
| 1127 |
+
"rstrip": false,
|
| 1128 |
+
"single_word": false,
|
| 1129 |
+
"special": true
|
| 1130 |
+
},
|
| 1131 |
+
"128141": {
|
| 1132 |
+
"content": "<|reserved_special_token_133|>",
|
| 1133 |
+
"lstrip": false,
|
| 1134 |
+
"normalized": false,
|
| 1135 |
+
"rstrip": false,
|
| 1136 |
+
"single_word": false,
|
| 1137 |
+
"special": true
|
| 1138 |
+
},
|
| 1139 |
+
"128142": {
|
| 1140 |
+
"content": "<|reserved_special_token_134|>",
|
| 1141 |
+
"lstrip": false,
|
| 1142 |
+
"normalized": false,
|
| 1143 |
+
"rstrip": false,
|
| 1144 |
+
"single_word": false,
|
| 1145 |
+
"special": true
|
| 1146 |
+
},
|
| 1147 |
+
"128143": {
|
| 1148 |
+
"content": "<|reserved_special_token_135|>",
|
| 1149 |
+
"lstrip": false,
|
| 1150 |
+
"normalized": false,
|
| 1151 |
+
"rstrip": false,
|
| 1152 |
+
"single_word": false,
|
| 1153 |
+
"special": true
|
| 1154 |
+
},
|
| 1155 |
+
"128144": {
|
| 1156 |
+
"content": "<|reserved_special_token_136|>",
|
| 1157 |
+
"lstrip": false,
|
| 1158 |
+
"normalized": false,
|
| 1159 |
+
"rstrip": false,
|
| 1160 |
+
"single_word": false,
|
| 1161 |
+
"special": true
|
| 1162 |
+
},
|
| 1163 |
+
"128145": {
|
| 1164 |
+
"content": "<|reserved_special_token_137|>",
|
| 1165 |
+
"lstrip": false,
|
| 1166 |
+
"normalized": false,
|
| 1167 |
+
"rstrip": false,
|
| 1168 |
+
"single_word": false,
|
| 1169 |
+
"special": true
|
| 1170 |
+
},
|
| 1171 |
+
"128146": {
|
| 1172 |
+
"content": "<|reserved_special_token_138|>",
|
| 1173 |
+
"lstrip": false,
|
| 1174 |
+
"normalized": false,
|
| 1175 |
+
"rstrip": false,
|
| 1176 |
+
"single_word": false,
|
| 1177 |
+
"special": true
|
| 1178 |
+
},
|
| 1179 |
+
"128147": {
|
| 1180 |
+
"content": "<|reserved_special_token_139|>",
|
| 1181 |
+
"lstrip": false,
|
| 1182 |
+
"normalized": false,
|
| 1183 |
+
"rstrip": false,
|
| 1184 |
+
"single_word": false,
|
| 1185 |
+
"special": true
|
| 1186 |
+
},
|
| 1187 |
+
"128148": {
|
| 1188 |
+
"content": "<|reserved_special_token_140|>",
|
| 1189 |
+
"lstrip": false,
|
| 1190 |
+
"normalized": false,
|
| 1191 |
+
"rstrip": false,
|
| 1192 |
+
"single_word": false,
|
| 1193 |
+
"special": true
|
| 1194 |
+
},
|
| 1195 |
+
"128149": {
|
| 1196 |
+
"content": "<|reserved_special_token_141|>",
|
| 1197 |
+
"lstrip": false,
|
| 1198 |
+
"normalized": false,
|
| 1199 |
+
"rstrip": false,
|
| 1200 |
+
"single_word": false,
|
| 1201 |
+
"special": true
|
| 1202 |
+
},
|
| 1203 |
+
"128150": {
|
| 1204 |
+
"content": "<|reserved_special_token_142|>",
|
| 1205 |
+
"lstrip": false,
|
| 1206 |
+
"normalized": false,
|
| 1207 |
+
"rstrip": false,
|
| 1208 |
+
"single_word": false,
|
| 1209 |
+
"special": true
|
| 1210 |
+
},
|
| 1211 |
+
"128151": {
|
| 1212 |
+
"content": "<|reserved_special_token_143|>",
|
| 1213 |
+
"lstrip": false,
|
| 1214 |
+
"normalized": false,
|
| 1215 |
+
"rstrip": false,
|
| 1216 |
+
"single_word": false,
|
| 1217 |
+
"special": true
|
| 1218 |
+
},
|
| 1219 |
+
"128152": {
|
| 1220 |
+
"content": "<|reserved_special_token_144|>",
|
| 1221 |
+
"lstrip": false,
|
| 1222 |
+
"normalized": false,
|
| 1223 |
+
"rstrip": false,
|
| 1224 |
+
"single_word": false,
|
| 1225 |
+
"special": true
|
| 1226 |
+
},
|
| 1227 |
+
"128153": {
|
| 1228 |
+
"content": "<|reserved_special_token_145|>",
|
| 1229 |
+
"lstrip": false,
|
| 1230 |
+
"normalized": false,
|
| 1231 |
+
"rstrip": false,
|
| 1232 |
+
"single_word": false,
|
| 1233 |
+
"special": true
|
| 1234 |
+
},
|
| 1235 |
+
"128154": {
|
| 1236 |
+
"content": "<|reserved_special_token_146|>",
|
| 1237 |
+
"lstrip": false,
|
| 1238 |
+
"normalized": false,
|
| 1239 |
+
"rstrip": false,
|
| 1240 |
+
"single_word": false,
|
| 1241 |
+
"special": true
|
| 1242 |
+
},
|
| 1243 |
+
"128155": {
|
| 1244 |
+
"content": "<|reserved_special_token_147|>",
|
| 1245 |
+
"lstrip": false,
|
| 1246 |
+
"normalized": false,
|
| 1247 |
+
"rstrip": false,
|
| 1248 |
+
"single_word": false,
|
| 1249 |
+
"special": true
|
| 1250 |
+
},
|
| 1251 |
+
"128156": {
|
| 1252 |
+
"content": "<|reserved_special_token_148|>",
|
| 1253 |
+
"lstrip": false,
|
| 1254 |
+
"normalized": false,
|
| 1255 |
+
"rstrip": false,
|
| 1256 |
+
"single_word": false,
|
| 1257 |
+
"special": true
|
| 1258 |
+
},
|
| 1259 |
+
"128157": {
|
| 1260 |
+
"content": "<|reserved_special_token_149|>",
|
| 1261 |
+
"lstrip": false,
|
| 1262 |
+
"normalized": false,
|
| 1263 |
+
"rstrip": false,
|
| 1264 |
+
"single_word": false,
|
| 1265 |
+
"special": true
|
| 1266 |
+
},
|
| 1267 |
+
"128158": {
|
| 1268 |
+
"content": "<|reserved_special_token_150|>",
|
| 1269 |
+
"lstrip": false,
|
| 1270 |
+
"normalized": false,
|
| 1271 |
+
"rstrip": false,
|
| 1272 |
+
"single_word": false,
|
| 1273 |
+
"special": true
|
| 1274 |
+
},
|
| 1275 |
+
"128159": {
|
| 1276 |
+
"content": "<|reserved_special_token_151|>",
|
| 1277 |
+
"lstrip": false,
|
| 1278 |
+
"normalized": false,
|
| 1279 |
+
"rstrip": false,
|
| 1280 |
+
"single_word": false,
|
| 1281 |
+
"special": true
|
| 1282 |
+
},
|
| 1283 |
+
"128160": {
|
| 1284 |
+
"content": "<|reserved_special_token_152|>",
|
| 1285 |
+
"lstrip": false,
|
| 1286 |
+
"normalized": false,
|
| 1287 |
+
"rstrip": false,
|
| 1288 |
+
"single_word": false,
|
| 1289 |
+
"special": true
|
| 1290 |
+
},
|
| 1291 |
+
"128161": {
|
| 1292 |
+
"content": "<|reserved_special_token_153|>",
|
| 1293 |
+
"lstrip": false,
|
| 1294 |
+
"normalized": false,
|
| 1295 |
+
"rstrip": false,
|
| 1296 |
+
"single_word": false,
|
| 1297 |
+
"special": true
|
| 1298 |
+
},
|
| 1299 |
+
"128162": {
|
| 1300 |
+
"content": "<|reserved_special_token_154|>",
|
| 1301 |
+
"lstrip": false,
|
| 1302 |
+
"normalized": false,
|
| 1303 |
+
"rstrip": false,
|
| 1304 |
+
"single_word": false,
|
| 1305 |
+
"special": true
|
| 1306 |
+
},
|
| 1307 |
+
"128163": {
|
| 1308 |
+
"content": "<|reserved_special_token_155|>",
|
| 1309 |
+
"lstrip": false,
|
| 1310 |
+
"normalized": false,
|
| 1311 |
+
"rstrip": false,
|
| 1312 |
+
"single_word": false,
|
| 1313 |
+
"special": true
|
| 1314 |
+
},
|
| 1315 |
+
"128164": {
|
| 1316 |
+
"content": "<|reserved_special_token_156|>",
|
| 1317 |
+
"lstrip": false,
|
| 1318 |
+
"normalized": false,
|
| 1319 |
+
"rstrip": false,
|
| 1320 |
+
"single_word": false,
|
| 1321 |
+
"special": true
|
| 1322 |
+
},
|
| 1323 |
+
"128165": {
|
| 1324 |
+
"content": "<|reserved_special_token_157|>",
|
| 1325 |
+
"lstrip": false,
|
| 1326 |
+
"normalized": false,
|
| 1327 |
+
"rstrip": false,
|
| 1328 |
+
"single_word": false,
|
| 1329 |
+
"special": true
|
| 1330 |
+
},
|
| 1331 |
+
"128166": {
|
| 1332 |
+
"content": "<|reserved_special_token_158|>",
|
| 1333 |
+
"lstrip": false,
|
| 1334 |
+
"normalized": false,
|
| 1335 |
+
"rstrip": false,
|
| 1336 |
+
"single_word": false,
|
| 1337 |
+
"special": true
|
| 1338 |
+
},
|
| 1339 |
+
"128167": {
|
| 1340 |
+
"content": "<|reserved_special_token_159|>",
|
| 1341 |
+
"lstrip": false,
|
| 1342 |
+
"normalized": false,
|
| 1343 |
+
"rstrip": false,
|
| 1344 |
+
"single_word": false,
|
| 1345 |
+
"special": true
|
| 1346 |
+
},
|
| 1347 |
+
"128168": {
|
| 1348 |
+
"content": "<|reserved_special_token_160|>",
|
| 1349 |
+
"lstrip": false,
|
| 1350 |
+
"normalized": false,
|
| 1351 |
+
"rstrip": false,
|
| 1352 |
+
"single_word": false,
|
| 1353 |
+
"special": true
|
| 1354 |
+
},
|
| 1355 |
+
"128169": {
|
| 1356 |
+
"content": "<|reserved_special_token_161|>",
|
| 1357 |
+
"lstrip": false,
|
| 1358 |
+
"normalized": false,
|
| 1359 |
+
"rstrip": false,
|
| 1360 |
+
"single_word": false,
|
| 1361 |
+
"special": true
|
| 1362 |
+
},
|
| 1363 |
+
"128170": {
|
| 1364 |
+
"content": "<|reserved_special_token_162|>",
|
| 1365 |
+
"lstrip": false,
|
| 1366 |
+
"normalized": false,
|
| 1367 |
+
"rstrip": false,
|
| 1368 |
+
"single_word": false,
|
| 1369 |
+
"special": true
|
| 1370 |
+
},
|
| 1371 |
+
"128171": {
|
| 1372 |
+
"content": "<|reserved_special_token_163|>",
|
| 1373 |
+
"lstrip": false,
|
| 1374 |
+
"normalized": false,
|
| 1375 |
+
"rstrip": false,
|
| 1376 |
+
"single_word": false,
|
| 1377 |
+
"special": true
|
| 1378 |
+
},
|
| 1379 |
+
"128172": {
|
| 1380 |
+
"content": "<|reserved_special_token_164|>",
|
| 1381 |
+
"lstrip": false,
|
| 1382 |
+
"normalized": false,
|
| 1383 |
+
"rstrip": false,
|
| 1384 |
+
"single_word": false,
|
| 1385 |
+
"special": true
|
| 1386 |
+
},
|
| 1387 |
+
"128173": {
|
| 1388 |
+
"content": "<|reserved_special_token_165|>",
|
| 1389 |
+
"lstrip": false,
|
| 1390 |
+
"normalized": false,
|
| 1391 |
+
"rstrip": false,
|
| 1392 |
+
"single_word": false,
|
| 1393 |
+
"special": true
|
| 1394 |
+
},
|
| 1395 |
+
"128174": {
|
| 1396 |
+
"content": "<|reserved_special_token_166|>",
|
| 1397 |
+
"lstrip": false,
|
| 1398 |
+
"normalized": false,
|
| 1399 |
+
"rstrip": false,
|
| 1400 |
+
"single_word": false,
|
| 1401 |
+
"special": true
|
| 1402 |
+
},
|
| 1403 |
+
"128175": {
|
| 1404 |
+
"content": "<|reserved_special_token_167|>",
|
| 1405 |
+
"lstrip": false,
|
| 1406 |
+
"normalized": false,
|
| 1407 |
+
"rstrip": false,
|
| 1408 |
+
"single_word": false,
|
| 1409 |
+
"special": true
|
| 1410 |
+
},
|
| 1411 |
+
"128176": {
|
| 1412 |
+
"content": "<|reserved_special_token_168|>",
|
| 1413 |
+
"lstrip": false,
|
| 1414 |
+
"normalized": false,
|
| 1415 |
+
"rstrip": false,
|
| 1416 |
+
"single_word": false,
|
| 1417 |
+
"special": true
|
| 1418 |
+
},
|
| 1419 |
+
"128177": {
|
| 1420 |
+
"content": "<|reserved_special_token_169|>",
|
| 1421 |
+
"lstrip": false,
|
| 1422 |
+
"normalized": false,
|
| 1423 |
+
"rstrip": false,
|
| 1424 |
+
"single_word": false,
|
| 1425 |
+
"special": true
|
| 1426 |
+
},
|
| 1427 |
+
"128178": {
|
| 1428 |
+
"content": "<|reserved_special_token_170|>",
|
| 1429 |
+
"lstrip": false,
|
| 1430 |
+
"normalized": false,
|
| 1431 |
+
"rstrip": false,
|
| 1432 |
+
"single_word": false,
|
| 1433 |
+
"special": true
|
| 1434 |
+
},
|
| 1435 |
+
"128179": {
|
| 1436 |
+
"content": "<|reserved_special_token_171|>",
|
| 1437 |
+
"lstrip": false,
|
| 1438 |
+
"normalized": false,
|
| 1439 |
+
"rstrip": false,
|
| 1440 |
+
"single_word": false,
|
| 1441 |
+
"special": true
|
| 1442 |
+
},
|
| 1443 |
+
"128180": {
|
| 1444 |
+
"content": "<|reserved_special_token_172|>",
|
| 1445 |
+
"lstrip": false,
|
| 1446 |
+
"normalized": false,
|
| 1447 |
+
"rstrip": false,
|
| 1448 |
+
"single_word": false,
|
| 1449 |
+
"special": true
|
| 1450 |
+
},
|
| 1451 |
+
"128181": {
|
| 1452 |
+
"content": "<|reserved_special_token_173|>",
|
| 1453 |
+
"lstrip": false,
|
| 1454 |
+
"normalized": false,
|
| 1455 |
+
"rstrip": false,
|
| 1456 |
+
"single_word": false,
|
| 1457 |
+
"special": true
|
| 1458 |
+
},
|
| 1459 |
+
"128182": {
|
| 1460 |
+
"content": "<|reserved_special_token_174|>",
|
| 1461 |
+
"lstrip": false,
|
| 1462 |
+
"normalized": false,
|
| 1463 |
+
"rstrip": false,
|
| 1464 |
+
"single_word": false,
|
| 1465 |
+
"special": true
|
| 1466 |
+
},
|
| 1467 |
+
"128183": {
|
| 1468 |
+
"content": "<|reserved_special_token_175|>",
|
| 1469 |
+
"lstrip": false,
|
| 1470 |
+
"normalized": false,
|
| 1471 |
+
"rstrip": false,
|
| 1472 |
+
"single_word": false,
|
| 1473 |
+
"special": true
|
| 1474 |
+
},
|
| 1475 |
+
"128184": {
|
| 1476 |
+
"content": "<|reserved_special_token_176|>",
|
| 1477 |
+
"lstrip": false,
|
| 1478 |
+
"normalized": false,
|
| 1479 |
+
"rstrip": false,
|
| 1480 |
+
"single_word": false,
|
| 1481 |
+
"special": true
|
| 1482 |
+
},
|
| 1483 |
+
"128185": {
|
| 1484 |
+
"content": "<|reserved_special_token_177|>",
|
| 1485 |
+
"lstrip": false,
|
| 1486 |
+
"normalized": false,
|
| 1487 |
+
"rstrip": false,
|
| 1488 |
+
"single_word": false,
|
| 1489 |
+
"special": true
|
| 1490 |
+
},
|
| 1491 |
+
"128186": {
|
| 1492 |
+
"content": "<|reserved_special_token_178|>",
|
| 1493 |
+
"lstrip": false,
|
| 1494 |
+
"normalized": false,
|
| 1495 |
+
"rstrip": false,
|
| 1496 |
+
"single_word": false,
|
| 1497 |
+
"special": true
|
| 1498 |
+
},
|
| 1499 |
+
"128187": {
|
| 1500 |
+
"content": "<|reserved_special_token_179|>",
|
| 1501 |
+
"lstrip": false,
|
| 1502 |
+
"normalized": false,
|
| 1503 |
+
"rstrip": false,
|
| 1504 |
+
"single_word": false,
|
| 1505 |
+
"special": true
|
| 1506 |
+
},
|
| 1507 |
+
"128188": {
|
| 1508 |
+
"content": "<|reserved_special_token_180|>",
|
| 1509 |
+
"lstrip": false,
|
| 1510 |
+
"normalized": false,
|
| 1511 |
+
"rstrip": false,
|
| 1512 |
+
"single_word": false,
|
| 1513 |
+
"special": true
|
| 1514 |
+
},
|
| 1515 |
+
"128189": {
|
| 1516 |
+
"content": "<|reserved_special_token_181|>",
|
| 1517 |
+
"lstrip": false,
|
| 1518 |
+
"normalized": false,
|
| 1519 |
+
"rstrip": false,
|
| 1520 |
+
"single_word": false,
|
| 1521 |
+
"special": true
|
| 1522 |
+
},
|
| 1523 |
+
"128190": {
|
| 1524 |
+
"content": "<|reserved_special_token_182|>",
|
| 1525 |
+
"lstrip": false,
|
| 1526 |
+
"normalized": false,
|
| 1527 |
+
"rstrip": false,
|
| 1528 |
+
"single_word": false,
|
| 1529 |
+
"special": true
|
| 1530 |
+
},
|
| 1531 |
+
"128191": {
|
| 1532 |
+
"content": "<|reserved_special_token_183|>",
|
| 1533 |
+
"lstrip": false,
|
| 1534 |
+
"normalized": false,
|
| 1535 |
+
"rstrip": false,
|
| 1536 |
+
"single_word": false,
|
| 1537 |
+
"special": true
|
| 1538 |
+
},
|
| 1539 |
+
"128192": {
|
| 1540 |
+
"content": "<|reserved_special_token_184|>",
|
| 1541 |
+
"lstrip": false,
|
| 1542 |
+
"normalized": false,
|
| 1543 |
+
"rstrip": false,
|
| 1544 |
+
"single_word": false,
|
| 1545 |
+
"special": true
|
| 1546 |
+
},
|
| 1547 |
+
"128193": {
|
| 1548 |
+
"content": "<|reserved_special_token_185|>",
|
| 1549 |
+
"lstrip": false,
|
| 1550 |
+
"normalized": false,
|
| 1551 |
+
"rstrip": false,
|
| 1552 |
+
"single_word": false,
|
| 1553 |
+
"special": true
|
| 1554 |
+
},
|
| 1555 |
+
"128194": {
|
| 1556 |
+
"content": "<|reserved_special_token_186|>",
|
| 1557 |
+
"lstrip": false,
|
| 1558 |
+
"normalized": false,
|
| 1559 |
+
"rstrip": false,
|
| 1560 |
+
"single_word": false,
|
| 1561 |
+
"special": true
|
| 1562 |
+
},
|
| 1563 |
+
"128195": {
|
| 1564 |
+
"content": "<|reserved_special_token_187|>",
|
| 1565 |
+
"lstrip": false,
|
| 1566 |
+
"normalized": false,
|
| 1567 |
+
"rstrip": false,
|
| 1568 |
+
"single_word": false,
|
| 1569 |
+
"special": true
|
| 1570 |
+
},
|
| 1571 |
+
"128196": {
|
| 1572 |
+
"content": "<|reserved_special_token_188|>",
|
| 1573 |
+
"lstrip": false,
|
| 1574 |
+
"normalized": false,
|
| 1575 |
+
"rstrip": false,
|
| 1576 |
+
"single_word": false,
|
| 1577 |
+
"special": true
|
| 1578 |
+
},
|
| 1579 |
+
"128197": {
|
| 1580 |
+
"content": "<|reserved_special_token_189|>",
|
| 1581 |
+
"lstrip": false,
|
| 1582 |
+
"normalized": false,
|
| 1583 |
+
"rstrip": false,
|
| 1584 |
+
"single_word": false,
|
| 1585 |
+
"special": true
|
| 1586 |
+
},
|
| 1587 |
+
"128198": {
|
| 1588 |
+
"content": "<|reserved_special_token_190|>",
|
| 1589 |
+
"lstrip": false,
|
| 1590 |
+
"normalized": false,
|
| 1591 |
+
"rstrip": false,
|
| 1592 |
+
"single_word": false,
|
| 1593 |
+
"special": true
|
| 1594 |
+
},
|
| 1595 |
+
"128199": {
|
| 1596 |
+
"content": "<|reserved_special_token_191|>",
|
| 1597 |
+
"lstrip": false,
|
| 1598 |
+
"normalized": false,
|
| 1599 |
+
"rstrip": false,
|
| 1600 |
+
"single_word": false,
|
| 1601 |
+
"special": true
|
| 1602 |
+
},
|
| 1603 |
+
"128200": {
|
| 1604 |
+
"content": "<|reserved_special_token_192|>",
|
| 1605 |
+
"lstrip": false,
|
| 1606 |
+
"normalized": false,
|
| 1607 |
+
"rstrip": false,
|
| 1608 |
+
"single_word": false,
|
| 1609 |
+
"special": true
|
| 1610 |
+
},
|
| 1611 |
+
"128201": {
|
| 1612 |
+
"content": "<|reserved_special_token_193|>",
|
| 1613 |
+
"lstrip": false,
|
| 1614 |
+
"normalized": false,
|
| 1615 |
+
"rstrip": false,
|
| 1616 |
+
"single_word": false,
|
| 1617 |
+
"special": true
|
| 1618 |
+
},
|
| 1619 |
+
"128202": {
|
| 1620 |
+
"content": "<|reserved_special_token_194|>",
|
| 1621 |
+
"lstrip": false,
|
| 1622 |
+
"normalized": false,
|
| 1623 |
+
"rstrip": false,
|
| 1624 |
+
"single_word": false,
|
| 1625 |
+
"special": true
|
| 1626 |
+
},
|
| 1627 |
+
"128203": {
|
| 1628 |
+
"content": "<|reserved_special_token_195|>",
|
| 1629 |
+
"lstrip": false,
|
| 1630 |
+
"normalized": false,
|
| 1631 |
+
"rstrip": false,
|
| 1632 |
+
"single_word": false,
|
| 1633 |
+
"special": true
|
| 1634 |
+
},
|
| 1635 |
+
"128204": {
|
| 1636 |
+
"content": "<|reserved_special_token_196|>",
|
| 1637 |
+
"lstrip": false,
|
| 1638 |
+
"normalized": false,
|
| 1639 |
+
"rstrip": false,
|
| 1640 |
+
"single_word": false,
|
| 1641 |
+
"special": true
|
| 1642 |
+
},
|
| 1643 |
+
"128205": {
|
| 1644 |
+
"content": "<|reserved_special_token_197|>",
|
| 1645 |
+
"lstrip": false,
|
| 1646 |
+
"normalized": false,
|
| 1647 |
+
"rstrip": false,
|
| 1648 |
+
"single_word": false,
|
| 1649 |
+
"special": true
|
| 1650 |
+
},
|
| 1651 |
+
"128206": {
|
| 1652 |
+
"content": "<|reserved_special_token_198|>",
|
| 1653 |
+
"lstrip": false,
|
| 1654 |
+
"normalized": false,
|
| 1655 |
+
"rstrip": false,
|
| 1656 |
+
"single_word": false,
|
| 1657 |
+
"special": true
|
| 1658 |
+
},
|
| 1659 |
+
"128207": {
|
| 1660 |
+
"content": "<|reserved_special_token_199|>",
|
| 1661 |
+
"lstrip": false,
|
| 1662 |
+
"normalized": false,
|
| 1663 |
+
"rstrip": false,
|
| 1664 |
+
"single_word": false,
|
| 1665 |
+
"special": true
|
| 1666 |
+
},
|
| 1667 |
+
"128208": {
|
| 1668 |
+
"content": "<|reserved_special_token_200|>",
|
| 1669 |
+
"lstrip": false,
|
| 1670 |
+
"normalized": false,
|
| 1671 |
+
"rstrip": false,
|
| 1672 |
+
"single_word": false,
|
| 1673 |
+
"special": true
|
| 1674 |
+
},
|
| 1675 |
+
"128209": {
|
| 1676 |
+
"content": "<|reserved_special_token_201|>",
|
| 1677 |
+
"lstrip": false,
|
| 1678 |
+
"normalized": false,
|
| 1679 |
+
"rstrip": false,
|
| 1680 |
+
"single_word": false,
|
| 1681 |
+
"special": true
|
| 1682 |
+
},
|
| 1683 |
+
"128210": {
|
| 1684 |
+
"content": "<|reserved_special_token_202|>",
|
| 1685 |
+
"lstrip": false,
|
| 1686 |
+
"normalized": false,
|
| 1687 |
+
"rstrip": false,
|
| 1688 |
+
"single_word": false,
|
| 1689 |
+
"special": true
|
| 1690 |
+
},
|
| 1691 |
+
"128211": {
|
| 1692 |
+
"content": "<|reserved_special_token_203|>",
|
| 1693 |
+
"lstrip": false,
|
| 1694 |
+
"normalized": false,
|
| 1695 |
+
"rstrip": false,
|
| 1696 |
+
"single_word": false,
|
| 1697 |
+
"special": true
|
| 1698 |
+
},
|
| 1699 |
+
"128212": {
|
| 1700 |
+
"content": "<|reserved_special_token_204|>",
|
| 1701 |
+
"lstrip": false,
|
| 1702 |
+
"normalized": false,
|
| 1703 |
+
"rstrip": false,
|
| 1704 |
+
"single_word": false,
|
| 1705 |
+
"special": true
|
| 1706 |
+
},
|
| 1707 |
+
"128213": {
|
| 1708 |
+
"content": "<|reserved_special_token_205|>",
|
| 1709 |
+
"lstrip": false,
|
| 1710 |
+
"normalized": false,
|
| 1711 |
+
"rstrip": false,
|
| 1712 |
+
"single_word": false,
|
| 1713 |
+
"special": true
|
| 1714 |
+
},
|
| 1715 |
+
"128214": {
|
| 1716 |
+
"content": "<|reserved_special_token_206|>",
|
| 1717 |
+
"lstrip": false,
|
| 1718 |
+
"normalized": false,
|
| 1719 |
+
"rstrip": false,
|
| 1720 |
+
"single_word": false,
|
| 1721 |
+
"special": true
|
| 1722 |
+
},
|
| 1723 |
+
"128215": {
|
| 1724 |
+
"content": "<|reserved_special_token_207|>",
|
| 1725 |
+
"lstrip": false,
|
| 1726 |
+
"normalized": false,
|
| 1727 |
+
"rstrip": false,
|
| 1728 |
+
"single_word": false,
|
| 1729 |
+
"special": true
|
| 1730 |
+
},
|
| 1731 |
+
"128216": {
|
| 1732 |
+
"content": "<|reserved_special_token_208|>",
|
| 1733 |
+
"lstrip": false,
|
| 1734 |
+
"normalized": false,
|
| 1735 |
+
"rstrip": false,
|
| 1736 |
+
"single_word": false,
|
| 1737 |
+
"special": true
|
| 1738 |
+
},
|
| 1739 |
+
"128217": {
|
| 1740 |
+
"content": "<|reserved_special_token_209|>",
|
| 1741 |
+
"lstrip": false,
|
| 1742 |
+
"normalized": false,
|
| 1743 |
+
"rstrip": false,
|
| 1744 |
+
"single_word": false,
|
| 1745 |
+
"special": true
|
| 1746 |
+
},
|
| 1747 |
+
"128218": {
|
| 1748 |
+
"content": "<|reserved_special_token_210|>",
|
| 1749 |
+
"lstrip": false,
|
| 1750 |
+
"normalized": false,
|
| 1751 |
+
"rstrip": false,
|
| 1752 |
+
"single_word": false,
|
| 1753 |
+
"special": true
|
| 1754 |
+
},
|
| 1755 |
+
"128219": {
|
| 1756 |
+
"content": "<|reserved_special_token_211|>",
|
| 1757 |
+
"lstrip": false,
|
| 1758 |
+
"normalized": false,
|
| 1759 |
+
"rstrip": false,
|
| 1760 |
+
"single_word": false,
|
| 1761 |
+
"special": true
|
| 1762 |
+
},
|
| 1763 |
+
"128220": {
|
| 1764 |
+
"content": "<|reserved_special_token_212|>",
|
| 1765 |
+
"lstrip": false,
|
| 1766 |
+
"normalized": false,
|
| 1767 |
+
"rstrip": false,
|
| 1768 |
+
"single_word": false,
|
| 1769 |
+
"special": true
|
| 1770 |
+
},
|
| 1771 |
+
"128221": {
|
| 1772 |
+
"content": "<|reserved_special_token_213|>",
|
| 1773 |
+
"lstrip": false,
|
| 1774 |
+
"normalized": false,
|
| 1775 |
+
"rstrip": false,
|
| 1776 |
+
"single_word": false,
|
| 1777 |
+
"special": true
|
| 1778 |
+
},
|
| 1779 |
+
"128222": {
|
| 1780 |
+
"content": "<|reserved_special_token_214|>",
|
| 1781 |
+
"lstrip": false,
|
| 1782 |
+
"normalized": false,
|
| 1783 |
+
"rstrip": false,
|
| 1784 |
+
"single_word": false,
|
| 1785 |
+
"special": true
|
| 1786 |
+
},
|
| 1787 |
+
"128223": {
|
| 1788 |
+
"content": "<|reserved_special_token_215|>",
|
| 1789 |
+
"lstrip": false,
|
| 1790 |
+
"normalized": false,
|
| 1791 |
+
"rstrip": false,
|
| 1792 |
+
"single_word": false,
|
| 1793 |
+
"special": true
|
| 1794 |
+
},
|
| 1795 |
+
"128224": {
|
| 1796 |
+
"content": "<|reserved_special_token_216|>",
|
| 1797 |
+
"lstrip": false,
|
| 1798 |
+
"normalized": false,
|
| 1799 |
+
"rstrip": false,
|
| 1800 |
+
"single_word": false,
|
| 1801 |
+
"special": true
|
| 1802 |
+
},
|
| 1803 |
+
"128225": {
|
| 1804 |
+
"content": "<|reserved_special_token_217|>",
|
| 1805 |
+
"lstrip": false,
|
| 1806 |
+
"normalized": false,
|
| 1807 |
+
"rstrip": false,
|
| 1808 |
+
"single_word": false,
|
| 1809 |
+
"special": true
|
| 1810 |
+
},
|
| 1811 |
+
"128226": {
|
| 1812 |
+
"content": "<|reserved_special_token_218|>",
|
| 1813 |
+
"lstrip": false,
|
| 1814 |
+
"normalized": false,
|
| 1815 |
+
"rstrip": false,
|
| 1816 |
+
"single_word": false,
|
| 1817 |
+
"special": true
|
| 1818 |
+
},
|
| 1819 |
+
"128227": {
|
| 1820 |
+
"content": "<|reserved_special_token_219|>",
|
| 1821 |
+
"lstrip": false,
|
| 1822 |
+
"normalized": false,
|
| 1823 |
+
"rstrip": false,
|
| 1824 |
+
"single_word": false,
|
| 1825 |
+
"special": true
|
| 1826 |
+
},
|
| 1827 |
+
"128228": {
|
| 1828 |
+
"content": "<|reserved_special_token_220|>",
|
| 1829 |
+
"lstrip": false,
|
| 1830 |
+
"normalized": false,
|
| 1831 |
+
"rstrip": false,
|
| 1832 |
+
"single_word": false,
|
| 1833 |
+
"special": true
|
| 1834 |
+
},
|
| 1835 |
+
"128229": {
|
| 1836 |
+
"content": "<|reserved_special_token_221|>",
|
| 1837 |
+
"lstrip": false,
|
| 1838 |
+
"normalized": false,
|
| 1839 |
+
"rstrip": false,
|
| 1840 |
+
"single_word": false,
|
| 1841 |
+
"special": true
|
| 1842 |
+
},
|
| 1843 |
+
"128230": {
|
| 1844 |
+
"content": "<|reserved_special_token_222|>",
|
| 1845 |
+
"lstrip": false,
|
| 1846 |
+
"normalized": false,
|
| 1847 |
+
"rstrip": false,
|
| 1848 |
+
"single_word": false,
|
| 1849 |
+
"special": true
|
| 1850 |
+
},
|
| 1851 |
+
"128231": {
|
| 1852 |
+
"content": "<|reserved_special_token_223|>",
|
| 1853 |
+
"lstrip": false,
|
| 1854 |
+
"normalized": false,
|
| 1855 |
+
"rstrip": false,
|
| 1856 |
+
"single_word": false,
|
| 1857 |
+
"special": true
|
| 1858 |
+
},
|
| 1859 |
+
"128232": {
|
| 1860 |
+
"content": "<|reserved_special_token_224|>",
|
| 1861 |
+
"lstrip": false,
|
| 1862 |
+
"normalized": false,
|
| 1863 |
+
"rstrip": false,
|
| 1864 |
+
"single_word": false,
|
| 1865 |
+
"special": true
|
| 1866 |
+
},
|
| 1867 |
+
"128233": {
|
| 1868 |
+
"content": "<|reserved_special_token_225|>",
|
| 1869 |
+
"lstrip": false,
|
| 1870 |
+
"normalized": false,
|
| 1871 |
+
"rstrip": false,
|
| 1872 |
+
"single_word": false,
|
| 1873 |
+
"special": true
|
| 1874 |
+
},
|
| 1875 |
+
"128234": {
|
| 1876 |
+
"content": "<|reserved_special_token_226|>",
|
| 1877 |
+
"lstrip": false,
|
| 1878 |
+
"normalized": false,
|
| 1879 |
+
"rstrip": false,
|
| 1880 |
+
"single_word": false,
|
| 1881 |
+
"special": true
|
| 1882 |
+
},
|
| 1883 |
+
"128235": {
|
| 1884 |
+
"content": "<|reserved_special_token_227|>",
|
| 1885 |
+
"lstrip": false,
|
| 1886 |
+
"normalized": false,
|
| 1887 |
+
"rstrip": false,
|
| 1888 |
+
"single_word": false,
|
| 1889 |
+
"special": true
|
| 1890 |
+
},
|
| 1891 |
+
"128236": {
|
| 1892 |
+
"content": "<|reserved_special_token_228|>",
|
| 1893 |
+
"lstrip": false,
|
| 1894 |
+
"normalized": false,
|
| 1895 |
+
"rstrip": false,
|
| 1896 |
+
"single_word": false,
|
| 1897 |
+
"special": true
|
| 1898 |
+
},
|
| 1899 |
+
"128237": {
|
| 1900 |
+
"content": "<|reserved_special_token_229|>",
|
| 1901 |
+
"lstrip": false,
|
| 1902 |
+
"normalized": false,
|
| 1903 |
+
"rstrip": false,
|
| 1904 |
+
"single_word": false,
|
| 1905 |
+
"special": true
|
| 1906 |
+
},
|
| 1907 |
+
"128238": {
|
| 1908 |
+
"content": "<|reserved_special_token_230|>",
|
| 1909 |
+
"lstrip": false,
|
| 1910 |
+
"normalized": false,
|
| 1911 |
+
"rstrip": false,
|
| 1912 |
+
"single_word": false,
|
| 1913 |
+
"special": true
|
| 1914 |
+
},
|
| 1915 |
+
"128239": {
|
| 1916 |
+
"content": "<|reserved_special_token_231|>",
|
| 1917 |
+
"lstrip": false,
|
| 1918 |
+
"normalized": false,
|
| 1919 |
+
"rstrip": false,
|
| 1920 |
+
"single_word": false,
|
| 1921 |
+
"special": true
|
| 1922 |
+
},
|
| 1923 |
+
"128240": {
|
| 1924 |
+
"content": "<|reserved_special_token_232|>",
|
| 1925 |
+
"lstrip": false,
|
| 1926 |
+
"normalized": false,
|
| 1927 |
+
"rstrip": false,
|
| 1928 |
+
"single_word": false,
|
| 1929 |
+
"special": true
|
| 1930 |
+
},
|
| 1931 |
+
"128241": {
|
| 1932 |
+
"content": "<|reserved_special_token_233|>",
|
| 1933 |
+
"lstrip": false,
|
| 1934 |
+
"normalized": false,
|
| 1935 |
+
"rstrip": false,
|
| 1936 |
+
"single_word": false,
|
| 1937 |
+
"special": true
|
| 1938 |
+
},
|
| 1939 |
+
"128242": {
|
| 1940 |
+
"content": "<|reserved_special_token_234|>",
|
| 1941 |
+
"lstrip": false,
|
| 1942 |
+
"normalized": false,
|
| 1943 |
+
"rstrip": false,
|
| 1944 |
+
"single_word": false,
|
| 1945 |
+
"special": true
|
| 1946 |
+
},
|
| 1947 |
+
"128243": {
|
| 1948 |
+
"content": "<|reserved_special_token_235|>",
|
| 1949 |
+
"lstrip": false,
|
| 1950 |
+
"normalized": false,
|
| 1951 |
+
"rstrip": false,
|
| 1952 |
+
"single_word": false,
|
| 1953 |
+
"special": true
|
| 1954 |
+
},
|
| 1955 |
+
"128244": {
|
| 1956 |
+
"content": "<|reserved_special_token_236|>",
|
| 1957 |
+
"lstrip": false,
|
| 1958 |
+
"normalized": false,
|
| 1959 |
+
"rstrip": false,
|
| 1960 |
+
"single_word": false,
|
| 1961 |
+
"special": true
|
| 1962 |
+
},
|
| 1963 |
+
"128245": {
|
| 1964 |
+
"content": "<|reserved_special_token_237|>",
|
| 1965 |
+
"lstrip": false,
|
| 1966 |
+
"normalized": false,
|
| 1967 |
+
"rstrip": false,
|
| 1968 |
+
"single_word": false,
|
| 1969 |
+
"special": true
|
| 1970 |
+
},
|
| 1971 |
+
"128246": {
|
| 1972 |
+
"content": "<|reserved_special_token_238|>",
|
| 1973 |
+
"lstrip": false,
|
| 1974 |
+
"normalized": false,
|
| 1975 |
+
"rstrip": false,
|
| 1976 |
+
"single_word": false,
|
| 1977 |
+
"special": true
|
| 1978 |
+
},
|
| 1979 |
+
"128247": {
|
| 1980 |
+
"content": "<|reserved_special_token_239|>",
|
| 1981 |
+
"lstrip": false,
|
| 1982 |
+
"normalized": false,
|
| 1983 |
+
"rstrip": false,
|
| 1984 |
+
"single_word": false,
|
| 1985 |
+
"special": true
|
| 1986 |
+
},
|
| 1987 |
+
"128248": {
|
| 1988 |
+
"content": "<|reserved_special_token_240|>",
|
| 1989 |
+
"lstrip": false,
|
| 1990 |
+
"normalized": false,
|
| 1991 |
+
"rstrip": false,
|
| 1992 |
+
"single_word": false,
|
| 1993 |
+
"special": true
|
| 1994 |
+
},
|
| 1995 |
+
"128249": {
|
| 1996 |
+
"content": "<|reserved_special_token_241|>",
|
| 1997 |
+
"lstrip": false,
|
| 1998 |
+
"normalized": false,
|
| 1999 |
+
"rstrip": false,
|
| 2000 |
+
"single_word": false,
|
| 2001 |
+
"special": true
|
| 2002 |
+
},
|
| 2003 |
+
"128250": {
|
| 2004 |
+
"content": "<|reserved_special_token_242|>",
|
| 2005 |
+
"lstrip": false,
|
| 2006 |
+
"normalized": false,
|
| 2007 |
+
"rstrip": false,
|
| 2008 |
+
"single_word": false,
|
| 2009 |
+
"special": true
|
| 2010 |
+
},
|
| 2011 |
+
"128251": {
|
| 2012 |
+
"content": "<|reserved_special_token_243|>",
|
| 2013 |
+
"lstrip": false,
|
| 2014 |
+
"normalized": false,
|
| 2015 |
+
"rstrip": false,
|
| 2016 |
+
"single_word": false,
|
| 2017 |
+
"special": true
|
| 2018 |
+
},
|
| 2019 |
+
"128252": {
|
| 2020 |
+
"content": "<|reserved_special_token_244|>",
|
| 2021 |
+
"lstrip": false,
|
| 2022 |
+
"normalized": false,
|
| 2023 |
+
"rstrip": false,
|
| 2024 |
+
"single_word": false,
|
| 2025 |
+
"special": true
|
| 2026 |
+
},
|
| 2027 |
+
"128253": {
|
| 2028 |
+
"content": "<|reserved_special_token_245|>",
|
| 2029 |
+
"lstrip": false,
|
| 2030 |
+
"normalized": false,
|
| 2031 |
+
"rstrip": false,
|
| 2032 |
+
"single_word": false,
|
| 2033 |
+
"special": true
|
| 2034 |
+
},
|
| 2035 |
+
"128254": {
|
| 2036 |
+
"content": "<|reserved_special_token_246|>",
|
| 2037 |
+
"lstrip": false,
|
| 2038 |
+
"normalized": false,
|
| 2039 |
+
"rstrip": false,
|
| 2040 |
+
"single_word": false,
|
| 2041 |
+
"special": true
|
| 2042 |
+
},
|
| 2043 |
+
"128255": {
|
| 2044 |
+
"content": "<|reserved_special_token_247|>",
|
| 2045 |
+
"lstrip": false,
|
| 2046 |
+
"normalized": false,
|
| 2047 |
+
"rstrip": false,
|
| 2048 |
+
"single_word": false,
|
| 2049 |
+
"special": true
|
| 2050 |
+
}
|
| 2051 |
+
},
|
| 2052 |
+
"backend": "tokenizers",
|
| 2053 |
+
"bos_token": "<|begin_of_text|>",
|
| 2054 |
+
"clean_up_tokenization_spaces": true,
|
| 2055 |
+
"eos_token": "<|end_of_text|>",
|
| 2056 |
+
"extra_special_tokens": {},
|
| 2057 |
+
"is_local": false,
|
| 2058 |
+
"mask_token": "<|mask|>",
|
| 2059 |
+
"max_length": 2048,
|
| 2060 |
+
"model_input_names": [
|
| 2061 |
+
"input_ids",
|
| 2062 |
+
"attention_mask"
|
| 2063 |
+
],
|
| 2064 |
+
"model_max_length": 2048,
|
| 2065 |
+
"pad_to_multiple_of": null,
|
| 2066 |
+
"pad_token": "<|pad|>",
|
| 2067 |
+
"pad_token_type_id": 0,
|
| 2068 |
+
"padding_side": "right",
|
| 2069 |
+
"stride": 0,
|
| 2070 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 2071 |
+
"truncation": true,
|
| 2072 |
+
"truncation_side": "right",
|
| 2073 |
+
"truncation_strategy": "longest_first"
|
| 2074 |
+
}
|