Instructions to use cyttic/trocr-webfonts2-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts2-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts2-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts2-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts2-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts2-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts2-BY" # 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-webfonts2-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts2-BY
- SGLang
How to use cyttic/trocr-webfonts2-BY 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-webfonts2-BY" \ --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-webfonts2-BY", "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-webfonts2-BY" \ --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-webfonts2-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts2-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts2-BY
trocr-webfonts2-BY
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.5723
- Cer: 0.0294
- Wer: 0.0836
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 |
|---|---|---|---|---|---|
| 3.0631 | 0.1290 | 2000 | 1.4127 | 0.1299 | 0.3080 |
| 2.8920 | 0.2581 | 4000 | 1.2530 | 0.0982 | 0.2456 |
| 2.5535 | 0.3871 | 6000 | 1.1656 | 0.0871 | 0.2267 |
| 2.3271 | 0.5161 | 8000 | 1.0443 | 0.0716 | 0.1873 |
| 2.1106 | 0.6452 | 10000 | 0.9810 | 0.0659 | 0.1784 |
| 1.8713 | 0.7742 | 12000 | 0.9154 | 0.0588 | 0.1587 |
| 1.8217 | 0.9032 | 14000 | 0.8469 | 0.0494 | 0.1396 |
| 1.4790 | 1.0323 | 16000 | 0.8356 | 0.0533 | 0.1423 |
| 1.3976 | 1.1613 | 18000 | 0.7974 | 0.0440 | 0.1248 |
| 1.2925 | 1.2903 | 20000 | 0.7515 | 0.0389 | 0.1130 |
| 1.3205 | 1.4194 | 22000 | 0.7269 | 0.0424 | 0.1169 |
| 1.1579 | 1.5484 | 24000 | 0.7044 | 0.0372 | 0.1076 |
| 1.2259 | 1.6774 | 26000 | 0.6787 | 0.0353 | 0.1033 |
| 1.2159 | 1.8065 | 28000 | 0.6572 | 0.0342 | 0.0974 |
| 1.1118 | 1.9355 | 30000 | 0.6375 | 0.0305 | 0.0901 |
| 0.9330 | 2.0645 | 32000 | 0.6286 | 0.0327 | 0.0940 |
| 0.9115 | 2.1935 | 34000 | 0.6152 | 0.0333 | 0.0942 |
| 0.8939 | 2.3226 | 36000 | 0.6047 | 0.0317 | 0.0905 |
| 0.9021 | 2.4516 | 38000 | 0.5976 | 0.0319 | 0.0885 |
| 0.8063 | 2.5806 | 40000 | 0.5918 | 0.0314 | 0.0878 |
| 0.9361 | 2.7097 | 42000 | 0.5824 | 0.0298 | 0.0852 |
| 0.9354 | 2.8387 | 44000 | 0.5754 | 0.0300 | 0.0850 |
| 0.8924 | 2.9677 | 46000 | 0.5723 | 0.0293 | 0.0834 |
| 0.8559 | 3.0 | 46500 | 0.5723 | 0.0294 | 0.0836 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-webfonts2-BY
Base model
cyttic/exp2-frozen-benyehuda-cont