Instructions to use JefferyZhan/Griffon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JefferyZhan/Griffon with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JefferyZhan/Griffon")# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("JefferyZhan/Griffon") model = AutoModelForCausalLM.from_pretrained("JefferyZhan/Griffon") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use JefferyZhan/Griffon with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JefferyZhan/Griffon" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JefferyZhan/Griffon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JefferyZhan/Griffon
- SGLang
How to use JefferyZhan/Griffon 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 "JefferyZhan/Griffon" \ --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": "JefferyZhan/Griffon", "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 "JefferyZhan/Griffon" \ --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": "JefferyZhan/Griffon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JefferyZhan/Griffon with Docker Model Runner:
docker model run hf.co/JefferyZhan/Griffon
Improve model card: Add pipeline tag, library, paper, GitHub, and usage
#1
by nielsr HF Staff - opened
This PR significantly enhances the model card for the Griffon v2 model, aligning it with Hugging Face Hub best practices.
Specifically, it:
- Adds the
pipeline_tag: image-text-to-textto improve discoverability for visual-language tasks. - Specifies
library_name: transformersto indicate compatibility with the Hugging Face Transformers library and enable the "How to use" widget. - Includes a prominent link to the official paper: Griffon v2: Advancing Multimodal Perception with High-Resolution Scaling and Visual-Language Co-Referring.
- Provides a direct link to the official GitHub repository: https://github.com/jefferyZhan/Griffon.
- Adds a comprehensive "Quick Start" section with a Python code snippet, demonstrating how to load and use the model with
transformers. - Includes the appropriate BibTeX citation for the Griffon v2 paper.
Please review these improvements.