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
Commit History
-
Add safetensors summary
Verified signaturea5b63b4 -
Add FP8 repair summary
Verified signature26d7192 -
Update model manifest
Verified signature9b6830e -
Update model checksum
Verified signature9671b8f -
Requantize merged MoE experts to FP8
Verified signature6671007 -
Requantize merged MoE experts to FP8
Verified signature8c1ddbb
-
add safetensors weights
Verified signature2e20db6
-
Update model.pt
Verified signaturea220050
-
Upload merged OPD RL weights
Verified signature9ca19fc
-
Upload HfMoondream
Verified signature71571da -
Upload HfMoondream
Verified signature017939f -
Upload HfMoondream
Verified signature66deb39 -
Upload HfMoondream
Verified signature89bf2e9 -
Delete model.safetensors
Verified signature8cab309 -
Upload HfMoondream
Verified signaturef252685 -
Upload HfMoondream
Verified signaturefb6af69 -
initial commit
Verified signature4547268