Instructions to use psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL
- SGLang
How to use psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL 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 "psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL with Docker Model Runner:
docker model run hf.co/psp-dada/Qwen2.5-VL-7B-Instruct-SENTINEL
Improve model card: Add library name, key features, and usage example
#1
by nielsr HF Staff - opened
This PR significantly enhances the model card by:
- Adding
library_name: transformersto the metadata. This enables the "How to use" widget on the Hugging Face Hub, making the model more discoverable and user-friendly with direct code examples. - Expanding the model card's content to provide a comprehensive overview. This includes:
- An introduction summarizing the model's purpose, derived from the paper's abstract.
- Detailed "Key Features" explaining the core contributions of the SENTINEL framework.
- A practical Python code snippet for loading and inferring with the model using
transformersandpeft. - Information about the associated
SENTINEL Dataset. - A section for
Acknowledgementto credit related projects. - The
Citationinformation for proper attribution.
These improvements draw directly from the rich information available in the project's GitHub repository, ensuring the Hugging Face Hub page serves as a primary source of information for researchers and developers.
Thanks a lot!
psp-dada changed pull request status to closed