Instructions to use cyttic/trocr-webfonts4-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts4-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts4-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts4-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts4-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts4-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts4-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-webfonts4-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts4-BY
- SGLang
How to use cyttic/trocr-webfonts4-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-webfonts4-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-webfonts4-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-webfonts4-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-webfonts4-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts4-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts4-BY
trocr-webfonts4-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.5854
- Cer: 0.0284
- Wer: 0.0829
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.2268 | 0.1290 | 2000 | 1.4787 | 0.1395 | 0.3239 |
| 3.0106 | 0.2581 | 4000 | 1.3015 | 0.1049 | 0.2610 |
| 2.6258 | 0.3871 | 6000 | 1.1959 | 0.0938 | 0.2394 |
| 2.4378 | 0.5161 | 8000 | 1.0956 | 0.0731 | 0.1946 |
| 2.1602 | 0.6452 | 10000 | 0.9933 | 0.0642 | 0.1759 |
| 1.9012 | 0.7742 | 12000 | 0.9283 | 0.0595 | 0.1609 |
| 1.8499 | 0.9032 | 14000 | 0.9130 | 0.0572 | 0.1508 |
| 1.5187 | 1.0323 | 16000 | 0.8378 | 0.0516 | 0.1405 |
| 1.4431 | 1.1613 | 18000 | 0.7966 | 0.0449 | 0.1269 |
| 1.3360 | 1.2903 | 20000 | 0.7691 | 0.0411 | 0.1182 |
| 1.3375 | 1.4194 | 22000 | 0.7463 | 0.0446 | 0.1226 |
| 1.2005 | 1.5484 | 24000 | 0.7179 | 0.0374 | 0.1086 |
| 1.2664 | 1.6774 | 26000 | 0.6934 | 0.0360 | 0.1035 |
| 1.2687 | 1.8065 | 28000 | 0.6733 | 0.0356 | 0.1016 |
| 1.1546 | 1.9355 | 30000 | 0.6490 | 0.0298 | 0.0892 |
| 0.9883 | 2.0645 | 32000 | 0.6442 | 0.0331 | 0.0960 |
| 0.9360 | 2.1935 | 34000 | 0.6263 | 0.0337 | 0.0949 |
| 0.9268 | 2.3226 | 36000 | 0.6246 | 0.0318 | 0.0907 |
| 0.9317 | 2.4516 | 38000 | 0.6095 | 0.0319 | 0.0915 |
| 0.8140 | 2.5806 | 40000 | 0.6034 | 0.0299 | 0.0879 |
| 0.9357 | 2.7097 | 42000 | 0.5956 | 0.0300 | 0.0873 |
| 0.9554 | 2.8387 | 44000 | 0.5893 | 0.0289 | 0.0849 |
| 0.9039 | 2.9677 | 46000 | 0.5858 | 0.0286 | 0.0834 |
| 0.8745 | 3.0 | 46500 | 0.5854 | 0.0284 | 0.0829 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 42
Model tree for cyttic/trocr-webfonts4-BY
Base model
cyttic/exp2-frozen-benyehuda-cont