Image-Text-to-Text
Transformers
Safetensors
mmMamba_chat
feature-extraction
conversational
custom_code
Instructions to use hustvl/mmMamba-linear with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hustvl/mmMamba-linear with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hustvl/mmMamba-linear", trust_remote_code=True) 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("hustvl/mmMamba-linear", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hustvl/mmMamba-linear with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hustvl/mmMamba-linear" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hustvl/mmMamba-linear", "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/hustvl/mmMamba-linear
- SGLang
How to use hustvl/mmMamba-linear 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 "hustvl/mmMamba-linear" \ --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": "hustvl/mmMamba-linear", "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 "hustvl/mmMamba-linear" \ --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": "hustvl/mmMamba-linear", "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 hustvl/mmMamba-linear with Docker Model Runner:
docker model run hf.co/hustvl/mmMamba-linear
Add metadata tags and link to code
Browse filesThis PR adds the relevant metadata (library name and pipeline tag) to the model card. It also adds a link to the Github repository.
README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
| 4 |
# mmMamba-linear Model Card
|
| 5 |
|
| 6 |
## Introduction
|
|
@@ -11,11 +14,13 @@ Distilled from the decoder-only HoVLE-2.6B, our pure Mamba-2-based mmMamba-linea
|
|
| 11 |
<div align="center">
|
| 12 |
<img src="teaser.png" />
|
| 13 |
|
| 14 |
-
|
| 15 |
<b>Seeding strategy and three-stage distillation pipeline of mmMamba.</b>
|
| 16 |
<img src="pipeline.png" />
|
| 17 |
</div>
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
## Quick Start Guide for mmMamba Inference
|
| 20 |
|
| 21 |
We provide example code to run mmMamba inference using the Transformers library.
|
|
@@ -41,7 +46,6 @@ Below are the primary dependencies required for model inference:
|
|
| 41 |
- decord
|
| 42 |
- seaborn
|
| 43 |
|
| 44 |
-
|
| 45 |
### Inference with Transformers
|
| 46 |
|
| 47 |
```python
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: image-text-to-text
|
| 5 |
---
|
| 6 |
+
|
| 7 |
# mmMamba-linear Model Card
|
| 8 |
|
| 9 |
## Introduction
|
|
|
|
| 14 |
<div align="center">
|
| 15 |
<img src="teaser.png" />
|
| 16 |
|
|
|
|
| 17 |
<b>Seeding strategy and three-stage distillation pipeline of mmMamba.</b>
|
| 18 |
<img src="pipeline.png" />
|
| 19 |
</div>
|
| 20 |
|
| 21 |
+
Paper: [](https://hf.co/papers/2502.13145)
|
| 22 |
+
Code: https://github.com/Hongyuan-Tao/mmMamba
|
| 23 |
+
|
| 24 |
## Quick Start Guide for mmMamba Inference
|
| 25 |
|
| 26 |
We provide example code to run mmMamba inference using the Transformers library.
|
|
|
|
| 46 |
- decord
|
| 47 |
- seaborn
|
| 48 |
|
|
|
|
| 49 |
### Inference with Transformers
|
| 50 |
|
| 51 |
```python
|