Instructions to use cyttic/trocr-fonts3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-fonts3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-fonts3")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-fonts3") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-fonts3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-fonts3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-fonts3" # 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-fonts3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-fonts3
- SGLang
How to use cyttic/trocr-fonts3 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-fonts3" \ --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-fonts3", "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-fonts3" \ --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-fonts3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-fonts3 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-fonts3
trocr-fonts3
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.4888
- Cer: 0.0260
- Wer: 0.0731
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: 0.1
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss | Cer | Wer |
|---|---|---|---|---|---|
| 4.2079 | 0.1290 | 2000 | 1.8901 | 0.1587 | 0.3491 |
| 3.1211 | 0.2581 | 4000 | 1.3806 | 0.1069 | 0.2530 |
| 2.5717 | 0.3871 | 6000 | 1.1126 | 0.0804 | 0.1958 |
| 1.9987 | 0.5161 | 8000 | 0.9302 | 0.0644 | 0.1624 |
| 1.9607 | 0.6452 | 10000 | 0.8190 | 0.0544 | 0.1395 |
| 1.6228 | 0.7742 | 12000 | 0.7481 | 0.0479 | 0.1224 |
| 1.5232 | 0.9032 | 14000 | 0.6640 | 0.0420 | 0.1096 |
| 1.1573 | 1.0323 | 16000 | 0.6285 | 0.0370 | 0.1002 |
| 1.1033 | 1.1613 | 18000 | 0.5979 | 0.0345 | 0.0941 |
| 1.1128 | 1.2903 | 20000 | 0.5697 | 0.0326 | 0.0877 |
| 0.9862 | 1.4194 | 22000 | 0.5491 | 0.0322 | 0.0851 |
| 1.0677 | 1.5484 | 24000 | 0.5245 | 0.0290 | 0.0801 |
| 0.9346 | 1.6774 | 26000 | 0.5097 | 0.0283 | 0.0780 |
| 0.8903 | 1.8065 | 28000 | 0.4955 | 0.0266 | 0.0745 |
| 0.9468 | 1.9355 | 30000 | 0.4895 | 0.0259 | 0.0728 |
| 0.8403 | 2.0 | 31000 | 0.4888 | 0.0260 | 0.0731 |
Framework versions
- Transformers 5.9.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 29
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-fonts3
Base model
cyttic/exp2-frozen-benyehuda-cont