Instructions to use cyttic/trocr-bigram5-hh106-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-bigram5-hh106-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-bigram5-hh106-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-bigram5-hh106-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-bigram5-hh106-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-bigram5-hh106-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-bigram5-hh106-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-bigram5-hh106-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-bigram5-hh106-BY
- SGLang
How to use cyttic/trocr-bigram5-hh106-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-bigram5-hh106-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-bigram5-hh106-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-bigram5-hh106-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-bigram5-hh106-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-bigram5-hh106-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-bigram5-hh106-BY
trocr-bigram5-hh106-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.6009
- Cer: 0.0290
- Wer: 0.0852
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.8728 | 0.1290 | 2000 | 1.6558 | 0.1905 | 0.3902 |
| 3.0377 | 0.2581 | 4000 | 1.5223 | 0.1354 | 0.3028 |
| 3.0761 | 0.3871 | 6000 | 1.2978 | 0.1035 | 0.2513 |
| 2.5114 | 0.5161 | 8000 | 1.1699 | 0.0824 | 0.2193 |
| 2.2024 | 0.6452 | 10000 | 1.1452 | 0.0852 | 0.2090 |
| 2.3243 | 0.7742 | 12000 | 1.0066 | 0.0652 | 0.1772 |
| 2.1108 | 0.9032 | 14000 | 0.9446 | 0.0561 | 0.1564 |
| 1.6929 | 1.0323 | 16000 | 0.8896 | 0.0574 | 0.1535 |
| 1.4794 | 1.1613 | 18000 | 0.8441 | 0.0528 | 0.1419 |
| 1.4741 | 1.2903 | 20000 | 0.8105 | 0.0470 | 0.1354 |
| 1.4424 | 1.4194 | 22000 | 0.7795 | 0.0434 | 0.1222 |
| 1.3489 | 1.5484 | 24000 | 0.7397 | 0.0388 | 0.1129 |
| 1.4884 | 1.6774 | 26000 | 0.7188 | 0.0349 | 0.1031 |
| 1.2806 | 1.8065 | 28000 | 0.6928 | 0.0353 | 0.1020 |
| 1.2925 | 1.9355 | 30000 | 0.6779 | 0.0347 | 0.1010 |
| 0.9689 | 2.0645 | 32000 | 0.6662 | 0.0344 | 0.0983 |
| 1.0164 | 2.1935 | 34000 | 0.6576 | 0.0350 | 0.0982 |
| 0.9693 | 2.3226 | 36000 | 0.6404 | 0.0319 | 0.0919 |
| 0.9515 | 2.4516 | 38000 | 0.6257 | 0.0311 | 0.0905 |
| 0.8934 | 2.5806 | 40000 | 0.6191 | 0.0306 | 0.0901 |
| 1.0749 | 2.7097 | 42000 | 0.6093 | 0.0297 | 0.0865 |
| 1.0214 | 2.8387 | 44000 | 0.6041 | 0.0282 | 0.0837 |
| 0.9442 | 2.9677 | 46000 | 0.6013 | 0.0288 | 0.0840 |
| 0.9099 | 3.0 | 46500 | 0.6009 | 0.0290 | 0.0852 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 36
Model tree for cyttic/trocr-bigram5-hh106-BY
Base model
cyttic/exp2-frozen-benyehuda-cont