Instructions to use xiaoyao9184/surya_text_recognition with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xiaoyao9184/surya_text_recognition with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("xiaoyao9184/surya_text_recognition", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse files- config.json +8 -5
- manifest.json +1 -1
- model.safetensors +2 -2
- processor_config.json +2 -2
- training_args.bin +2 -2
config.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"SuryaModel"
|
| 4 |
],
|
| 5 |
"bbox_embed_size": 1024,
|
| 6 |
"bbox_size": 1024,
|
| 7 |
"beacon_token_id": 66567,
|
| 8 |
-
"beacon_token_interval":
|
| 9 |
"blank_bbox_token_id": 1025,
|
| 10 |
"bos_token_id": {
|
| 11 |
"block_without_boxes": 66561,
|
|
@@ -15,6 +16,7 @@
|
|
| 15 |
"table_structure": 66569
|
| 16 |
},
|
| 17 |
"decoder": {
|
|
|
|
| 18 |
"attention_dropout": 0.0,
|
| 19 |
"hidden_act": "silu",
|
| 20 |
"hidden_size": 1280,
|
|
@@ -34,6 +36,7 @@
|
|
| 34 |
"use_sliding_window": false,
|
| 35 |
"vocab_size": 218225
|
| 36 |
},
|
|
|
|
| 37 |
"embedding_dropout_prob": 0.05,
|
| 38 |
"eoi_token_id": 66554,
|
| 39 |
"eos_token_id": 66553,
|
|
@@ -47,7 +50,7 @@
|
|
| 47 |
"model_type": "surya-multimodal-foundation",
|
| 48 |
"multi_output_distance": 0,
|
| 49 |
"num_attention_heads": 16,
|
| 50 |
-
"num_beacon_tokens":
|
| 51 |
"num_hidden_layers": 12,
|
| 52 |
"num_key_value_heads": 4,
|
| 53 |
"num_register_tokens": 4,
|
|
@@ -60,7 +63,7 @@
|
|
| 60 |
66565,
|
| 61 |
66566
|
| 62 |
],
|
| 63 |
-
"sliding_window":
|
| 64 |
"special_ocr_tokens": {
|
| 65 |
"all": [
|
| 66 |
"</S>",
|
|
@@ -2157,10 +2160,10 @@
|
|
| 2157 |
]
|
| 2158 |
}
|
| 2159 |
},
|
| 2160 |
-
"
|
| 2161 |
-
"transformers_version": "4.53.0",
|
| 2162 |
"use_cut_cross_entropy": false,
|
| 2163 |
"vision_encoder": {
|
|
|
|
| 2164 |
"depth": 12,
|
| 2165 |
"fullatt_block_indexes": [
|
| 2166 |
3,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
"architectures": [
|
| 4 |
"SuryaModel"
|
| 5 |
],
|
| 6 |
"bbox_embed_size": 1024,
|
| 7 |
"bbox_size": 1024,
|
| 8 |
"beacon_token_id": 66567,
|
| 9 |
+
"beacon_token_interval": 64,
|
| 10 |
"blank_bbox_token_id": 1025,
|
| 11 |
"bos_token_id": {
|
| 12 |
"block_without_boxes": 66561,
|
|
|
|
| 16 |
"table_structure": 66569
|
| 17 |
},
|
| 18 |
"decoder": {
|
| 19 |
+
"_attn_implementation_autoset": true,
|
| 20 |
"attention_dropout": 0.0,
|
| 21 |
"hidden_act": "silu",
|
| 22 |
"hidden_size": 1280,
|
|
|
|
| 36 |
"use_sliding_window": false,
|
| 37 |
"vocab_size": 218225
|
| 38 |
},
|
| 39 |
+
"dtype": "bfloat16",
|
| 40 |
"embedding_dropout_prob": 0.05,
|
| 41 |
"eoi_token_id": 66554,
|
| 42 |
"eos_token_id": 66553,
|
|
|
|
| 50 |
"model_type": "surya-multimodal-foundation",
|
| 51 |
"multi_output_distance": 0,
|
| 52 |
"num_attention_heads": 16,
|
| 53 |
+
"num_beacon_tokens": 1,
|
| 54 |
"num_hidden_layers": 12,
|
| 55 |
"num_key_value_heads": 4,
|
| 56 |
"num_register_tokens": 4,
|
|
|
|
| 63 |
66565,
|
| 64 |
66566
|
| 65 |
],
|
| 66 |
+
"sliding_window": 256,
|
| 67 |
"special_ocr_tokens": {
|
| 68 |
"all": [
|
| 69 |
"</S>",
|
|
|
|
| 2160 |
]
|
| 2161 |
}
|
| 2162 |
},
|
| 2163 |
+
"transformers_version": "4.56.0",
|
|
|
|
| 2164 |
"use_cut_cross_entropy": false,
|
| 2165 |
"vision_encoder": {
|
| 2166 |
+
"_attn_implementation_autoset": true,
|
| 2167 |
"depth": 12,
|
| 2168 |
"fullatt_block_indexes": [
|
| 2169 |
3,
|
manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"files": [".gitattributes", "README.md", "specials_dict.json", "special_tokens_map.json", "vocab_math.json", "specials.json", "tokenizer_config.json", "preprocessor_config.json", "config.json", "processor_config.json", "model.safetensors"]}
|
|
|
|
| 1 |
+
{"files": [".gitattributes", "README.md", "specials_dict.json", "training_args.bin", "special_tokens_map.json", "vocab_math.json", "specials.json", "tokenizer_config.json", "preprocessor_config.json", "config.json", "processor_config.json", "model.safetensors"]}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd07d624d42dc1b2f6bd871777c088052635294e1637805304300bc4ec8fb3ed
|
| 3 |
+
size 1438882494
|
processor_config.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
| 2 |
"add_reasoning_tokens": false,
|
| 3 |
"apply_augments": true,
|
| 4 |
"bbox_size": 1024,
|
| 5 |
-
"beacon_token_interval":
|
| 6 |
"blank_bbox_token_id": 1025,
|
| 7 |
"merge_size": 2,
|
| 8 |
-
"num_beacon_tokens":
|
| 9 |
"num_register_tokens": 4,
|
| 10 |
"patch_size": 14,
|
| 11 |
"processor_class": "MultimodalFoundationProcessor",
|
|
|
|
| 2 |
"add_reasoning_tokens": false,
|
| 3 |
"apply_augments": true,
|
| 4 |
"bbox_size": 1024,
|
| 5 |
+
"beacon_token_interval": 64,
|
| 6 |
"blank_bbox_token_id": 1025,
|
| 7 |
"merge_size": 2,
|
| 8 |
+
"num_beacon_tokens": 1,
|
| 9 |
"num_register_tokens": 4,
|
| 10 |
"patch_size": 14,
|
| 11 |
"processor_class": "MultimodalFoundationProcessor",
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e72b841abbff68eaf26ecde03b48678ef52085b5d75542d3818391f8cac43be0
|
| 3 |
+
size 7633
|