Image-Text-to-Text
Transformers
TensorBoard
Safetensors
vision-encoder-decoder
Generated from Trainer
Instructions to use andrianangg/checkpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use andrianangg/checkpoint with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="andrianangg/checkpoint")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("andrianangg/checkpoint") model = AutoModelForMultimodalLM.from_pretrained("andrianangg/checkpoint", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use andrianangg/checkpoint with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "andrianangg/checkpoint" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "andrianangg/checkpoint", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/andrianangg/checkpoint
- SGLang
How to use andrianangg/checkpoint 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 "andrianangg/checkpoint" \ --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": "andrianangg/checkpoint", "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 "andrianangg/checkpoint" \ --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": "andrianangg/checkpoint", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use andrianangg/checkpoint with Docker Model Runner:
docker model run hf.co/andrianangg/checkpoint
trocr-invoice
Browse filesFiles changed (8)
- README.md+8-19
- config.json+1-1
- generation_config.json+1-1
- model.safetensors+1-1
- runs/Jul20_14-29-49_201cff9e7870/events.out.tfevents.1721485800.201cff9e7870.898.0Added+3
- runs/Jul20_14-33-52_201cff9e7870/events.out.tfevents.1721486033.201cff9e7870.898.1Added+3
- runs/Jul20_14-35-19_201cff9e7870/events.out.tfevents.1721486120.201cff9e7870.9490.0Added+3
- training_args.bin+1-1
13 unmodified lines141516171819202118 unmodified lines4041424344454647484950515253545556575859606162636413 unmodified linesThis model is a fine-tuned version of [microsoft/trocr-base-stage1](https://huggingface.co/microsoft/trocr-base-stage1) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 0.4098- Cer: 0.0324## Model description18 unmodified lines- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- num_epochs: 10- mixed_precision_training: Native AMP### Training results| Training Loss | Epoch | Step | Validation Loss | Cer ||:-------------:|:-----:|:----:|:---------------:|:------:|| No log | 1.0 | 390 | 0.5628 | 0.1036 || 0.9189 | 2.0 | 780 | 0.4374 | 0.0472 || 0.4488 | 3.0 | 1170 | 0.4076 | 0.0300 || 0.378 | 4.0 | 1560 | 0.3955 | 0.0239 || 0.378 | 5.0 | 1950 | 0.3553 | 0.0150 || 0.336 | 6.0 | 2340 | 0.3574 | 0.0132 || 0.3207 | 7.0 | 2730 | 0.3441 | 0.0103 || 0.3079 | 8.0 | 3120 | 0.3473 | 0.0121 || 0.26 | 9.0 | 3510 | 0.3490 | 0.0121 || 0.26 | 10.0 | 3900 | 0.3513 | 0.0113 |### Framework versions- Transformers 4.42.413 unmodified lines1415161718192021222324252618 unmodified lines45464748495051525313 unmodified linesThis model is a fine-tuned version of [microsoft/trocr-base-stage1](https://huggingface.co/microsoft/trocr-base-stage1) on an unknown dataset.It achieves the following results on the evaluation set:- eval_loss: 1.7428- eval_cer: 0.1176- eval_runtime: 578.8949- eval_samples_per_second: 7.692- eval_steps_per_second: 0.962- epoch: 2.0- step: 8906## Model description18 unmodified lines- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- num_epochs: 3- mixed_precision_training: Native AMP### Framework versions- Transformers 4.42.4
164 unmodified lines165166167168169170171164 unmodified lines"eos_token_id": 2,"is_encoder_decoder": true,"length_penalty": 2.0,"max_length": 64,"model_type": "vision-encoder-decoder","no_repeat_ngram_size": 3,"num_beams": 4,164 unmodified lines165166167168169170171164 unmodified lines"eos_token_id": 2,"is_encoder_decoder": true,"length_penalty": 2.0,"max_length": 128,"model_type": "vision-encoder-decoder","no_repeat_ngram_size": 3,"num_beams": 4,
3 unmodified lines456789103 unmodified lines"early_stopping": true,"eos_token_id": 2,"length_penalty": 2.0,"max_length": 64,"no_repeat_ngram_size": 3,"num_beams": 4,"pad_token_id": 1,3 unmodified lines456789103 unmodified lines"early_stopping": true,"eos_token_id": 2,"length_penalty": 2.0,"max_length": 128,"no_repeat_ngram_size": 3,"num_beams": 4,"pad_token_id": 1,
123version https://git-lfs.github.com/spec/v1oid sha256:749514458b6c6e60e2e7d9682a44e51d4bc0e8d4747718b9297b016e838eb5b8size 1539518812123version https://git-lfs.github.com/spec/v1oid sha256:ecc40fd68bb1f9dd2369f6c9345c46a6f2a066663781d7640a5753e340aa05b7size 1539518812
123version https://git-lfs.github.com/spec/v1oid sha256:29ff7c640ff29b043732bcd9791978eaa700f3395b7ee00e8186402ed96235a8size 9130123version https://git-lfs.github.com/spec/v1oid sha256:f19e4b13b4d02e151f09925cc4bcfffd8635912762e1c4e076fb839016cad5fbsize 8280123version https://git-lfs.github.com/spec/v1oid sha256:e9b2702c55e81fad12615947b9e7abc521d8d9e96d03b11a7bcc8f047ad6e31fsize 13775123version https://git-lfs.github.com/spec/v1oid sha256:6d361a886d0b23c9cae2e40a342f7001ef8801a281aaf2d29d0249bb45ac5521size 5304123version https://git-lfs.github.com/spec/v1oid sha256:62ed26fe8d87087b3c7cdaa09993b1a6c804d0ac6d7afd2b96ed42809ca8bf4asize 5304
README.md+8-19
config.json+1-1
generation_config.json+1-1
model.safetensors+1-1
runs/Jul20_14-29-49_201cff9e7870/events.out.tfevents.1721485800.201cff9e7870.898.0Added+3
runs/Jul20_14-33-52_201cff9e7870/events.out.tfevents.1721486033.201cff9e7870.898.1Added+3
runs/Jul20_14-35-19_201cff9e7870/events.out.tfevents.1721486120.201cff9e7870.9490.0Added+3
training_args.bin+1-1