Instructions to use cyttic/trocr-noise-bigram2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyttic/trocr-noise-bigram2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cyttic/trocr-noise-bigram2")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cyttic/trocr-noise-bigram2") model = AutoModelForMultimodalLM.from_pretrained("cyttic/trocr-noise-bigram2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyttic/trocr-noise-bigram2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyttic/trocr-noise-bigram2" # 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-noise-bigram2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cyttic/trocr-noise-bigram2
- SGLang
How to use cyttic/trocr-noise-bigram2 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-noise-bigram2" \ --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-noise-bigram2", "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-noise-bigram2" \ --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-noise-bigram2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cyttic/trocr-noise-bigram2 with Docker Model Runner:
docker model run hf.co/cyttic/trocr-noise-bigram2
End of training
Browse files- README.md +79 -0
- tokenizer.json +0 -0
- tokenizer_config.json +17 -0
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
base_model: cyttic/exp2-frozen-benyehuda-cont
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
metrics:
|
| 7 |
+
- wer
|
| 8 |
+
model-index:
|
| 9 |
+
- name: trocr-noise-bigram2
|
| 10 |
+
results: []
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 14 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 15 |
+
|
| 16 |
+
# trocr-noise-bigram2
|
| 17 |
+
|
| 18 |
+
This model is a fine-tuned version of [cyttic/exp2-frozen-benyehuda-cont](https://huggingface.co/cyttic/exp2-frozen-benyehuda-cont) on an unknown dataset.
|
| 19 |
+
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 0.5353
|
| 21 |
+
- Cer: 0.0311
|
| 22 |
+
- Wer: 0.0865
|
| 23 |
+
|
| 24 |
+
## Model description
|
| 25 |
+
|
| 26 |
+
More information needed
|
| 27 |
+
|
| 28 |
+
## Intended uses & limitations
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Training and evaluation data
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training procedure
|
| 37 |
+
|
| 38 |
+
### Training hyperparameters
|
| 39 |
+
|
| 40 |
+
The following hyperparameters were used during training:
|
| 41 |
+
- learning_rate: 2e-05
|
| 42 |
+
- train_batch_size: 8
|
| 43 |
+
- eval_batch_size: 8
|
| 44 |
+
- seed: 42
|
| 45 |
+
- gradient_accumulation_steps: 2
|
| 46 |
+
- total_train_batch_size: 16
|
| 47 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 48 |
+
- lr_scheduler_type: linear
|
| 49 |
+
- lr_scheduler_warmup_steps: 0.1
|
| 50 |
+
- num_epochs: 2
|
| 51 |
+
|
| 52 |
+
### Training results
|
| 53 |
+
|
| 54 |
+
| Training Loss | Epoch | Step | Validation Loss | Cer | Wer |
|
| 55 |
+
|:-------------:|:------:|:-----:|:---------------:|:------:|:------:|
|
| 56 |
+
| 4.4701 | 0.1290 | 2000 | 2.0749 | 0.1892 | 0.3917 |
|
| 57 |
+
| 3.4282 | 0.2581 | 4000 | 1.5678 | 0.1288 | 0.2889 |
|
| 58 |
+
| 2.6796 | 0.3871 | 6000 | 1.2115 | 0.0937 | 0.2210 |
|
| 59 |
+
| 2.3398 | 0.5161 | 8000 | 1.0724 | 0.0778 | 0.1845 |
|
| 60 |
+
| 1.9402 | 0.6452 | 10000 | 0.9204 | 0.0661 | 0.1640 |
|
| 61 |
+
| 1.8243 | 0.7742 | 12000 | 0.8303 | 0.0570 | 0.1429 |
|
| 62 |
+
| 1.6875 | 0.9032 | 14000 | 0.7434 | 0.0509 | 0.1294 |
|
| 63 |
+
| 1.2807 | 1.0323 | 16000 | 0.6928 | 0.0457 | 0.1188 |
|
| 64 |
+
| 1.2310 | 1.1613 | 18000 | 0.6552 | 0.0419 | 0.1105 |
|
| 65 |
+
| 1.1186 | 1.2903 | 20000 | 0.6258 | 0.0380 | 0.1035 |
|
| 66 |
+
| 1.0514 | 1.4194 | 22000 | 0.6097 | 0.0380 | 0.1000 |
|
| 67 |
+
| 1.1760 | 1.5484 | 24000 | 0.5739 | 0.0346 | 0.0934 |
|
| 68 |
+
| 1.0901 | 1.6774 | 26000 | 0.5598 | 0.0339 | 0.0922 |
|
| 69 |
+
| 1.0063 | 1.8065 | 28000 | 0.5434 | 0.0328 | 0.0888 |
|
| 70 |
+
| 0.9992 | 1.9355 | 30000 | 0.5368 | 0.0309 | 0.0861 |
|
| 71 |
+
| 1.0274 | 2.0 | 31000 | 0.5353 | 0.0311 | 0.0865 |
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
### Framework versions
|
| 75 |
+
|
| 76 |
+
- Transformers 5.9.0
|
| 77 |
+
- Pytorch 2.11.0+cu128
|
| 78 |
+
- Datasets 5.0.1
|
| 79 |
+
- Tokenizers 0.22.2
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": true,
|
| 4 |
+
"cls_token": "[CLS]",
|
| 5 |
+
"do_lower_case": true,
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"local_files_only": false,
|
| 8 |
+
"mask_token": "[MASK]",
|
| 9 |
+
"model_max_length": 512,
|
| 10 |
+
"pad_token": "[PAD]",
|
| 11 |
+
"processor_class": "TrOCRProcessor",
|
| 12 |
+
"sep_token": "[SEP]",
|
| 13 |
+
"strip_accents": null,
|
| 14 |
+
"tokenize_chinese_chars": true,
|
| 15 |
+
"tokenizer_class": "TokenizersBackend",
|
| 16 |
+
"unk_token": "[UNK]"
|
| 17 |
+
}
|