Instructions to use nielsr/pix2seq-simple with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nielsr/pix2seq-simple with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nielsr/pix2seq-simple")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("nielsr/pix2seq-simple", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nielsr/pix2seq-simple with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nielsr/pix2seq-simple" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nielsr/pix2seq-simple", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nielsr/pix2seq-simple
- SGLang
How to use nielsr/pix2seq-simple 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 "nielsr/pix2seq-simple" \ --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": "nielsr/pix2seq-simple", "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 "nielsr/pix2seq-simple" \ --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": "nielsr/pix2seq-simple", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nielsr/pix2seq-simple with Docker Model Runner:
docker model run hf.co/nielsr/pix2seq-simple
Download pytorch_model.bin from nielsr/pix2seq-simple: direct link, hf CLI and curl.
- Browser
- Download file 467 MB
-
https://huggingface.co/nielsr/pix2seq-simple/resolve/main/pytorch_model.bin
- Command line
-
hf download hf://nielsr/pix2seq-simple/pytorch_model.bin
-
curl -L -o pytorch_model.bin https://huggingface.co/nielsr/pix2seq-simple/resolve/main/pytorch_model.bin
467 MB
- Xet hash:
- a7fd3cb173d140b78744b87e4f573b1812ac6ea186fca59c585ffc0483048ed8
- Size of remote file:
- 467 MB
- SHA256:
- 18b84ea2f6be34def678472dd71ac858efea8abff841af65ebcd29d11c847e8b
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.