Instructions to use sunshine-lwt/Osprey-Chat-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sunshine-lwt/Osprey-Chat-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sunshine-lwt/Osprey-Chat-7b")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("sunshine-lwt/Osprey-Chat-7b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sunshine-lwt/Osprey-Chat-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sunshine-lwt/Osprey-Chat-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sunshine-lwt/Osprey-Chat-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sunshine-lwt/Osprey-Chat-7b
- SGLang
How to use sunshine-lwt/Osprey-Chat-7b 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 "sunshine-lwt/Osprey-Chat-7b" \ --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": "sunshine-lwt/Osprey-Chat-7b", "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 "sunshine-lwt/Osprey-Chat-7b" \ --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": "sunshine-lwt/Osprey-Chat-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sunshine-lwt/Osprey-Chat-7b with Docker Model Runner:
docker model run hf.co/sunshine-lwt/Osprey-Chat-7b
Add comprehensive model card for Osprey
#2
by nielsr HF Staff - opened
This PR adds a comprehensive model card for the Osprey model, significantly improving its documentation on the Hugging Face Hub.
Key improvements include:
- Linking the model to its official paper: Osprey: Pixel Understanding with Visual Instruction Tuning.
- Including the paper's abstract for quick understanding.
- Adding
pipeline_tag: image-text-to-textto enable discoverability on the Hub. - Specifying
library_name: transformersbased on theLlavaLlamaForCausalLMarchitecture found inconfig.json, integrating it with the Hugging Facetransformerslibrary ecosystem. - Including a link to the official GitHub repository for code access and further details.
- Incorporating a detailed introduction, core features, and the complete "Try Our Demo" section (online and offline demo setup) directly from the original GitHub repository to provide robust usage instructions.
- All relevant sections from the GitHub README have been adapted to the model card for a holistic view.
Please review and merge this PR to enhance the model's documentation on the Hugging Face Hub.