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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("tachiwin/paddleocr_multilingual_checkpoints", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("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?"} ] }, ] 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
- 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 new
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 2200, 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:0dc14ab8f69ec65e7855224cd4b5b2dac50c96b2c4e24065af51a27d34a401e3
|
| 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:befb290c48abb8a194408bc7e0220009e932a229a7b61920a999600f5d482797
|
| 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:5a1d273ddb38f082f32c6d628e3728d6e9b70d01320b1dc05757751f2141f652
|
| 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:95ba5207589489cdf07784253d958ae087f570555b90d46b2edd73dcec34d4f5
|
| 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,
|
|
@@ -1478,6 +1478,76 @@
|
|
| 1478 |
"learning_rate": 8.118971061093248e-06,
|
| 1479 |
"loss": 0.3028,
|
| 1480 |
"step": 2100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1481 |
}
|
| 1482 |
],
|
| 1483 |
"logging_steps": 10,
|
|
@@ -1497,7 +1567,7 @@
|
|
| 1497 |
"attributes": {}
|
| 1498 |
}
|
| 1499 |
},
|
| 1500 |
-
"total_flos": 3.
|
| 1501 |
"train_batch_size": 2,
|
| 1502 |
"trial_name": null,
|
| 1503 |
"trial_params": null
|
|
|
|
| 2 |
"best_global_step": null,
|
| 3 |
"best_metric": null,
|
| 4 |
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.88,
|
| 6 |
"eval_steps": 500,
|
| 7 |
+
"global_step": 2200,
|
| 8 |
"is_hyper_param_search": false,
|
| 9 |
"is_local_process_zero": true,
|
| 10 |
"is_world_process_zero": true,
|
|
|
|
| 1478 |
"learning_rate": 8.118971061093248e-06,
|
| 1479 |
"loss": 0.3028,
|
| 1480 |
"step": 2100
|
| 1481 |
+
},
|
| 1482 |
+
{
|
| 1483 |
+
"epoch": 0.844,
|
| 1484 |
+
"grad_norm": 10.639591217041016,
|
| 1485 |
+
"learning_rate": 7.918006430868168e-06,
|
| 1486 |
+
"loss": 0.3065,
|
| 1487 |
+
"step": 2110
|
| 1488 |
+
},
|
| 1489 |
+
{
|
| 1490 |
+
"epoch": 0.848,
|
| 1491 |
+
"grad_norm": 4.760974884033203,
|
| 1492 |
+
"learning_rate": 7.717041800643089e-06,
|
| 1493 |
+
"loss": 0.2966,
|
| 1494 |
+
"step": 2120
|
| 1495 |
+
},
|
| 1496 |
+
{
|
| 1497 |
+
"epoch": 0.852,
|
| 1498 |
+
"grad_norm": 11.585098266601562,
|
| 1499 |
+
"learning_rate": 7.516077170418006e-06,
|
| 1500 |
+
"loss": 0.3466,
|
| 1501 |
+
"step": 2130
|
| 1502 |
+
},
|
| 1503 |
+
{
|
| 1504 |
+
"epoch": 0.856,
|
| 1505 |
+
"grad_norm": 4.685300827026367,
|
| 1506 |
+
"learning_rate": 7.315112540192927e-06,
|
| 1507 |
+
"loss": 0.397,
|
| 1508 |
+
"step": 2140
|
| 1509 |
+
},
|
| 1510 |
+
{
|
| 1511 |
+
"epoch": 0.86,
|
| 1512 |
+
"grad_norm": 7.504604339599609,
|
| 1513 |
+
"learning_rate": 7.1141479099678455e-06,
|
| 1514 |
+
"loss": 0.2216,
|
| 1515 |
+
"step": 2150
|
| 1516 |
+
},
|
| 1517 |
+
{
|
| 1518 |
+
"epoch": 0.864,
|
| 1519 |
+
"grad_norm": 16.2221736907959,
|
| 1520 |
+
"learning_rate": 6.913183279742766e-06,
|
| 1521 |
+
"loss": 0.3863,
|
| 1522 |
+
"step": 2160
|
| 1523 |
+
},
|
| 1524 |
+
{
|
| 1525 |
+
"epoch": 0.868,
|
| 1526 |
+
"grad_norm": 9.542070388793945,
|
| 1527 |
+
"learning_rate": 6.732315112540192e-06,
|
| 1528 |
+
"loss": 0.2478,
|
| 1529 |
+
"step": 2170
|
| 1530 |
+
},
|
| 1531 |
+
{
|
| 1532 |
+
"epoch": 0.872,
|
| 1533 |
+
"grad_norm": 12.575300216674805,
|
| 1534 |
+
"learning_rate": 6.531350482315113e-06,
|
| 1535 |
+
"loss": 0.3366,
|
| 1536 |
+
"step": 2180
|
| 1537 |
+
},
|
| 1538 |
+
{
|
| 1539 |
+
"epoch": 0.876,
|
| 1540 |
+
"grad_norm": 12.5275297164917,
|
| 1541 |
+
"learning_rate": 6.330385852090033e-06,
|
| 1542 |
+
"loss": 0.42,
|
| 1543 |
+
"step": 2190
|
| 1544 |
+
},
|
| 1545 |
+
{
|
| 1546 |
+
"epoch": 0.88,
|
| 1547 |
+
"grad_norm": 7.2454514503479,
|
| 1548 |
+
"learning_rate": 6.129421221864952e-06,
|
| 1549 |
+
"loss": 0.2943,
|
| 1550 |
+
"step": 2200
|
| 1551 |
}
|
| 1552 |
],
|
| 1553 |
"logging_steps": 10,
|
|
|
|
| 1567 |
"attributes": {}
|
| 1568 |
}
|
| 1569 |
},
|
| 1570 |
+
"total_flos": 3.972002478026342e+16,
|
| 1571 |
"train_batch_size": 2,
|
| 1572 |
"trial_name": null,
|
| 1573 |
"trial_params": null
|