Instructions to use luoruipu1/Volcano-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use luoruipu1/Volcano-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="luoruipu1/Volcano-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("luoruipu1/Volcano-7b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use luoruipu1/Volcano-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "luoruipu1/Volcano-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "luoruipu1/Volcano-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/luoruipu1/Volcano-7b
- SGLang
How to use luoruipu1/Volcano-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 "luoruipu1/Volcano-7b" \ --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": "luoruipu1/Volcano-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "luoruipu1/Volcano-7b" \ --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": "luoruipu1/Volcano-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use luoruipu1/Volcano-7b with Docker Model Runner:
docker model run hf.co/luoruipu1/Volcano-7b
Add model card and metadata
#1
by nielsr HF Staff - opened
README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: image-text-to-text
|
| 3 |
+
library_name: transformers
|
| 4 |
+
license: mit # Please verify license in the repository
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# VoCoT: Unleashing Visually Grounded Multi-Step Reasoning in Large Multi-Modal Models
|
| 8 |
+
|
| 9 |
+
This model, VolCano, is presented in the paper [VoCoT: Unleashing Visually Grounded Multi-Step Reasoning in Large Multi-Modal Models](https://arxiv.org/abs/2405.16919) and is designed for multi-step visually grounded reasoning.
|
| 10 |
+
|
| 11 |
+
Code and further details are available at: https://github.com/RupertLuo/VoCoT
|
| 12 |
+
|
| 13 |
+
## Quick Start
|
| 14 |
+
|
| 15 |
+
This example demonstrates basic usage. For more details, please refer to the project's GitHub repository.
|
| 16 |
+
|
| 17 |
+
```python
|
| 18 |
+
from model.load_model import load_model, infer
|
| 19 |
+
from PIL import Image
|
| 20 |
+
|
| 21 |
+
# loading the model
|
| 22 |
+
model_path = 'luoruipu1/Volcano-7b'
|
| 23 |
+
model, preprocessor = load_model(model_path, precision='fp16')
|
| 24 |
+
|
| 25 |
+
# perform reasoning, activate VoCoT by passing cot=True
|
| 26 |
+
input_image = Image.open('figs/sample_input.jpg')
|
| 27 |
+
response = infer(model, preprocessor, input_image, 'Describe the image.', cot=True)
|
| 28 |
+
print('response: ', response[0])
|
| 29 |
+
```
|