Instructions to use moondream/moondream-next with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moondream/moondream-next with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moondream/moondream-next", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("moondream/moondream-next", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moondream/moondream-next with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moondream/moondream-next" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moondream/moondream-next", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/moondream/moondream-next
- SGLang
How to use moondream/moondream-next 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 "moondream/moondream-next" \ --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": "moondream/moondream-next", "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 "moondream/moondream-next" \ --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": "moondream/moondream-next", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use moondream/moondream-next with Docker Model Runner:
docker model run hf.co/moondream/moondream-next
Upload merged OPD RL weights
Browse files- manifest.json +36 -0
- model.pt +3 -0
- model.pt.sha256 +1 -0
manifest.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model": "/root/.cache/huggingface/hub/models--moondream--moondream3-preview/snapshots/5112966d1a723413b1c9a1e8bea272b72e647b35/model_fp8.pt",
|
| 3 |
+
"lora_ckpt": "/workspace/evals/merged-opd-rl/source/multi-rl-from-opd-dual-r512-p64-step000004002-ckpt.pt",
|
| 4 |
+
"source_run": "multi-rl-from-opd-dual-r512-p64-4k-20260617-235617",
|
| 5 |
+
"source_step": 4002,
|
| 6 |
+
"output": "/workspace/evals/merged-opd-rl/output/moondream3-preview__multi-rl-from-opd-dual-r512-p64-4k-20260617-235617__step-000004002/model.pt",
|
| 7 |
+
"dense_layers": [
|
| 8 |
+
0,
|
| 9 |
+
1,
|
| 10 |
+
2,
|
| 11 |
+
3
|
| 12 |
+
],
|
| 13 |
+
"moe_layers": [
|
| 14 |
+
4,
|
| 15 |
+
5,
|
| 16 |
+
6,
|
| 17 |
+
7,
|
| 18 |
+
8,
|
| 19 |
+
9,
|
| 20 |
+
10,
|
| 21 |
+
11,
|
| 22 |
+
12,
|
| 23 |
+
13,
|
| 24 |
+
14,
|
| 25 |
+
15,
|
| 26 |
+
16,
|
| 27 |
+
17,
|
| 28 |
+
18,
|
| 29 |
+
19,
|
| 30 |
+
20,
|
| 31 |
+
21,
|
| 32 |
+
22,
|
| 33 |
+
23
|
| 34 |
+
],
|
| 35 |
+
"format": "md3_flat_bf16_moe_merged"
|
| 36 |
+
}
|
model.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55149f2a0999a26b84fe4af63c24782548fdcf86610e21b768f0b381a28bb373
|
| 3 |
+
size 18537525163
|
model.pt.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
55149f2a0999a26b84fe4af63c24782548fdcf86610e21b768f0b381a28bb373 /workspace/evals/merged-opd-rl/output/moondream3-preview__multi-rl-from-opd-dual-r512-p64-4k-20260617-235617__step-000004002/model.pt
|