Instructions to use cyttic/trocr-webfonts6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts6")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts6") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts6", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts6" # 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-webfonts6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts6
- SGLang
How to use cyttic/trocr-webfonts6 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-webfonts6" \ --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-webfonts6", "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-webfonts6" \ --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-webfonts6", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts6 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts6
trocr-webfonts6
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.3983
- Cer: 0.0197
- Wer: 0.0572
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 |
|---|---|---|---|---|---|
| 4.6815 | 0.1290 | 2000 | 2.1174 | 0.1836 | 0.3873 |
| 3.4175 | 0.2581 | 4000 | 1.7064 | 0.1315 | 0.2909 |
| 2.7140 | 0.3871 | 6000 | 1.2292 | 0.0897 | 0.2149 |
| 2.2142 | 0.5161 | 8000 | 1.0399 | 0.0730 | 0.1794 |
| 2.1442 | 0.6452 | 10000 | 0.8763 | 0.0580 | 0.1499 |
| 1.7845 | 0.7742 | 12000 | 0.7915 | 0.0526 | 0.1354 |
| 1.6006 | 0.9032 | 14000 | 0.6969 | 0.0442 | 0.1176 |
| 1.2036 | 1.0323 | 16000 | 0.6623 | 0.0409 | 0.1092 |
| 1.1811 | 1.1613 | 18000 | 0.6179 | 0.0361 | 0.0978 |
| 1.0547 | 1.2903 | 20000 | 0.5854 | 0.0324 | 0.0895 |
| 1.0422 | 1.4194 | 22000 | 0.5618 | 0.0312 | 0.0865 |
| 1.0030 | 1.5484 | 24000 | 0.5234 | 0.0297 | 0.0801 |
| 1.0113 | 1.6774 | 26000 | 0.5004 | 0.0265 | 0.0744 |
| 0.9018 | 1.8065 | 28000 | 0.4927 | 0.0270 | 0.0750 |
| 0.9418 | 1.9355 | 30000 | 0.4627 | 0.0255 | 0.0721 |
| 0.7479 | 2.0645 | 32000 | 0.4462 | 0.0233 | 0.0669 |
| 0.7626 | 2.1935 | 34000 | 0.4357 | 0.0228 | 0.0641 |
| 0.6947 | 2.3226 | 36000 | 0.4286 | 0.0219 | 0.0631 |
| 0.6799 | 2.4516 | 38000 | 0.4226 | 0.0206 | 0.0609 |
| 0.6618 | 2.5806 | 40000 | 0.4108 | 0.0203 | 0.0589 |
| 0.6156 | 2.7097 | 42000 | 0.4066 | 0.0203 | 0.0581 |
| 0.6029 | 2.8387 | 44000 | 0.4019 | 0.0198 | 0.0579 |
| 0.7113 | 2.9677 | 46000 | 0.3983 | 0.0197 | 0.0567 |
| 0.6307 | 3.0 | 46500 | 0.3983 | 0.0197 | 0.0572 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 9
Model tree for cyttic/trocr-webfonts6
Base model
cyttic/exp2-frozen-benyehuda-cont