Instructions to use to-be/Pix2StructGhega with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use to-be/Pix2StructGhega with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="to-be/Pix2StructGhega")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("to-be/Pix2StructGhega") model = AutoModelForImageTextToText.from_pretrained("to-be/Pix2StructGhega") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use to-be/Pix2StructGhega with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "to-be/Pix2StructGhega" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "to-be/Pix2StructGhega", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/to-be/Pix2StructGhega
- SGLang
How to use to-be/Pix2StructGhega 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 "to-be/Pix2StructGhega" \ --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": "to-be/Pix2StructGhega", "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 "to-be/Pix2StructGhega" \ --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": "to-be/Pix2StructGhega", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use to-be/Pix2StructGhega with Docker Model Runner:
docker model run hf.co/to-be/Pix2StructGhega
Training done
Browse files- config.json +2 -2
- generation_config.json +1 -1
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -85,7 +85,7 @@
|
|
| 85 |
"top_p": 1.0,
|
| 86 |
"torch_dtype": null,
|
| 87 |
"torchscript": false,
|
| 88 |
-
"transformers_version": "4.
|
| 89 |
"typical_p": 1.0,
|
| 90 |
"use_bfloat16": false,
|
| 91 |
"use_cache": false,
|
|
@@ -174,7 +174,7 @@
|
|
| 174 |
"top_p": 1.0,
|
| 175 |
"torch_dtype": null,
|
| 176 |
"torchscript": false,
|
| 177 |
-
"transformers_version": "4.
|
| 178 |
"typical_p": 1.0,
|
| 179 |
"use_bfloat16": false
|
| 180 |
}
|
|
|
|
| 85 |
"top_p": 1.0,
|
| 86 |
"torch_dtype": null,
|
| 87 |
"torchscript": false,
|
| 88 |
+
"transformers_version": "4.32.0.dev0",
|
| 89 |
"typical_p": 1.0,
|
| 90 |
"use_bfloat16": false,
|
| 91 |
"use_cache": false,
|
|
|
|
| 174 |
"top_p": 1.0,
|
| 175 |
"torch_dtype": null,
|
| 176 |
"torchscript": false,
|
| 177 |
+
"transformers_version": "4.32.0.dev0",
|
| 178 |
"typical_p": 1.0,
|
| 179 |
"use_bfloat16": false
|
| 180 |
}
|
generation_config.json
CHANGED
|
@@ -3,6 +3,6 @@
|
|
| 3 |
"decoder_start_token_id": 0,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
"use_cache": false
|
| 8 |
}
|
|
|
|
| 3 |
"decoder_start_token_id": 0,
|
| 4 |
"eos_token_id": 1,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.32.0.dev0",
|
| 7 |
"use_cache": false
|
| 8 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1129967041
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4e88560f1fb4b56be53123d65785bec6a9eb4c13fef0e9a128b7dafa3b033d8
|
| 3 |
size 1129967041
|