Image-to-Text
Transformers
Safetensors
Tibetan
vision-encoder-decoder
image-text-to-text
ocr
tibetan
document-ai
trocr
Instructions to use TibetanCodexAITeam/PechaBridgeOCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TibetanCodexAITeam/PechaBridgeOCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="TibetanCodexAITeam/PechaBridgeOCR")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("TibetanCodexAITeam/PechaBridgeOCR") model = AutoModelForMultimodalLM.from_pretrained("TibetanCodexAITeam/PechaBridgeOCR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "VisionEncoderDecoderModel" | |
| ], | |
| "decoder": { | |
| "_name_or_path": "", | |
| "activation_dropout": 0.0, | |
| "activation_function": "relu", | |
| "add_cross_attention": true, | |
| "architectures": null, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "chunk_size_feed_forward": 0, | |
| "classifier_dropout": 0.0, | |
| "cross_attention_hidden_size": 768, | |
| "d_model": 1024, | |
| "decoder_attention_heads": 16, | |
| "decoder_ffn_dim": 4096, | |
| "decoder_layerdrop": 0.0, | |
| "decoder_layers": 12, | |
| "decoder_start_token_id": 2, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "finetuning_task": null, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "init_std": 0.02, | |
| "is_decoder": true, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layernorm_embedding": false, | |
| "max_position_embeddings": 1024, | |
| "model_type": "trocr", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": 1, | |
| "prefix": null, | |
| "problem_type": null, | |
| "pruned_heads": {}, | |
| "return_dict": true, | |
| "scale_embedding": true, | |
| "sep_token_id": null, | |
| "task_specific_params": null, | |
| "tie_encoder_decoder": false, | |
| "tie_word_embeddings": false, | |
| "tokenizer_class": null, | |
| "torchscript": false, | |
| "use_bfloat16": false, | |
| "use_cache": false, | |
| "use_learned_position_embeddings": false, | |
| "vocab_size": 20007 | |
| }, | |
| "decoder_start_token_id": 20004, | |
| "dtype": "float32", | |
| "encoder": { | |
| "_name_or_path": "", | |
| "add_cross_attention": false, | |
| "architectures": null, | |
| "attention_probs_dropout_prob": 0.0, | |
| "bos_token_id": null, | |
| "chunk_size_feed_forward": 0, | |
| "cross_attention_hidden_size": null, | |
| "decoder_start_token_id": null, | |
| "dtype": "float32", | |
| "encoder_stride": 16, | |
| "eos_token_id": null, | |
| "finetuning_task": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "image_size": [ | |
| 256, | |
| 1024 | |
| ], | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "is_decoder": false, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "model_type": "vit", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": null, | |
| "patch_size": 16, | |
| "pooler_act": "tanh", | |
| "pooler_output_size": 768, | |
| "prefix": null, | |
| "problem_type": null, | |
| "pruned_heads": {}, | |
| "qkv_bias": false, | |
| "return_dict": true, | |
| "sep_token_id": null, | |
| "task_specific_params": null, | |
| "tie_encoder_decoder": false, | |
| "tie_word_embeddings": true, | |
| "tokenizer_class": null, | |
| "torchscript": false, | |
| "use_bfloat16": false | |
| }, | |
| "eos_token_id": 20005, | |
| "is_encoder_decoder": true, | |
| "model_type": "vision-encoder-decoder", | |
| "pad_token_id": 3, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.6.2", | |
| "use_cache": false, | |
| "vocab_size": 20007 | |
| } | |