Instructions to use cyttic/trocr-freefonts-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-freefonts-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-freefonts-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-freefonts-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-freefonts-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-freefonts-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-freefonts-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-freefonts-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-freefonts-BY
- SGLang
How to use cyttic/trocr-freefonts-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-freefonts-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-freefonts-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-freefonts-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-freefonts-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-freefonts-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-freefonts-BY
trocr-freefonts-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.5632
- Cer: 0.0280
- Wer: 0.0820
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: 4649
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | Cer | Wer |
|---|---|---|---|---|---|
| 3.6994 | 0.1291 | 2000 | 1.6757 | 0.1817 | 0.3848 |
| 3.1425 | 0.2581 | 4000 | 1.3883 | 0.1234 | 0.2890 |
| 2.8238 | 0.3872 | 6000 | 1.2064 | 0.0967 | 0.2389 |
| 2.5973 | 0.5163 | 8000 | 1.0902 | 0.0774 | 0.2034 |
| 2.2214 | 0.6453 | 10000 | 1.0033 | 0.0730 | 0.1903 |
| 2.0470 | 0.7744 | 12000 | 0.9233 | 0.0631 | 0.1657 |
| 1.9582 | 0.9035 | 14000 | 0.8651 | 0.0567 | 0.1556 |
| 1.4443 | 1.0325 | 16000 | 0.8174 | 0.0506 | 0.1391 |
| 1.4618 | 1.1616 | 18000 | 0.7852 | 0.0469 | 0.1338 |
| 1.3979 | 1.2907 | 20000 | 0.7578 | 0.0429 | 0.1216 |
| 1.4233 | 1.4197 | 22000 | 0.7379 | 0.0394 | 0.1149 |
| 1.3698 | 1.5488 | 24000 | 0.6954 | 0.0378 | 0.1090 |
| 1.3833 | 1.6779 | 26000 | 0.6786 | 0.0378 | 0.1091 |
| 1.2769 | 1.8069 | 28000 | 0.6521 | 0.0330 | 0.0974 |
| 1.2082 | 1.9360 | 30000 | 0.6263 | 0.0309 | 0.0906 |
| 0.9473 | 2.0650 | 32000 | 0.6123 | 0.0317 | 0.0916 |
| 0.9870 | 2.1941 | 34000 | 0.6082 | 0.0300 | 0.0893 |
| 0.8580 | 2.3232 | 36000 | 0.5972 | 0.0297 | 0.0870 |
| 1.0218 | 2.4522 | 38000 | 0.5922 | 0.0312 | 0.0887 |
| 1.0021 | 2.5813 | 40000 | 0.5802 | 0.0300 | 0.0876 |
| 0.9247 | 2.7104 | 42000 | 0.5722 | 0.0291 | 0.0848 |
| 0.9760 | 2.8394 | 44000 | 0.5667 | 0.0288 | 0.0833 |
| 0.9097 | 2.9685 | 46000 | 0.5639 | 0.0281 | 0.0820 |
| 0.8556 | 3.0 | 46488 | 0.5632 | 0.0280 | 0.0820 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 25
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for cyttic/trocr-freefonts-BY
Base model
cyttic/exp2-frozen-benyehuda-cont