Instructions to use cyttic/trocr-webfonts8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts8")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts8") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts8" # 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-webfonts8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts8
- SGLang
How to use cyttic/trocr-webfonts8 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-webfonts8" \ --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-webfonts8", "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-webfonts8" \ --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-webfonts8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts8 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts8
trocr-webfonts8
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.3767
- Cer: 0.0199
- Wer: 0.0549
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.5418 | 0.1290 | 2000 | 2.0382 | 0.1861 | 0.3904 |
| 3.3457 | 0.2581 | 4000 | 1.5427 | 0.1291 | 0.2809 |
| 2.7235 | 0.3871 | 6000 | 1.2456 | 0.0979 | 0.2237 |
| 2.3994 | 0.5161 | 8000 | 1.0101 | 0.0729 | 0.1815 |
| 2.1177 | 0.6452 | 10000 | 0.8963 | 0.0641 | 0.1593 |
| 1.7386 | 0.7742 | 12000 | 0.7650 | 0.0527 | 0.1341 |
| 1.4975 | 0.9032 | 14000 | 0.6938 | 0.0469 | 0.1212 |
| 1.1829 | 1.0323 | 16000 | 0.6345 | 0.0409 | 0.1056 |
| 1.1020 | 1.1613 | 18000 | 0.5900 | 0.0362 | 0.0971 |
| 1.0794 | 1.2903 | 20000 | 0.5514 | 0.0330 | 0.0883 |
| 1.0658 | 1.4194 | 22000 | 0.5251 | 0.0305 | 0.0837 |
| 1.0619 | 1.5484 | 24000 | 0.4962 | 0.0289 | 0.0780 |
| 0.9589 | 1.6774 | 26000 | 0.4694 | 0.0282 | 0.0753 |
| 0.9299 | 1.8065 | 28000 | 0.4542 | 0.0254 | 0.0697 |
| 0.8641 | 1.9355 | 30000 | 0.4301 | 0.0239 | 0.0660 |
| 0.7499 | 2.0645 | 32000 | 0.4196 | 0.0242 | 0.0652 |
| 0.6854 | 2.1935 | 34000 | 0.4220 | 0.0239 | 0.0635 |
| 0.7097 | 2.3226 | 36000 | 0.4005 | 0.0215 | 0.0596 |
| 0.6367 | 2.4516 | 38000 | 0.3960 | 0.0221 | 0.0591 |
| 0.6202 | 2.5806 | 40000 | 0.3890 | 0.0214 | 0.0586 |
| 0.5924 | 2.7097 | 42000 | 0.3858 | 0.0204 | 0.0568 |
| 0.6166 | 2.8387 | 44000 | 0.3805 | 0.0203 | 0.0558 |
| 0.6985 | 2.9677 | 46000 | 0.3771 | 0.0199 | 0.0552 |
| 0.6549 | 3.0 | 46500 | 0.3767 | 0.0199 | 0.0549 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 14
Model tree for cyttic/trocr-webfonts8
Base model
cyttic/exp2-frozen-benyehuda-cont