Instructions to use cyttic/trocr-bigram5-lentrunc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-bigram5-lentrunc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-bigram5-lentrunc")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-bigram5-lentrunc") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-bigram5-lentrunc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-bigram5-lentrunc with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-bigram5-lentrunc" # 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-bigram5-lentrunc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-bigram5-lentrunc
- SGLang
How to use cyttic/trocr-bigram5-lentrunc 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-bigram5-lentrunc" \ --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-bigram5-lentrunc", "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-bigram5-lentrunc" \ --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-bigram5-lentrunc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-bigram5-lentrunc with Docker Model Runner:
docker model run hf.co/cyttic/trocr-bigram5-lentrunc
trocr-bigram5-lentrunc
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.3604
- Cer: 0.0205
- Wer: 0.0584
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 |
|---|---|---|---|---|---|
| 4.7708 | 0.1290 | 2000 | 2.3792 | 0.2069 | 0.4211 |
| 3.5688 | 0.2581 | 4000 | 1.6457 | 0.1326 | 0.3034 |
| 2.6281 | 0.3871 | 6000 | 1.2726 | 0.1018 | 0.2408 |
| 2.4209 | 0.5161 | 8000 | 1.0654 | 0.0818 | 0.1989 |
| 1.8799 | 0.6452 | 10000 | 0.9121 | 0.0681 | 0.1708 |
| 1.7538 | 0.7742 | 12000 | 0.8169 | 0.0571 | 0.1464 |
| 1.6138 | 0.9032 | 14000 | 0.7307 | 0.0527 | 0.1356 |
| 1.2246 | 1.0323 | 16000 | 0.6595 | 0.0443 | 0.1165 |
| 1.1681 | 1.1613 | 18000 | 0.6062 | 0.0403 | 0.1089 |
| 1.0557 | 1.2903 | 20000 | 0.5747 | 0.0378 | 0.1019 |
| 0.9707 | 1.4194 | 22000 | 0.5402 | 0.0343 | 0.0923 |
| 0.9284 | 1.5484 | 24000 | 0.5028 | 0.0316 | 0.0872 |
| 0.8654 | 1.6774 | 26000 | 0.4761 | 0.0302 | 0.0819 |
| 0.8459 | 1.8065 | 28000 | 0.4524 | 0.0271 | 0.0781 |
| 0.8298 | 1.9355 | 30000 | 0.4345 | 0.0256 | 0.0712 |
| 0.5770 | 2.0645 | 32000 | 0.4196 | 0.0262 | 0.0712 |
| 0.5775 | 2.1935 | 34000 | 0.4062 | 0.0263 | 0.0704 |
| 0.4802 | 2.3226 | 36000 | 0.3955 | 0.0242 | 0.0661 |
| 0.6221 | 2.4516 | 38000 | 0.3833 | 0.0228 | 0.0633 |
| 0.5440 | 2.5806 | 40000 | 0.3799 | 0.0224 | 0.0629 |
| 0.6317 | 2.7097 | 42000 | 0.3702 | 0.0214 | 0.0608 |
| 0.5272 | 2.8387 | 44000 | 0.3645 | 0.0212 | 0.0605 |
| 0.5501 | 2.9677 | 46000 | 0.3605 | 0.0204 | 0.0584 |
| 0.5624 | 3.0 | 46500 | 0.3604 | 0.0205 | 0.0584 |
Framework versions
- Transformers 5.15.0
- Pytorch 2.11.0+cu128
- Datasets 5.0.1
- Tokenizers 0.22.2
- Downloads last month
- 34
Model tree for cyttic/trocr-bigram5-lentrunc
Base model
cyttic/exp2-frozen-benyehuda-cont