Instructions to use cyttic/trocr-webfonts7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts7")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts7") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts7", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts7 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts7" # 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-webfonts7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts7
- SGLang
How to use cyttic/trocr-webfonts7 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-webfonts7" \ --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-webfonts7", "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-webfonts7" \ --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-webfonts7", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts7 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts7
trocr-webfonts7
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.4115
- Cer: 0.0216
- Wer: 0.0611
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.7064 | 0.1290 | 2000 | 2.0665 | 0.1896 | 0.3897 |
| 3.3785 | 0.2581 | 4000 | 1.5434 | 0.1238 | 0.2775 |
| 2.8098 | 0.3871 | 6000 | 1.2465 | 0.0952 | 0.2219 |
| 2.2637 | 0.5161 | 8000 | 1.0393 | 0.0757 | 0.1826 |
| 1.9196 | 0.6452 | 10000 | 0.9029 | 0.0620 | 0.1566 |
| 1.7888 | 0.7742 | 12000 | 0.7926 | 0.0535 | 0.1397 |
| 1.6169 | 0.9032 | 14000 | 0.7200 | 0.0472 | 0.1237 |
| 1.1397 | 1.0323 | 16000 | 0.6702 | 0.0421 | 0.1122 |
| 1.2002 | 1.1613 | 18000 | 0.6250 | 0.0379 | 0.1019 |
| 1.0542 | 1.2903 | 20000 | 0.5896 | 0.0335 | 0.0926 |
| 1.0593 | 1.4194 | 22000 | 0.5566 | 0.0335 | 0.0889 |
| 0.9922 | 1.5484 | 24000 | 0.5371 | 0.0301 | 0.0835 |
| 0.9736 | 1.6774 | 26000 | 0.5064 | 0.0275 | 0.0768 |
| 0.8985 | 1.8065 | 28000 | 0.4880 | 0.0261 | 0.0739 |
| 0.8425 | 1.9355 | 30000 | 0.4735 | 0.0237 | 0.0699 |
| 0.7057 | 2.0645 | 32000 | 0.4594 | 0.0247 | 0.0708 |
| 0.5903 | 2.1935 | 34000 | 0.4514 | 0.0243 | 0.0690 |
| 0.6260 | 2.3226 | 36000 | 0.4400 | 0.0237 | 0.0667 |
| 0.6934 | 2.4516 | 38000 | 0.4328 | 0.0227 | 0.0640 |
| 0.6949 | 2.5806 | 40000 | 0.4277 | 0.0228 | 0.0645 |
| 0.5842 | 2.7097 | 42000 | 0.4195 | 0.0219 | 0.0636 |
| 0.6444 | 2.8387 | 44000 | 0.4151 | 0.0217 | 0.0613 |
| 0.6509 | 2.9677 | 46000 | 0.4117 | 0.0215 | 0.0612 |
| 0.6815 | 3.0 | 46500 | 0.4115 | 0.0216 | 0.0611 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 17
Model tree for cyttic/trocr-webfonts7
Base model
cyttic/exp2-frozen-benyehuda-cont