Instructions to use anhdang000/UniChart-ChartQA-QueryTable with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anhdang000/UniChart-ChartQA-QueryTable with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="anhdang000/UniChart-ChartQA-QueryTable")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("anhdang000/UniChart-ChartQA-QueryTable") model = AutoModelForImageTextToText.from_pretrained("anhdang000/UniChart-ChartQA-QueryTable") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use anhdang000/UniChart-ChartQA-QueryTable with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anhdang000/UniChart-ChartQA-QueryTable" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anhdang000/UniChart-ChartQA-QueryTable", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/anhdang000/UniChart-ChartQA-QueryTable
- SGLang
How to use anhdang000/UniChart-ChartQA-QueryTable 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 "anhdang000/UniChart-ChartQA-QueryTable" \ --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": "anhdang000/UniChart-ChartQA-QueryTable", "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 "anhdang000/UniChart-ChartQA-QueryTable" \ --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": "anhdang000/UniChart-ChartQA-QueryTable", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use anhdang000/UniChart-ChartQA-QueryTable with Docker Model Runner:
docker model run hf.co/anhdang000/UniChart-ChartQA-QueryTable
Upload processor
Browse files- tokenizer.json +2 -2
- tokenizer_config.json +7 -0
tokenizer.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
-
"max_length":
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
-
"Fixed":
|
| 12 |
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
|
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
+
"max_length": 1024,
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
| 9 |
"padding": {
|
| 10 |
"strategy": {
|
| 11 |
+
"Fixed": 1024
|
| 12 |
},
|
| 13 |
"direction": "Right",
|
| 14 |
"pad_to_multiple_of": null,
|
tokenizer_config.json
CHANGED
|
@@ -122,11 +122,18 @@
|
|
| 122 |
"cls_token": "<s>",
|
| 123 |
"eos_token": "</s>",
|
| 124 |
"mask_token": "<mask>",
|
|
|
|
| 125 |
"model_max_length": 1000000000000000019884624838656,
|
|
|
|
| 126 |
"pad_token": "<pad>",
|
|
|
|
|
|
|
| 127 |
"processor_class": "DonutProcessor",
|
| 128 |
"sep_token": "</s>",
|
| 129 |
"sp_model_kwargs": {},
|
|
|
|
| 130 |
"tokenizer_class": "XLMRobertaTokenizer",
|
|
|
|
|
|
|
| 131 |
"unk_token": "<unk>"
|
| 132 |
}
|
|
|
|
| 122 |
"cls_token": "<s>",
|
| 123 |
"eos_token": "</s>",
|
| 124 |
"mask_token": "<mask>",
|
| 125 |
+
"max_length": 512,
|
| 126 |
"model_max_length": 1000000000000000019884624838656,
|
| 127 |
+
"pad_to_multiple_of": null,
|
| 128 |
"pad_token": "<pad>",
|
| 129 |
+
"pad_token_type_id": 0,
|
| 130 |
+
"padding_side": "right",
|
| 131 |
"processor_class": "DonutProcessor",
|
| 132 |
"sep_token": "</s>",
|
| 133 |
"sp_model_kwargs": {},
|
| 134 |
+
"stride": 0,
|
| 135 |
"tokenizer_class": "XLMRobertaTokenizer",
|
| 136 |
+
"truncation_side": "right",
|
| 137 |
+
"truncation_strategy": "longest_first",
|
| 138 |
"unk_token": "<unk>"
|
| 139 |
}
|