Instructions to use oroikon/chart_captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use oroikon/chart_captioning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="oroikon/chart_captioning")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("oroikon/chart_captioning") model = AutoModelForImageTextToText.from_pretrained("oroikon/chart_captioning") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use oroikon/chart_captioning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "oroikon/chart_captioning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "oroikon/chart_captioning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/oroikon/chart_captioning
- SGLang
How to use oroikon/chart_captioning 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 "oroikon/chart_captioning" \ --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": "oroikon/chart_captioning", "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 "oroikon/chart_captioning" \ --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": "oroikon/chart_captioning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use oroikon/chart_captioning with Docker Model Runner:
docker model run hf.co/oroikon/chart_captioning
truncation = true, full data
Browse files- .DS_Store +0 -0
- pytorch_model.bin +2 -2
- tokenizer.json +1 -8
- tokenizer_config.json +0 -1
.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:129bb8cd31f74de8ac0e3910a979a7703176e61be791f3140becc7ef09d27f92
|
| 3 |
+
size 1129238081
|
tokenizer.json
CHANGED
|
@@ -1,14 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": null,
|
| 4 |
-
"padding":
|
| 5 |
-
"strategy": "BatchLongest",
|
| 6 |
-
"direction": "Right",
|
| 7 |
-
"pad_to_multiple_of": null,
|
| 8 |
-
"pad_id": 0,
|
| 9 |
-
"pad_type_id": 0,
|
| 10 |
-
"pad_token": "<pad>"
|
| 11 |
-
},
|
| 12 |
"added_tokens": [
|
| 13 |
{
|
| 14 |
"id": 0,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": null,
|
| 4 |
+
"padding": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
| 7 |
"id": 0,
|
tokenizer_config.json
CHANGED
|
@@ -104,7 +104,6 @@
|
|
| 104 |
"clean_up_tokenization_spaces": true,
|
| 105 |
"eos_token": "</s>",
|
| 106 |
"extra_ids": 100,
|
| 107 |
-
"is_vqa": false,
|
| 108 |
"model_max_length": 1000000000000000019884624838656,
|
| 109 |
"pad_token": "<pad>",
|
| 110 |
"processor_class": "Pix2StructProcessor",
|
|
|
|
| 104 |
"clean_up_tokenization_spaces": true,
|
| 105 |
"eos_token": "</s>",
|
| 106 |
"extra_ids": 100,
|
|
|
|
| 107 |
"model_max_length": 1000000000000000019884624838656,
|
| 108 |
"pad_token": "<pad>",
|
| 109 |
"processor_class": "Pix2StructProcessor",
|