Image-Text-to-Text
Transformers
Safetensors
qwen3_5
decision-making
multimodal
structured-prediction
decision-model
conversational
Instructions to use internlm/Intern-Decision-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use internlm/Intern-Decision-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="internlm/Intern-Decision-4B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("internlm/Intern-Decision-4B") model = AutoModelForMultimodalLM.from_pretrained("internlm/Intern-Decision-4B", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use internlm/Intern-Decision-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "internlm/Intern-Decision-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/Intern-Decision-4B", "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/internlm/Intern-Decision-4B
- SGLang
How to use internlm/Intern-Decision-4B 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 "internlm/Intern-Decision-4B" \ --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": "internlm/Intern-Decision-4B", "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 "internlm/Intern-Decision-4B" \ --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": "internlm/Intern-Decision-4B", "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 internlm/Intern-Decision-4B with Docker Model Runner:
docker model run hf.co/internlm/Intern-Decision-4B
Add pipeline tag and paper link
#5
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
license: apache-2.0
|
| 4 |
base_model:
|
| 5 |
- Qwen/Qwen3.5-4B
|
|
|
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
- decision-making
|
| 8 |
- multimodal
|
|
@@ -12,7 +13,7 @@ tags:
|
|
| 12 |
|
| 13 |
# Intern-Decision-4B
|
| 14 |
|
| 15 |
-
[Demo](https://huggingface.co/spaces/internlm/intern-decision) | [Model Weights](https://huggingface.co/collections/internlm/intern-decision) | [GitHub](https://github.com/internlm/Intern-Decision)
|
| 16 |
|
| 17 |
**Intern-Decision-4B** is a multimodal structured decision model fine-tuned from
|
| 18 |
**[Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B)**.
|
|
@@ -226,4 +227,4 @@ Intern-Decision is derived from the Qwen3.5 series. The original Qwen license is
|
|
| 226 |
as [LICENSE-QWEN](LICENSE-QWEN). Retain the license and applicable
|
| 227 |
upstream notices when redistributing. These weights were modified by decision
|
| 228 |
tuning, and this release adds the structured inference wrapper and model card.
|
| 229 |
-
We thank the Qwen team for the original models and multimodal processor.
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
base_model:
|
| 3 |
- Qwen/Qwen3.5-4B
|
| 4 |
+
library_name: transformers
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
pipeline_tag: image-text-to-text
|
| 7 |
tags:
|
| 8 |
- decision-making
|
| 9 |
- multimodal
|
|
|
|
| 13 |
|
| 14 |
# Intern-Decision-4B
|
| 15 |
|
| 16 |
+
[Paper](https://huggingface.co/papers/2610.22131) | [Demo](https://huggingface.co/spaces/internlm/intern-decision) | [Model Weights](https://huggingface.co/collections/internlm/intern-decision) | [GitHub](https://github.com/internlm/Intern-Decision)
|
| 17 |
|
| 18 |
**Intern-Decision-4B** is a multimodal structured decision model fine-tuned from
|
| 19 |
**[Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B)**.
|
|
|
|
| 227 |
as [LICENSE-QWEN](LICENSE-QWEN). Retain the license and applicable
|
| 228 |
upstream notices when redistributing. These weights were modified by decision
|
| 229 |
tuning, and this release adds the structured inference wrapper and model card.
|
| 230 |
+
We thank the Qwen team for the original models and multimodal processor.
|