chore: project init
Browse files- .gitignore +6 -0
- README.md +44 -3
- config.json +193 -0
- decoder_model_merged_quantized.onnx +3 -0
- encoder_model_quantized.onnx +3 -0
- generation_config.json +9 -0
- ort_config.json +33 -0
- preprocessor_config.json +36 -0
- quantize_steps.md +8 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer_config.json +205 -0
.gitignore
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.mise.toml
|
| 2 |
+
.venv/
|
| 3 |
+
.python-version
|
| 4 |
+
*.py
|
| 5 |
+
uv.lock
|
| 6 |
+
pyproject.toml
|
README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-sa-4.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
base_model:
|
| 4 |
+
- vikp/texify
|
| 5 |
+
pipeline_tag: image-to-text
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## texify-quantized-onnx
|
| 9 |
+
|
| 10 |
+
https://huggingface.co/vikp/texify2 with quantized ONNX weights, shoutout to https://huggingface.co/Xenova/texify
|
| 11 |
+
|
| 12 |
+
## Usage (`optimum[onnxruntime]`)
|
| 13 |
+
|
| 14 |
+
If you haven't already, you can install the optimum with the onnxrumtime backend
|
| 15 |
+
|
| 16 |
+
```bash
|
| 17 |
+
pip install "optimum[onnxruntime]"
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
**Example:**
|
| 21 |
+
|
| 22 |
+
```python
|
| 23 |
+
from optimum.onnxruntime import ORTModelForVision2Seq
|
| 24 |
+
from optimum.pipelines import pipeline
|
| 25 |
+
|
| 26 |
+
model = ORTModelForVision2Seq.from_pretrained("Spedon/texify-quantized-onnx")
|
| 27 |
+
texify = pipeline(
|
| 28 |
+
"image-to-text",
|
| 29 |
+
model,
|
| 30 |
+
feature_extractor="Spedon/texify-quantized-onnx",
|
| 31 |
+
image_processor="Spedon/texify-quantized-onnx",
|
| 32 |
+
)
|
| 33 |
+
image = (
|
| 34 |
+
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/latex.png"
|
| 35 |
+
)
|
| 36 |
+
latex = texify(image, max_new_tokens=384)
|
| 37 |
+
print(latex)
|
| 38 |
+
# [{'generated_text': "The potential $V_i$ of cell $\\mathcal{C}_i$ centred at position $\\mathbf{r}_i$ is related to the surface charge densities $\\sigma_j$ of cells $\\mathcal{C}_j$ $j\\in[1,N]$ through the superposition principle as: $$V_i\\,=\\,\\sum_{j=0}^{N}\\,\\frac{\\sigma_j}{4\\pi\\varepsilon_0}\\,\\int_{\\mathcal{C}_j}\\frac{1}{\\|\\mathbf{r}_i-\\mathbf{r}'\\|}\\,\\mathrm{d}^2\\mathbf{r}'\\,=\\,\\sum_{j=0}^{N}\\,Q_{ij}\\,\\sigma_j,$$ where the integral over the surface of cell $\\mathcal{C}_j$ only depends on $\\mathcal{C}_j$ shape and on the relative position of the target point $\\mathbf{r}_i$ with respect to $\\mathcal{C}_j$ location, as $\\sigma_j$ is assumed constant over the whole surface of cell $\\mathcal{C}_j$. "}]
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
| Input image | Visualized output |
|
| 42 |
+
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
| 43 |
+
|  |  |
|
| 44 |
+
|
config.json
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "onnx",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"VisionEncoderDecoderModel"
|
| 5 |
+
],
|
| 6 |
+
"decoder": {
|
| 7 |
+
"_name_or_path": "",
|
| 8 |
+
"activation_dropout": 0.0,
|
| 9 |
+
"activation_function": "gelu",
|
| 10 |
+
"add_cross_attention": true,
|
| 11 |
+
"add_final_layer_norm": true,
|
| 12 |
+
"architectures": null,
|
| 13 |
+
"attention_dropout": 0.0,
|
| 14 |
+
"bad_words_ids": null,
|
| 15 |
+
"begin_suppress_tokens": null,
|
| 16 |
+
"bos_token_id": 0,
|
| 17 |
+
"chunk_size_feed_forward": 0,
|
| 18 |
+
"classifier_dropout": 0.0,
|
| 19 |
+
"cross_attention_hidden_size": null,
|
| 20 |
+
"d_model": 1024,
|
| 21 |
+
"decoder_attention_heads": 16,
|
| 22 |
+
"decoder_ffn_dim": 4096,
|
| 23 |
+
"decoder_layerdrop": 0.0,
|
| 24 |
+
"decoder_layers": 8,
|
| 25 |
+
"decoder_start_token_id": null,
|
| 26 |
+
"diversity_penalty": 0.0,
|
| 27 |
+
"do_sample": false,
|
| 28 |
+
"dropout": 0.1,
|
| 29 |
+
"early_stopping": false,
|
| 30 |
+
"encoder_attention_heads": 16,
|
| 31 |
+
"encoder_ffn_dim": 4096,
|
| 32 |
+
"encoder_layerdrop": 0.0,
|
| 33 |
+
"encoder_layers": 12,
|
| 34 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 35 |
+
"eos_token_id": 2,
|
| 36 |
+
"exponential_decay_length_penalty": null,
|
| 37 |
+
"finetuning_task": null,
|
| 38 |
+
"forced_bos_token_id": null,
|
| 39 |
+
"forced_eos_token_id": 2,
|
| 40 |
+
"id2label": {
|
| 41 |
+
"0": "LABEL_0",
|
| 42 |
+
"1": "LABEL_1"
|
| 43 |
+
},
|
| 44 |
+
"init_std": 0.02,
|
| 45 |
+
"is_decoder": true,
|
| 46 |
+
"is_encoder_decoder": false,
|
| 47 |
+
"label2id": {
|
| 48 |
+
"LABEL_0": 0,
|
| 49 |
+
"LABEL_1": 1
|
| 50 |
+
},
|
| 51 |
+
"length_penalty": 1.0,
|
| 52 |
+
"max_length": 20,
|
| 53 |
+
"max_position_embeddings": 1536,
|
| 54 |
+
"min_length": 0,
|
| 55 |
+
"model_type": "mbart",
|
| 56 |
+
"no_repeat_ngram_size": 0,
|
| 57 |
+
"num_beam_groups": 1,
|
| 58 |
+
"num_beams": 1,
|
| 59 |
+
"num_hidden_layers": 12,
|
| 60 |
+
"num_return_sequences": 1,
|
| 61 |
+
"output_attentions": false,
|
| 62 |
+
"output_hidden_states": false,
|
| 63 |
+
"output_scores": false,
|
| 64 |
+
"pad_token_id": 1,
|
| 65 |
+
"prefix": null,
|
| 66 |
+
"problem_type": null,
|
| 67 |
+
"pruned_heads": {},
|
| 68 |
+
"remove_invalid_values": false,
|
| 69 |
+
"repetition_penalty": 1.0,
|
| 70 |
+
"return_dict": true,
|
| 71 |
+
"return_dict_in_generate": false,
|
| 72 |
+
"scale_embedding": true,
|
| 73 |
+
"sep_token_id": null,
|
| 74 |
+
"suppress_tokens": null,
|
| 75 |
+
"task_specific_params": null,
|
| 76 |
+
"temperature": 1.0,
|
| 77 |
+
"tf_legacy_loss": false,
|
| 78 |
+
"tie_encoder_decoder": false,
|
| 79 |
+
"tie_word_embeddings": false,
|
| 80 |
+
"tokenizer_class": null,
|
| 81 |
+
"top_k": 50,
|
| 82 |
+
"top_p": 1.0,
|
| 83 |
+
"torch_dtype": null,
|
| 84 |
+
"torchscript": false,
|
| 85 |
+
"typical_p": 1.0,
|
| 86 |
+
"use_bfloat16": false,
|
| 87 |
+
"use_cache": true,
|
| 88 |
+
"vocab_size": 50000
|
| 89 |
+
},
|
| 90 |
+
"decoder_start_token_id": 0,
|
| 91 |
+
"encoder": {
|
| 92 |
+
"_name_or_path": "",
|
| 93 |
+
"add_cross_attention": false,
|
| 94 |
+
"architectures": null,
|
| 95 |
+
"attention_probs_dropout_prob": 0.0,
|
| 96 |
+
"bad_words_ids": null,
|
| 97 |
+
"begin_suppress_tokens": null,
|
| 98 |
+
"bos_token_id": null,
|
| 99 |
+
"chunk_size_feed_forward": 0,
|
| 100 |
+
"cross_attention_hidden_size": null,
|
| 101 |
+
"decoder_start_token_id": null,
|
| 102 |
+
"depths": [
|
| 103 |
+
2,
|
| 104 |
+
2,
|
| 105 |
+
14,
|
| 106 |
+
2
|
| 107 |
+
],
|
| 108 |
+
"diversity_penalty": 0.0,
|
| 109 |
+
"do_sample": false,
|
| 110 |
+
"drop_path_rate": 0.1,
|
| 111 |
+
"early_stopping": false,
|
| 112 |
+
"embed_dim": 128,
|
| 113 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 114 |
+
"eos_token_id": null,
|
| 115 |
+
"exponential_decay_length_penalty": null,
|
| 116 |
+
"finetuning_task": null,
|
| 117 |
+
"forced_bos_token_id": null,
|
| 118 |
+
"forced_eos_token_id": null,
|
| 119 |
+
"hidden_act": "gelu",
|
| 120 |
+
"hidden_dropout_prob": 0.0,
|
| 121 |
+
"hidden_size": 1024,
|
| 122 |
+
"id2label": {
|
| 123 |
+
"0": "LABEL_0",
|
| 124 |
+
"1": "LABEL_1"
|
| 125 |
+
},
|
| 126 |
+
"image_size": [
|
| 127 |
+
420,
|
| 128 |
+
420
|
| 129 |
+
],
|
| 130 |
+
"initializer_range": 0.02,
|
| 131 |
+
"is_decoder": false,
|
| 132 |
+
"is_encoder_decoder": false,
|
| 133 |
+
"label2id": {
|
| 134 |
+
"LABEL_0": 0,
|
| 135 |
+
"LABEL_1": 1
|
| 136 |
+
},
|
| 137 |
+
"layer_norm_eps": 1e-05,
|
| 138 |
+
"length_penalty": 1.0,
|
| 139 |
+
"max_length": 20,
|
| 140 |
+
"min_length": 0,
|
| 141 |
+
"mlp_ratio": 4.0,
|
| 142 |
+
"model_type": "donut-swin",
|
| 143 |
+
"no_repeat_ngram_size": 0,
|
| 144 |
+
"num_beam_groups": 1,
|
| 145 |
+
"num_beams": 1,
|
| 146 |
+
"num_channels": 3,
|
| 147 |
+
"num_heads": [
|
| 148 |
+
4,
|
| 149 |
+
8,
|
| 150 |
+
16,
|
| 151 |
+
32
|
| 152 |
+
],
|
| 153 |
+
"num_layers": 4,
|
| 154 |
+
"num_return_sequences": 1,
|
| 155 |
+
"output_attentions": false,
|
| 156 |
+
"output_hidden_states": false,
|
| 157 |
+
"output_scores": false,
|
| 158 |
+
"pad_token_id": null,
|
| 159 |
+
"patch_size": 4,
|
| 160 |
+
"path_norm": true,
|
| 161 |
+
"prefix": null,
|
| 162 |
+
"problem_type": null,
|
| 163 |
+
"pruned_heads": {},
|
| 164 |
+
"qkv_bias": true,
|
| 165 |
+
"remove_invalid_values": false,
|
| 166 |
+
"repetition_penalty": 1.0,
|
| 167 |
+
"return_dict": true,
|
| 168 |
+
"return_dict_in_generate": false,
|
| 169 |
+
"sep_token_id": null,
|
| 170 |
+
"suppress_tokens": null,
|
| 171 |
+
"task_specific_params": null,
|
| 172 |
+
"temperature": 1.0,
|
| 173 |
+
"tf_legacy_loss": false,
|
| 174 |
+
"tie_encoder_decoder": false,
|
| 175 |
+
"tie_word_embeddings": true,
|
| 176 |
+
"tokenizer_class": null,
|
| 177 |
+
"top_k": 50,
|
| 178 |
+
"top_p": 1.0,
|
| 179 |
+
"torch_dtype": null,
|
| 180 |
+
"torchscript": false,
|
| 181 |
+
"typical_p": 1.0,
|
| 182 |
+
"use_2d_embeddings": false,
|
| 183 |
+
"use_absolute_embeddings": false,
|
| 184 |
+
"use_bfloat16": false,
|
| 185 |
+
"window_size": 5
|
| 186 |
+
},
|
| 187 |
+
"is_encoder_decoder": true,
|
| 188 |
+
"model_type": "vision-encoder-decoder",
|
| 189 |
+
"pad_token_id": 1,
|
| 190 |
+
"tie_word_embeddings": false,
|
| 191 |
+
"transformers_version": "4.44.2",
|
| 192 |
+
"use_cache": true
|
| 193 |
+
}
|
decoder_model_merged_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:494be801ecc8c76b36dbd1bc4b0eb1ec5206c7e34156ea73348a5fa16d728b91
|
| 3 |
+
size 240010429
|
encoder_model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aea48c6a6a9d5949b1b7e5fd2c2137149bc1687f026d44469ee3178c90d4d11a
|
| 3 |
+
size 79003122
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"decoder_start_token_id": 0,
|
| 5 |
+
"eos_token_id": 2,
|
| 6 |
+
"forced_eos_token_id": 2,
|
| 7 |
+
"pad_token_id": 1,
|
| 8 |
+
"transformers_version": "4.36.2"
|
| 9 |
+
}
|
ort_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"one_external_file": true,
|
| 3 |
+
"opset": null,
|
| 4 |
+
"optimization": {},
|
| 5 |
+
"quantization": {
|
| 6 |
+
"activations_dtype": "QUInt8",
|
| 7 |
+
"activations_symmetric": false,
|
| 8 |
+
"format": "QOperator",
|
| 9 |
+
"is_static": false,
|
| 10 |
+
"mode": "IntegerOps",
|
| 11 |
+
"nodes_to_exclude": [],
|
| 12 |
+
"nodes_to_quantize": [],
|
| 13 |
+
"operators_to_quantize": [
|
| 14 |
+
"Conv",
|
| 15 |
+
"MatMul",
|
| 16 |
+
"Attention",
|
| 17 |
+
"LSTM",
|
| 18 |
+
"Gather",
|
| 19 |
+
"Transpose",
|
| 20 |
+
"EmbedLayerNormalization"
|
| 21 |
+
],
|
| 22 |
+
"per_channel": false,
|
| 23 |
+
"qdq_add_pair_to_weight": false,
|
| 24 |
+
"qdq_dedicated_pair": false,
|
| 25 |
+
"qdq_op_type_per_channel_support_to_axis": {
|
| 26 |
+
"MatMul": 1
|
| 27 |
+
},
|
| 28 |
+
"reduce_range": false,
|
| 29 |
+
"weights_dtype": "QUInt8",
|
| 30 |
+
"weights_symmetric": true
|
| 31 |
+
},
|
| 32 |
+
"use_external_data_format": false
|
| 33 |
+
}
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_align_long_axis": false,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_pad": true,
|
| 5 |
+
"do_rescale": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"do_thumbnail": true,
|
| 8 |
+
"feature_extractor_type": "DonutFeatureExtractor",
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.485,
|
| 11 |
+
0.456,
|
| 12 |
+
0.406
|
| 13 |
+
],
|
| 14 |
+
"image_processor_type": "DonutImageProcessor",
|
| 15 |
+
"image_std": [
|
| 16 |
+
0.229,
|
| 17 |
+
0.224,
|
| 18 |
+
0.225
|
| 19 |
+
],
|
| 20 |
+
"max_size": {
|
| 21 |
+
"height": 420,
|
| 22 |
+
"width": 420
|
| 23 |
+
},
|
| 24 |
+
"patch_size": [
|
| 25 |
+
4,
|
| 26 |
+
4
|
| 27 |
+
],
|
| 28 |
+
"processor_class": "DonutProcessor",
|
| 29 |
+
"resample": 2,
|
| 30 |
+
"rescale_factor": 0.00392156862745098,
|
| 31 |
+
"size": {
|
| 32 |
+
"height": 420,
|
| 33 |
+
"width": 420
|
| 34 |
+
},
|
| 35 |
+
"train": false
|
| 36 |
+
}
|
quantize_steps.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Quantize steps
|
| 2 |
+
|
| 3 |
+
```bash
|
| 4 |
+
optimum-cli export onnx --model vikp/texify --task image-to-text-with-past onnx/
|
| 5 |
+
optimum-cli onnxruntime quantize --onnx_model onnx/ --avx2 -o quantized_model/
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
> Remember to use the `preprocess_config.json` from https://huggingface.co/Xenova/texify
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<pad>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<unk>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"1": {
|
| 12 |
+
"content": "<pad>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"2": {
|
| 20 |
+
"content": "</s>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"3": {
|
| 28 |
+
"content": "<unk>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"4": {
|
| 36 |
+
"content": "[START_REF]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"5": {
|
| 44 |
+
"content": "[END_REF]",
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
},
|
| 51 |
+
"6": {
|
| 52 |
+
"content": "[IMAGE]",
|
| 53 |
+
"lstrip": false,
|
| 54 |
+
"normalized": false,
|
| 55 |
+
"rstrip": false,
|
| 56 |
+
"single_word": false,
|
| 57 |
+
"special": true
|
| 58 |
+
},
|
| 59 |
+
"7": {
|
| 60 |
+
"content": "<fragments>",
|
| 61 |
+
"lstrip": false,
|
| 62 |
+
"normalized": false,
|
| 63 |
+
"rstrip": false,
|
| 64 |
+
"single_word": false,
|
| 65 |
+
"special": true
|
| 66 |
+
},
|
| 67 |
+
"8": {
|
| 68 |
+
"content": "</fragments>",
|
| 69 |
+
"lstrip": false,
|
| 70 |
+
"normalized": false,
|
| 71 |
+
"rstrip": false,
|
| 72 |
+
"single_word": false,
|
| 73 |
+
"special": true
|
| 74 |
+
},
|
| 75 |
+
"9": {
|
| 76 |
+
"content": "<work>",
|
| 77 |
+
"lstrip": false,
|
| 78 |
+
"normalized": false,
|
| 79 |
+
"rstrip": false,
|
| 80 |
+
"single_word": false,
|
| 81 |
+
"special": true
|
| 82 |
+
},
|
| 83 |
+
"10": {
|
| 84 |
+
"content": "</work>",
|
| 85 |
+
"lstrip": false,
|
| 86 |
+
"normalized": false,
|
| 87 |
+
"rstrip": false,
|
| 88 |
+
"single_word": false,
|
| 89 |
+
"special": true
|
| 90 |
+
},
|
| 91 |
+
"11": {
|
| 92 |
+
"content": "[START_SUP]",
|
| 93 |
+
"lstrip": false,
|
| 94 |
+
"normalized": false,
|
| 95 |
+
"rstrip": false,
|
| 96 |
+
"single_word": false,
|
| 97 |
+
"special": true
|
| 98 |
+
},
|
| 99 |
+
"12": {
|
| 100 |
+
"content": "[END_SUP]",
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"normalized": false,
|
| 103 |
+
"rstrip": false,
|
| 104 |
+
"single_word": false,
|
| 105 |
+
"special": true
|
| 106 |
+
},
|
| 107 |
+
"13": {
|
| 108 |
+
"content": "[START_SUB]",
|
| 109 |
+
"lstrip": false,
|
| 110 |
+
"normalized": false,
|
| 111 |
+
"rstrip": false,
|
| 112 |
+
"single_word": false,
|
| 113 |
+
"special": true
|
| 114 |
+
},
|
| 115 |
+
"14": {
|
| 116 |
+
"content": "[END_SUB]",
|
| 117 |
+
"lstrip": false,
|
| 118 |
+
"normalized": false,
|
| 119 |
+
"rstrip": false,
|
| 120 |
+
"single_word": false,
|
| 121 |
+
"special": true
|
| 122 |
+
},
|
| 123 |
+
"15": {
|
| 124 |
+
"content": "[START_DNA]",
|
| 125 |
+
"lstrip": false,
|
| 126 |
+
"normalized": false,
|
| 127 |
+
"rstrip": false,
|
| 128 |
+
"single_word": false,
|
| 129 |
+
"special": true
|
| 130 |
+
},
|
| 131 |
+
"16": {
|
| 132 |
+
"content": "[END_DNA]",
|
| 133 |
+
"lstrip": false,
|
| 134 |
+
"normalized": false,
|
| 135 |
+
"rstrip": false,
|
| 136 |
+
"single_word": false,
|
| 137 |
+
"special": true
|
| 138 |
+
},
|
| 139 |
+
"17": {
|
| 140 |
+
"content": "[START_AMINO]",
|
| 141 |
+
"lstrip": false,
|
| 142 |
+
"normalized": false,
|
| 143 |
+
"rstrip": false,
|
| 144 |
+
"single_word": false,
|
| 145 |
+
"special": true
|
| 146 |
+
},
|
| 147 |
+
"18": {
|
| 148 |
+
"content": "[END_AMINO]",
|
| 149 |
+
"lstrip": false,
|
| 150 |
+
"normalized": false,
|
| 151 |
+
"rstrip": false,
|
| 152 |
+
"single_word": false,
|
| 153 |
+
"special": true
|
| 154 |
+
},
|
| 155 |
+
"19": {
|
| 156 |
+
"content": "[START_SMILES]",
|
| 157 |
+
"lstrip": false,
|
| 158 |
+
"normalized": false,
|
| 159 |
+
"rstrip": false,
|
| 160 |
+
"single_word": false,
|
| 161 |
+
"special": true
|
| 162 |
+
},
|
| 163 |
+
"20": {
|
| 164 |
+
"content": "[END_SMILES]",
|
| 165 |
+
"lstrip": false,
|
| 166 |
+
"normalized": false,
|
| 167 |
+
"rstrip": false,
|
| 168 |
+
"single_word": false,
|
| 169 |
+
"special": true
|
| 170 |
+
},
|
| 171 |
+
"21": {
|
| 172 |
+
"content": "[START_I_SMILES]",
|
| 173 |
+
"lstrip": false,
|
| 174 |
+
"normalized": false,
|
| 175 |
+
"rstrip": false,
|
| 176 |
+
"single_word": false,
|
| 177 |
+
"special": true
|
| 178 |
+
},
|
| 179 |
+
"22": {
|
| 180 |
+
"content": "[END_I_SMILES]",
|
| 181 |
+
"lstrip": false,
|
| 182 |
+
"normalized": false,
|
| 183 |
+
"rstrip": false,
|
| 184 |
+
"single_word": false,
|
| 185 |
+
"special": true
|
| 186 |
+
}
|
| 187 |
+
},
|
| 188 |
+
"additional_special_tokens": [],
|
| 189 |
+
"bos_token": "<s>",
|
| 190 |
+
"clean_up_tokenization_spaces": false,
|
| 191 |
+
"eos_token": "</s>",
|
| 192 |
+
"max_length": 4096,
|
| 193 |
+
"model_max_length": 768,
|
| 194 |
+
"pad_to_multiple_of": null,
|
| 195 |
+
"pad_token": "<pad>",
|
| 196 |
+
"pad_token_type_id": 0,
|
| 197 |
+
"padding_side": "right",
|
| 198 |
+
"processor_class": "VariableDonutProcessor",
|
| 199 |
+
"stride": 0,
|
| 200 |
+
"tokenizer_class": "NougatTokenizer",
|
| 201 |
+
"truncation_side": "right",
|
| 202 |
+
"truncation_strategy": "longest_first",
|
| 203 |
+
"unk_token": "<unk>",
|
| 204 |
+
"vocab_file": null
|
| 205 |
+
}
|