Instructions to use cyttic/trocr-webfonts7-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts7-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts7-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts7-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts7-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts7-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts7-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-webfonts7-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts7-BY
- SGLang
How to use cyttic/trocr-webfonts7-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-webfonts7-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-webfonts7-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-webfonts7-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-webfonts7-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts7-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts7-BY
trocr-webfonts7-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.6263
- Cer: 0.0306
- Wer: 0.0893
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.7534 | 0.1290 | 2000 | 1.7241 | 0.1611 | 0.3585 |
| 3.5331 | 0.2581 | 4000 | 1.5212 | 0.1219 | 0.2896 |
| 3.1212 | 0.3871 | 6000 | 1.3667 | 0.1070 | 0.2499 |
| 2.7271 | 0.5161 | 8000 | 1.2247 | 0.0868 | 0.2161 |
| 2.7307 | 0.6452 | 10000 | 1.1194 | 0.0751 | 0.1951 |
| 2.2206 | 0.7742 | 12000 | 1.0251 | 0.0653 | 0.1742 |
| 1.9676 | 0.9032 | 14000 | 0.9729 | 0.0621 | 0.1667 |
| 1.5177 | 1.0323 | 16000 | 0.9174 | 0.0558 | 0.1518 |
| 1.5807 | 1.1613 | 18000 | 0.8774 | 0.0515 | 0.1410 |
| 1.4671 | 1.2903 | 20000 | 0.8390 | 0.0475 | 0.1327 |
| 1.3973 | 1.4194 | 22000 | 0.8046 | 0.0441 | 0.1256 |
| 1.3597 | 1.5484 | 24000 | 0.7741 | 0.0417 | 0.1201 |
| 1.4321 | 1.6774 | 26000 | 0.7379 | 0.0399 | 0.1132 |
| 1.3703 | 1.8065 | 28000 | 0.7211 | 0.0402 | 0.1135 |
| 1.3685 | 1.9355 | 30000 | 0.6965 | 0.0344 | 0.1034 |
| 1.0642 | 2.0645 | 32000 | 0.6895 | 0.0356 | 0.1017 |
| 1.0203 | 2.1935 | 34000 | 0.6775 | 0.0342 | 0.0991 |
| 1.0603 | 2.3226 | 36000 | 0.6628 | 0.0356 | 0.0999 |
| 1.0253 | 2.4516 | 38000 | 0.6564 | 0.0329 | 0.0942 |
| 0.9865 | 2.5806 | 40000 | 0.6498 | 0.0317 | 0.0935 |
| 0.9959 | 2.7097 | 42000 | 0.6365 | 0.0312 | 0.0911 |
| 1.0015 | 2.8387 | 44000 | 0.6309 | 0.0310 | 0.0907 |
| 0.9730 | 2.9677 | 46000 | 0.6268 | 0.0303 | 0.0891 |
| 1.0308 | 3.0 | 46500 | 0.6263 | 0.0306 | 0.0893 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- -
Model tree for cyttic/trocr-webfonts7-BY
Base model
cyttic/exp2-frozen-benyehuda-cont