Instructions to use cyttic/trocr-webfonts3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts3")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts3") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts3" # 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-webfonts3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts3
- SGLang
How to use cyttic/trocr-webfonts3 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-webfonts3" \ --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-webfonts3", "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-webfonts3" \ --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-webfonts3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts3 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts3
trocr-webfonts3
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.3718
- Cer: 0.0182
- Wer: 0.0537
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 |
|---|---|---|---|---|---|
| 1.5045 | 0.1290 | 2000 | 0.8842 | 0.0556 | 0.1419 |
| 1.3939 | 0.2581 | 4000 | 0.8452 | 0.0540 | 0.1387 |
| 1.5002 | 0.3871 | 6000 | 0.8241 | 0.0540 | 0.1336 |
| 1.2130 | 0.5161 | 8000 | 0.7290 | 0.0462 | 0.1200 |
| 1.4138 | 0.6452 | 10000 | 0.6571 | 0.0396 | 0.1065 |
| 1.2930 | 0.7742 | 12000 | 0.6088 | 0.0368 | 0.0977 |
| 1.2314 | 0.9032 | 14000 | 0.5634 | 0.0315 | 0.0897 |
| 0.8441 | 1.0323 | 16000 | 0.5406 | 0.0307 | 0.0851 |
| 0.7995 | 1.1613 | 18000 | 0.5163 | 0.0287 | 0.0798 |
| 0.8013 | 1.2903 | 20000 | 0.4996 | 0.0255 | 0.0728 |
| 0.8316 | 1.4194 | 22000 | 0.4721 | 0.0245 | 0.0691 |
| 0.8481 | 1.5484 | 24000 | 0.4568 | 0.0227 | 0.0651 |
| 0.8133 | 1.6774 | 26000 | 0.4404 | 0.0213 | 0.0639 |
| 0.6629 | 1.8065 | 28000 | 0.4301 | 0.0212 | 0.0622 |
| 0.7387 | 1.9355 | 30000 | 0.4114 | 0.0201 | 0.0594 |
| 0.5435 | 2.0645 | 32000 | 0.4048 | 0.0197 | 0.0578 |
| 0.5423 | 2.1935 | 34000 | 0.3984 | 0.0194 | 0.0573 |
| 0.5713 | 2.3226 | 36000 | 0.3962 | 0.0194 | 0.0568 |
| 0.5054 | 2.4516 | 38000 | 0.3849 | 0.0188 | 0.0554 |
| 0.5323 | 2.5806 | 40000 | 0.3809 | 0.0186 | 0.0544 |
| 0.5108 | 2.7097 | 42000 | 0.3779 | 0.0183 | 0.0548 |
| 0.5406 | 2.8387 | 44000 | 0.3726 | 0.0178 | 0.0532 |
| 0.4736 | 2.9677 | 46000 | 0.3719 | 0.0181 | 0.0533 |
| 0.5228 | 3.0 | 46500 | 0.3718 | 0.0182 | 0.0537 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-webfonts3
Base model
cyttic/exp2-frozen-benyehuda-cont