Instructions to use cyttic/trocr-bigram4-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-bigram4-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-bigram4-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-bigram4-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-bigram4-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-bigram4-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-bigram4-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-bigram4-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-bigram4-BY
- SGLang
How to use cyttic/trocr-bigram4-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-bigram4-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-bigram4-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-bigram4-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-bigram4-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-bigram4-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-bigram4-BY
trocr-bigram4-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.5704
- Cer: 0.0297
- Wer: 0.0866
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.6881 | 0.1290 | 2000 | 1.6167 | 0.1867 | 0.3828 |
| 3.3020 | 0.2581 | 4000 | 1.3983 | 0.1329 | 0.2981 |
| 3.0724 | 0.3871 | 6000 | 1.2319 | 0.1036 | 0.2453 |
| 2.6093 | 0.5161 | 8000 | 1.1277 | 0.0854 | 0.2149 |
| 2.5148 | 0.6452 | 10000 | 1.0344 | 0.0731 | 0.1916 |
| 2.0941 | 0.7742 | 12000 | 0.9543 | 0.0600 | 0.1664 |
| 1.9738 | 0.9032 | 14000 | 0.8868 | 0.0577 | 0.1567 |
| 1.6005 | 1.0323 | 16000 | 0.8790 | 0.0553 | 0.1456 |
| 1.5485 | 1.1613 | 18000 | 0.8043 | 0.0488 | 0.1361 |
| 1.5126 | 1.2903 | 20000 | 0.7839 | 0.0460 | 0.1272 |
| 1.3922 | 1.4194 | 22000 | 0.7411 | 0.0443 | 0.1216 |
| 1.3501 | 1.5484 | 24000 | 0.7182 | 0.0395 | 0.1095 |
| 1.3266 | 1.6774 | 26000 | 0.6833 | 0.0380 | 0.1082 |
| 1.3512 | 1.8065 | 28000 | 0.6648 | 0.0354 | 0.0988 |
| 1.2295 | 1.9355 | 30000 | 0.6381 | 0.0344 | 0.0969 |
| 1.0388 | 2.0645 | 32000 | 0.6283 | 0.0352 | 0.0992 |
| 1.0065 | 2.1935 | 34000 | 0.6204 | 0.0360 | 0.0995 |
| 1.0404 | 2.3226 | 36000 | 0.6056 | 0.0329 | 0.0934 |
| 0.9850 | 2.4516 | 38000 | 0.5936 | 0.0318 | 0.0915 |
| 0.9691 | 2.5806 | 40000 | 0.5842 | 0.0305 | 0.0874 |
| 1.0368 | 2.7097 | 42000 | 0.5788 | 0.0298 | 0.0868 |
| 0.9213 | 2.8387 | 44000 | 0.5724 | 0.0303 | 0.0868 |
| 1.0162 | 2.9677 | 46000 | 0.5709 | 0.0302 | 0.0872 |
| 0.8843 | 3.0 | 46500 | 0.5704 | 0.0297 | 0.0866 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 26
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-bigram4-BY
Base model
cyttic/exp2-frozen-benyehuda-cont