Image-Text-to-Text
Transformers
Safetensors
paddleocr_vl
Generated from Trainer
sft
trl
unsloth
conversational
custom_code
Instructions to use tachiwin/paddleocr_multilingual_checkpoints with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tachiwin/paddleocr_multilingual_checkpoints with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tachiwin/paddleocr_multilingual_checkpoints", trust_remote_code=True, device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("tachiwin/paddleocr_multilingual_checkpoints", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("tachiwin/paddleocr_multilingual_checkpoints", trust_remote_code=True, device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tachiwin/paddleocr_multilingual_checkpoints with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tachiwin/paddleocr_multilingual_checkpoints" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tachiwin/paddleocr_multilingual_checkpoints", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/tachiwin/paddleocr_multilingual_checkpoints
- SGLang
How to use tachiwin/paddleocr_multilingual_checkpoints 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 "tachiwin/paddleocr_multilingual_checkpoints" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tachiwin/paddleocr_multilingual_checkpoints", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "tachiwin/paddleocr_multilingual_checkpoints" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tachiwin/paddleocr_multilingual_checkpoints", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Unsloth Studio
How to use tachiwin/paddleocr_multilingual_checkpoints with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for tachiwin/paddleocr_multilingual_checkpoints to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for tachiwin/paddleocr_multilingual_checkpoints to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tachiwin/paddleocr_multilingual_checkpoints to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="tachiwin/paddleocr_multilingual_checkpoints", max_seq_length=2048, ) - Docker Model Runner
How to use tachiwin/paddleocr_multilingual_checkpoints with Docker Model Runner:
docker model run hf.co/tachiwin/paddleocr_multilingual_checkpoints
Training in progress, step 1000, checkpoint
Browse files
last-checkpoint/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3826461296
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d32ac3feded5c3479ac17b89c6c7d6fc8a6a5c9e382b0cd178658d12631f6320
|
| 3 |
size 3826461296
|
last-checkpoint/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2479955235
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66774c6e05115bebae2c4f1d957fbbf1529b4a28c6a6bf08a7cad3ceb574a9aa
|
| 3 |
size 2479955235
|
last-checkpoint/scaler.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1383
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e41f9a9fd18b485398505f595af3510abbf13d7745049b3d74379645d85abae1
|
| 3 |
size 1383
|
last-checkpoint/scheduler.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1465
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd6ac75c94c2f7dfcfe42f00a66031ae062ed94adea9b80ebcb8b3240ad4424c
|
| 3 |
size 1465
|
last-checkpoint/trainer_state.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
"best_global_step": null,
|
| 3 |
"best_metric": null,
|
| 4 |
"best_model_checkpoint": null,
|
| 5 |
-
"epoch": 0.
|
| 6 |
"eval_steps": 500,
|
| 7 |
-
"global_step":
|
| 8 |
"is_hyper_param_search": false,
|
| 9 |
"is_local_process_zero": true,
|
| 10 |
"is_world_process_zero": true,
|
|
@@ -638,6 +638,76 @@
|
|
| 638 |
"learning_rate": 3.22347266881029e-05,
|
| 639 |
"loss": 0.625,
|
| 640 |
"step": 900
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 641 |
}
|
| 642 |
],
|
| 643 |
"logging_steps": 10,
|
|
@@ -657,7 +727,7 @@
|
|
| 657 |
"attributes": {}
|
| 658 |
}
|
| 659 |
},
|
| 660 |
-
"total_flos": 1.
|
| 661 |
"train_batch_size": 2,
|
| 662 |
"trial_name": null,
|
| 663 |
"trial_params": null
|
|
|
|
| 2 |
"best_global_step": null,
|
| 3 |
"best_metric": null,
|
| 4 |
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.4,
|
| 6 |
"eval_steps": 500,
|
| 7 |
+
"global_step": 1000,
|
| 8 |
"is_hyper_param_search": false,
|
| 9 |
"is_local_process_zero": true,
|
| 10 |
"is_world_process_zero": true,
|
|
|
|
| 638 |
"learning_rate": 3.22347266881029e-05,
|
| 639 |
"loss": 0.625,
|
| 640 |
"step": 900
|
| 641 |
+
},
|
| 642 |
+
{
|
| 643 |
+
"epoch": 0.364,
|
| 644 |
+
"grad_norm": 23.470478057861328,
|
| 645 |
+
"learning_rate": 3.2033762057877816e-05,
|
| 646 |
+
"loss": 0.9571,
|
| 647 |
+
"step": 910
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"epoch": 0.368,
|
| 651 |
+
"grad_norm": 31.515092849731445,
|
| 652 |
+
"learning_rate": 3.1832797427652735e-05,
|
| 653 |
+
"loss": 0.7395,
|
| 654 |
+
"step": 920
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"epoch": 0.372,
|
| 658 |
+
"grad_norm": 14.246073722839355,
|
| 659 |
+
"learning_rate": 3.1631832797427654e-05,
|
| 660 |
+
"loss": 0.6884,
|
| 661 |
+
"step": 930
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"epoch": 0.376,
|
| 665 |
+
"grad_norm": 25.352590560913086,
|
| 666 |
+
"learning_rate": 3.143086816720258e-05,
|
| 667 |
+
"loss": 0.772,
|
| 668 |
+
"step": 940
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"epoch": 0.38,
|
| 672 |
+
"grad_norm": 14.441354751586914,
|
| 673 |
+
"learning_rate": 3.12299035369775e-05,
|
| 674 |
+
"loss": 0.7406,
|
| 675 |
+
"step": 950
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"epoch": 0.384,
|
| 679 |
+
"grad_norm": 29.33234405517578,
|
| 680 |
+
"learning_rate": 3.102893890675242e-05,
|
| 681 |
+
"loss": 0.7242,
|
| 682 |
+
"step": 960
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"epoch": 0.388,
|
| 686 |
+
"grad_norm": 16.018104553222656,
|
| 687 |
+
"learning_rate": 3.0827974276527335e-05,
|
| 688 |
+
"loss": 0.9183,
|
| 689 |
+
"step": 970
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"epoch": 0.392,
|
| 693 |
+
"grad_norm": 14.766180992126465,
|
| 694 |
+
"learning_rate": 3.0627009646302254e-05,
|
| 695 |
+
"loss": 0.8971,
|
| 696 |
+
"step": 980
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"epoch": 0.396,
|
| 700 |
+
"grad_norm": 10.733450889587402,
|
| 701 |
+
"learning_rate": 3.042604501607717e-05,
|
| 702 |
+
"loss": 0.5546,
|
| 703 |
+
"step": 990
|
| 704 |
+
},
|
| 705 |
+
{
|
| 706 |
+
"epoch": 0.4,
|
| 707 |
+
"grad_norm": 15.318602561950684,
|
| 708 |
+
"learning_rate": 3.0225080385852088e-05,
|
| 709 |
+
"loss": 0.7582,
|
| 710 |
+
"step": 1000
|
| 711 |
}
|
| 712 |
],
|
| 713 |
"logging_steps": 10,
|
|
|
|
| 727 |
"attributes": {}
|
| 728 |
}
|
| 729 |
},
|
| 730 |
+
"total_flos": 1.7984652389369856e+16,
|
| 731 |
"train_batch_size": 2,
|
| 732 |
"trial_name": null,
|
| 733 |
"trial_params": null
|