Instructions to use cyttic/trocr-bigram6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-bigram6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-bigram6")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-bigram6") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-bigram6", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-bigram6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-bigram6" # 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-bigram6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-bigram6
- SGLang
How to use cyttic/trocr-bigram6 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-bigram6" \ --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-bigram6", "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-bigram6" \ --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-bigram6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-bigram6 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-bigram6
trocr-bigram6
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.4464
- Cer: 0.0247
- Wer: 0.0676
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 |
|---|---|---|---|---|---|
| 5.3019 | 0.1290 | 2000 | 2.3519 | 0.2345 | 0.4579 |
| 3.9805 | 0.2581 | 4000 | 1.7519 | 0.1602 | 0.3280 |
| 2.9960 | 0.3871 | 6000 | 1.3825 | 0.1162 | 0.2584 |
| 2.3755 | 0.5161 | 8000 | 1.1416 | 0.0890 | 0.2057 |
| 2.1391 | 0.6452 | 10000 | 1.0513 | 0.0765 | 0.1769 |
| 1.9699 | 0.7742 | 12000 | 0.8668 | 0.0592 | 0.1504 |
| 1.8506 | 0.9032 | 14000 | 0.7908 | 0.0535 | 0.1356 |
| 1.2421 | 1.0323 | 16000 | 0.7315 | 0.0470 | 0.1221 |
| 1.2665 | 1.1613 | 18000 | 0.6848 | 0.0439 | 0.1131 |
| 1.1811 | 1.2903 | 20000 | 0.6578 | 0.0412 | 0.1070 |
| 1.1397 | 1.4194 | 22000 | 0.6194 | 0.0375 | 0.1012 |
| 1.1381 | 1.5484 | 24000 | 0.5918 | 0.0347 | 0.0929 |
| 1.0301 | 1.6774 | 26000 | 0.5624 | 0.0321 | 0.0868 |
| 1.0940 | 1.8065 | 28000 | 0.5368 | 0.0299 | 0.0824 |
| 0.9872 | 1.9355 | 30000 | 0.5151 | 0.0287 | 0.0796 |
| 0.6936 | 2.0645 | 32000 | 0.5026 | 0.0287 | 0.0780 |
| 0.7706 | 2.1935 | 34000 | 0.4897 | 0.0275 | 0.0758 |
| 0.7341 | 2.3226 | 36000 | 0.4800 | 0.0281 | 0.0738 |
| 0.7068 | 2.4516 | 38000 | 0.4682 | 0.0267 | 0.0718 |
| 0.7357 | 2.5806 | 40000 | 0.4607 | 0.0259 | 0.0698 |
| 0.6858 | 2.7097 | 42000 | 0.4544 | 0.0258 | 0.0697 |
| 0.7552 | 2.8387 | 44000 | 0.4483 | 0.0245 | 0.0675 |
| 0.7638 | 2.9677 | 46000 | 0.4461 | 0.0249 | 0.0681 |
| 0.7467 | 3.0 | 46500 | 0.4464 | 0.0247 | 0.0676 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 35
Model tree for cyttic/trocr-bigram6
Base model
cyttic/exp2-frozen-benyehuda-cont