Instructions to use cyttic/trocr-bigram2-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-bigram2-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-bigram2-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-bigram2-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-bigram2-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-bigram2-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-bigram2-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-bigram2-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-bigram2-BY
- SGLang
How to use cyttic/trocr-bigram2-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-bigram2-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-bigram2-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-bigram2-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-bigram2-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-bigram2-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-bigram2-BY
trocr-bigram2-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.5801
- Cer: 0.0300
- Wer: 0.0860
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.6979 | 0.1290 | 2000 | 1.5914 | 0.1658 | 0.3630 |
| 3.2238 | 0.2581 | 4000 | 1.4171 | 0.1338 | 0.2922 |
| 2.7787 | 0.3871 | 6000 | 1.2767 | 0.1030 | 0.2509 |
| 2.4498 | 0.5161 | 8000 | 1.1516 | 0.0866 | 0.2204 |
| 2.3069 | 0.6452 | 10000 | 1.0718 | 0.0751 | 0.1970 |
| 2.1897 | 0.7742 | 12000 | 0.9861 | 0.0625 | 0.1723 |
| 2.0271 | 0.9032 | 14000 | 0.9251 | 0.0590 | 0.1590 |
| 1.6597 | 1.0323 | 16000 | 0.8667 | 0.0531 | 0.1460 |
| 1.6426 | 1.1613 | 18000 | 0.8350 | 0.0526 | 0.1415 |
| 1.5105 | 1.2903 | 20000 | 0.7896 | 0.0452 | 0.1306 |
| 1.4093 | 1.4194 | 22000 | 0.7645 | 0.0434 | 0.1275 |
| 1.3882 | 1.5484 | 24000 | 0.7459 | 0.0432 | 0.1236 |
| 1.2272 | 1.6774 | 26000 | 0.7153 | 0.0412 | 0.1202 |
| 1.2902 | 1.8065 | 28000 | 0.6809 | 0.0382 | 0.1091 |
| 1.2436 | 1.9355 | 30000 | 0.6629 | 0.0363 | 0.1068 |
| 1.0390 | 2.0645 | 32000 | 0.6506 | 0.0326 | 0.0971 |
| 0.9677 | 2.1935 | 34000 | 0.6366 | 0.0333 | 0.0984 |
| 0.9556 | 2.3226 | 36000 | 0.6188 | 0.0314 | 0.0937 |
| 0.9923 | 2.4516 | 38000 | 0.6087 | 0.0320 | 0.0915 |
| 0.9561 | 2.5806 | 40000 | 0.5991 | 0.0333 | 0.0946 |
| 1.0060 | 2.7097 | 42000 | 0.5879 | 0.0290 | 0.0865 |
| 0.9450 | 2.8387 | 44000 | 0.5832 | 0.0290 | 0.0848 |
| 0.9546 | 2.9677 | 46000 | 0.5803 | 0.0301 | 0.0864 |
| 0.9141 | 3.0 | 46500 | 0.5801 | 0.0300 | 0.0860 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 34
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-bigram2-BY
Base model
cyttic/exp2-frozen-benyehuda-cont