Instructions to use cyttic/trocr-webfonts1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts1")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts1") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts1" # 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-webfonts1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts1
- SGLang
How to use cyttic/trocr-webfonts1 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-webfonts1" \ --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-webfonts1", "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-webfonts1" \ --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-webfonts1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts1 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts1
trocr-webfonts1
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.3790
- Cer: 0.0197
- Wer: 0.0546
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.1696 | 0.1290 | 2000 | 1.8872 | 0.1589 | 0.3445 |
| 3.2520 | 0.2581 | 4000 | 1.4261 | 0.1131 | 0.2588 |
| 2.5677 | 0.3871 | 6000 | 1.1730 | 0.0861 | 0.2059 |
| 2.0205 | 0.5161 | 8000 | 0.9490 | 0.0676 | 0.1656 |
| 1.9034 | 0.6452 | 10000 | 0.7919 | 0.0535 | 0.1375 |
| 1.5976 | 0.7742 | 12000 | 0.7150 | 0.0460 | 0.1189 |
| 1.4536 | 0.9032 | 14000 | 0.6453 | 0.0404 | 0.1084 |
| 1.0845 | 1.0323 | 16000 | 0.6030 | 0.0359 | 0.0970 |
| 1.0637 | 1.1613 | 18000 | 0.5840 | 0.0325 | 0.0889 |
| 1.0575 | 1.2903 | 20000 | 0.5375 | 0.0299 | 0.0842 |
| 0.9316 | 1.4194 | 22000 | 0.5113 | 0.0286 | 0.0784 |
| 1.0052 | 1.5484 | 24000 | 0.4822 | 0.0261 | 0.0725 |
| 0.8716 | 1.6774 | 26000 | 0.4683 | 0.0253 | 0.0704 |
| 0.8211 | 1.8065 | 28000 | 0.4458 | 0.0228 | 0.0652 |
| 0.8556 | 1.9355 | 30000 | 0.4286 | 0.0225 | 0.0636 |
| 0.5949 | 2.0645 | 32000 | 0.4220 | 0.0223 | 0.0624 |
| 0.6787 | 2.1935 | 34000 | 0.4191 | 0.0222 | 0.0610 |
| 0.6093 | 2.3226 | 36000 | 0.4032 | 0.0204 | 0.0582 |
| 0.5698 | 2.4516 | 38000 | 0.3995 | 0.0205 | 0.0568 |
| 0.5285 | 2.5806 | 40000 | 0.3920 | 0.0197 | 0.0562 |
| 0.5794 | 2.7097 | 42000 | 0.3871 | 0.0193 | 0.0554 |
| 0.6407 | 2.8387 | 44000 | 0.3824 | 0.0190 | 0.0546 |
| 0.5717 | 2.9677 | 46000 | 0.3791 | 0.0195 | 0.0547 |
| 0.6389 | 3.0 | 46500 | 0.3790 | 0.0197 | 0.0546 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 26
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-webfonts1
Base model
cyttic/exp2-frozen-benyehuda-cont