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) 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 900, 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:f464bb34c079c49fc4894f86d25745fe89898016c82a86a608f7319e127060fb
|
| 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:89a0275491ae162fc646c048a499bb9160456c508f7be5abff3710269e6fdf4a
|
| 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:504b7bc543b9e5f039f6559d07b099507a66c15c86836ff5981e4eee51792c02
|
| 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:bcb268d80dcd8f32a0b291e0f300bdc2df3898cc3661ea44beb8067d70741b7b
|
| 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,
|
|
@@ -568,6 +568,76 @@
|
|
| 568 |
"learning_rate": 3.4244372990353704e-05,
|
| 569 |
"loss": 0.7991,
|
| 570 |
"step": 800
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 571 |
}
|
| 572 |
],
|
| 573 |
"logging_steps": 10,
|
|
@@ -587,7 +657,7 @@
|
|
| 587 |
"attributes": {}
|
| 588 |
}
|
| 589 |
},
|
| 590 |
-
"total_flos": 1.
|
| 591 |
"train_batch_size": 2,
|
| 592 |
"trial_name": null,
|
| 593 |
"trial_params": null
|
|
|
|
| 2 |
"best_global_step": null,
|
| 3 |
"best_metric": null,
|
| 4 |
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.36,
|
| 6 |
"eval_steps": 500,
|
| 7 |
+
"global_step": 900,
|
| 8 |
"is_hyper_param_search": false,
|
| 9 |
"is_local_process_zero": true,
|
| 10 |
"is_world_process_zero": true,
|
|
|
|
| 568 |
"learning_rate": 3.4244372990353704e-05,
|
| 569 |
"loss": 0.7991,
|
| 570 |
"step": 800
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"epoch": 0.324,
|
| 574 |
+
"grad_norm": 25.02106475830078,
|
| 575 |
+
"learning_rate": 3.404340836012862e-05,
|
| 576 |
+
"loss": 0.7284,
|
| 577 |
+
"step": 810
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"epoch": 0.328,
|
| 581 |
+
"grad_norm": 14.035198211669922,
|
| 582 |
+
"learning_rate": 3.384244372990354e-05,
|
| 583 |
+
"loss": 0.7589,
|
| 584 |
+
"step": 820
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"epoch": 0.332,
|
| 588 |
+
"grad_norm": 11.368013381958008,
|
| 589 |
+
"learning_rate": 3.364147909967846e-05,
|
| 590 |
+
"loss": 0.7638,
|
| 591 |
+
"step": 830
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
"epoch": 0.336,
|
| 595 |
+
"grad_norm": 21.951080322265625,
|
| 596 |
+
"learning_rate": 3.344051446945338e-05,
|
| 597 |
+
"loss": 0.7869,
|
| 598 |
+
"step": 840
|
| 599 |
+
},
|
| 600 |
+
{
|
| 601 |
+
"epoch": 0.34,
|
| 602 |
+
"grad_norm": 17.966073989868164,
|
| 603 |
+
"learning_rate": 3.32395498392283e-05,
|
| 604 |
+
"loss": 0.6792,
|
| 605 |
+
"step": 850
|
| 606 |
+
},
|
| 607 |
+
{
|
| 608 |
+
"epoch": 0.344,
|
| 609 |
+
"grad_norm": 36.02198791503906,
|
| 610 |
+
"learning_rate": 3.3038585209003216e-05,
|
| 611 |
+
"loss": 0.6968,
|
| 612 |
+
"step": 860
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"epoch": 0.348,
|
| 616 |
+
"grad_norm": 32.43560791015625,
|
| 617 |
+
"learning_rate": 3.283762057877814e-05,
|
| 618 |
+
"loss": 0.7523,
|
| 619 |
+
"step": 870
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"epoch": 0.352,
|
| 623 |
+
"grad_norm": 30.29490852355957,
|
| 624 |
+
"learning_rate": 3.263665594855306e-05,
|
| 625 |
+
"loss": 0.6548,
|
| 626 |
+
"step": 880
|
| 627 |
+
},
|
| 628 |
+
{
|
| 629 |
+
"epoch": 0.356,
|
| 630 |
+
"grad_norm": 8.957921981811523,
|
| 631 |
+
"learning_rate": 3.243569131832798e-05,
|
| 632 |
+
"loss": 0.7151,
|
| 633 |
+
"step": 890
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"epoch": 0.36,
|
| 637 |
+
"grad_norm": 15.583487510681152,
|
| 638 |
+
"learning_rate": 3.22347266881029e-05,
|
| 639 |
+
"loss": 0.625,
|
| 640 |
+
"step": 900
|
| 641 |
}
|
| 642 |
],
|
| 643 |
"logging_steps": 10,
|
|
|
|
| 657 |
"attributes": {}
|
| 658 |
}
|
| 659 |
},
|
| 660 |
+
"total_flos": 1.6191274912395264e+16,
|
| 661 |
"train_batch_size": 2,
|
| 662 |
"trial_name": null,
|
| 663 |
"trial_params": null
|