Instructions to use cyttic/trocr-webfonts8-BY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-webfonts8-BY with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-webfonts8-BY")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-webfonts8-BY") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-webfonts8-BY", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-webfonts8-BY with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-webfonts8-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-webfonts8-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-webfonts8-BY
- SGLang
How to use cyttic/trocr-webfonts8-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-webfonts8-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-webfonts8-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-webfonts8-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-webfonts8-BY", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-webfonts8-BY with Docker Model Runner:
docker model run hf.co/cyttic/trocr-webfonts8-BY
trocr-webfonts8-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.6037
- Cer: 0.0307
- Wer: 0.0885
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.9037 | 0.1290 | 2000 | 1.6910 | 0.1659 | 0.3655 |
| 3.5055 | 0.2581 | 4000 | 1.5227 | 0.1298 | 0.3011 |
| 3.0366 | 0.3871 | 6000 | 1.3503 | 0.1051 | 0.2518 |
| 2.7676 | 0.5161 | 8000 | 1.1913 | 0.0863 | 0.2172 |
| 2.4217 | 0.6452 | 10000 | 1.0707 | 0.0716 | 0.1879 |
| 2.2463 | 0.7742 | 12000 | 1.0065 | 0.0636 | 0.1717 |
| 2.0608 | 0.9032 | 14000 | 0.9393 | 0.0624 | 0.1642 |
| 1.6072 | 1.0323 | 16000 | 0.8890 | 0.0559 | 0.1521 |
| 1.5593 | 1.1613 | 18000 | 0.8447 | 0.0501 | 0.1387 |
| 1.6039 | 1.2903 | 20000 | 0.8109 | 0.0482 | 0.1324 |
| 1.4311 | 1.4194 | 22000 | 0.7732 | 0.0452 | 0.1245 |
| 1.2952 | 1.5484 | 24000 | 0.7461 | 0.0416 | 0.1185 |
| 1.4843 | 1.6774 | 26000 | 0.7182 | 0.0386 | 0.1089 |
| 1.4050 | 1.8065 | 28000 | 0.6950 | 0.0365 | 0.1042 |
| 1.3350 | 1.9355 | 30000 | 0.6844 | 0.0382 | 0.1047 |
| 0.9345 | 2.0645 | 32000 | 0.6734 | 0.0387 | 0.1061 |
| 1.1567 | 2.1935 | 34000 | 0.6526 | 0.0366 | 0.0994 |
| 1.0360 | 2.3226 | 36000 | 0.6429 | 0.0335 | 0.0963 |
| 1.0738 | 2.4516 | 38000 | 0.6292 | 0.0347 | 0.0981 |
| 0.9887 | 2.5806 | 40000 | 0.6212 | 0.0324 | 0.0912 |
| 1.0189 | 2.7097 | 42000 | 0.6113 | 0.0323 | 0.0904 |
| 1.0600 | 2.8387 | 44000 | 0.6065 | 0.0315 | 0.0894 |
| 0.9402 | 2.9677 | 46000 | 0.6040 | 0.0307 | 0.0885 |
| 0.9453 | 3.0 | 46500 | 0.6037 | 0.0307 | 0.0885 |
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-webfonts8-BY
Base model
cyttic/exp2-frozen-benyehuda-cont