Instructions to use cyttic/trocr-bigram3-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-bigram3-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-bigram3-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-bigram3-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-bigram3-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-bigram3-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-bigram3-BY" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyttic/trocr-bigram3-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-bigram3-BY
- SGLang
How to use cyttic/trocr-bigram3-BY with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cyttic/trocr-bigram3-BY" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyttic/trocr-bigram3-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cyttic/trocr-bigram3-BY" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyttic/trocr-bigram3-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-bigram3-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-bigram3-BY
trocr-bigram3-BY
This model is a fine-tuned version of cyttic/exp2-frozen-benyehuda-cont on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.6044
- Cer: 0.0309
- Wer: 0.0863
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 4650
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | Cer | Wer |
|---|---|---|---|---|---|
| 3.7658 | 0.1290 | 2000 | 1.8016 | 0.1891 | 0.3993 |
| 3.2900 | 0.2581 | 4000 | 1.5010 | 0.1570 | 0.3127 |
| 2.9782 | 0.3871 | 6000 | 1.2855 | 0.1104 | 0.2601 |
| 2.5798 | 0.5161 | 8000 | 1.1482 | 0.0884 | 0.2197 |
| 2.3924 | 0.6452 | 10000 | 1.0553 | 0.0749 | 0.1930 |
| 2.1348 | 0.7742 | 12000 | 0.9811 | 0.0650 | 0.1712 |
| 2.0629 | 0.9032 | 14000 | 0.9185 | 0.0607 | 0.1621 |
| 1.4931 | 1.0323 | 16000 | 0.8724 | 0.0575 | 0.1522 |
| 1.4476 | 1.1613 | 18000 | 0.8307 | 0.0511 | 0.1401 |
| 1.5337 | 1.2903 | 20000 | 0.7982 | 0.0489 | 0.1341 |
| 1.5248 | 1.4194 | 22000 | 0.7661 | 0.0458 | 0.1227 |
| 1.3135 | 1.5484 | 24000 | 0.7453 | 0.0435 | 0.1200 |
| 1.3986 | 1.6774 | 26000 | 0.7131 | 0.0373 | 0.1033 |
| 1.2933 | 1.8065 | 28000 | 0.6963 | 0.0361 | 0.1043 |
| 1.2810 | 1.9355 | 30000 | 0.6778 | 0.0351 | 0.1008 |
| 1.0981 | 2.0645 | 32000 | 0.6618 | 0.0397 | 0.1070 |
| 0.9568 | 2.1935 | 34000 | 0.6511 | 0.0343 | 0.0959 |
| 0.9738 | 2.3226 | 36000 | 0.6405 | 0.0340 | 0.0942 |
| 0.9876 | 2.4516 | 38000 | 0.6296 | 0.0335 | 0.0922 |
| 0.9684 | 2.5806 | 40000 | 0.6193 | 0.0309 | 0.0872 |
| 0.9997 | 2.7097 | 42000 | 0.6110 | 0.0326 | 0.0896 |
| 1.0058 | 2.8387 | 44000 | 0.6088 | 0.0306 | 0.0859 |
| 0.9481 | 2.9677 | 46000 | 0.6044 | 0.0305 | 0.0857 |
| 0.9133 | 3.0 | 46500 | 0.6044 | 0.0309 | 0.0863 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 31
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-bigram3-BY
Base model
cyttic/exp2-frozen-benyehuda-cont