Instructions to use cyttic/trocr-fonts1-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-fonts1-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-fonts1-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-fonts1-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-fonts1-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-fonts1-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-fonts1-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-fonts1-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-fonts1-BY
- SGLang
How to use cyttic/trocr-fonts1-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-fonts1-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-fonts1-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-fonts1-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-fonts1-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-fonts1-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-fonts1-BY
trocr-fonts1-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.5527
- Cer: 0.0266
- Wer: 0.0774
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 |
|---|---|---|---|---|---|
| 2.7598 | 0.1290 | 2000 | 1.2678 | 0.1058 | 0.2649 |
| 2.7490 | 0.2581 | 4000 | 1.2102 | 0.0937 | 0.2383 |
| 2.4431 | 0.3871 | 6000 | 1.1170 | 0.0796 | 0.2118 |
| 2.2277 | 0.5161 | 8000 | 1.0076 | 0.0665 | 0.1787 |
| 2.0393 | 0.6452 | 10000 | 0.9322 | 0.0583 | 0.1636 |
| 1.7795 | 0.7742 | 12000 | 0.8796 | 0.0515 | 0.1473 |
| 1.7639 | 0.9032 | 14000 | 0.8280 | 0.0505 | 0.1412 |
| 1.4205 | 1.0323 | 16000 | 0.7864 | 0.0462 | 0.1312 |
| 1.3416 | 1.1613 | 18000 | 0.7588 | 0.0408 | 0.1185 |
| 1.2655 | 1.2903 | 20000 | 0.7297 | 0.0373 | 0.1105 |
| 1.2609 | 1.4194 | 22000 | 0.7056 | 0.0398 | 0.1129 |
| 1.1278 | 1.5484 | 24000 | 0.6811 | 0.0356 | 0.1025 |
| 1.1880 | 1.6774 | 26000 | 0.6588 | 0.0347 | 0.1021 |
| 1.2025 | 1.8065 | 28000 | 0.6335 | 0.0306 | 0.0914 |
| 1.0843 | 1.9355 | 30000 | 0.6181 | 0.0276 | 0.0850 |
| 0.9095 | 2.0645 | 32000 | 0.6073 | 0.0304 | 0.0909 |
| 0.8758 | 2.1935 | 34000 | 0.5952 | 0.0306 | 0.0885 |
| 0.8523 | 2.3226 | 36000 | 0.5936 | 0.0298 | 0.0871 |
| 0.8689 | 2.4516 | 38000 | 0.5757 | 0.0288 | 0.0835 |
| 0.7696 | 2.5806 | 40000 | 0.5690 | 0.0275 | 0.0810 |
| 0.9017 | 2.7097 | 42000 | 0.5611 | 0.0268 | 0.0785 |
| 0.8998 | 2.8387 | 44000 | 0.5558 | 0.0269 | 0.0783 |
| 0.8596 | 2.9677 | 46000 | 0.5525 | 0.0263 | 0.0766 |
| 0.8215 | 3.0 | 46500 | 0.5527 | 0.0266 | 0.0774 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 29
Model tree for cyttic/trocr-fonts1-BY
Base model
cyttic/exp2-frozen-benyehuda-cont