Instructions to use ybelkada/pix2struct-base-football with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ybelkada/pix2struct-base-football with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ybelkada/pix2struct-base-football")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("ybelkada/pix2struct-base-football") model = AutoModelForImageTextToText.from_pretrained("ybelkada/pix2struct-base-football") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ybelkada/pix2struct-base-football with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ybelkada/pix2struct-base-football" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ybelkada/pix2struct-base-football", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ybelkada/pix2struct-base-football
- SGLang
How to use ybelkada/pix2struct-base-football 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 "ybelkada/pix2struct-base-football" \ --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": "ybelkada/pix2struct-base-football", "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 "ybelkada/pix2struct-base-football" \ --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": "ybelkada/pix2struct-base-football", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ybelkada/pix2struct-base-football with Docker Model Runner:
docker model run hf.co/ybelkada/pix2struct-base-football
- Xet hash:
- 7ede68b1d13183dab6ea2237b30110c9ba3d06672d876bd134f32cc03110f370
- Size of remote file:
- 1.13 GB
- SHA256:
- 639bb21dc702ae09f0bccdecabd772fa9609984f21b773456cb3523d939943da
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.