Instructions to use Mharbulous/moondream2-syncopaid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Mharbulous/moondream2-syncopaid with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mharbulous/moondream2-syncopaid:F16 # Run inference directly in the terminal: llama cli -hf Mharbulous/moondream2-syncopaid:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mharbulous/moondream2-syncopaid:F16 # Run inference directly in the terminal: llama cli -hf Mharbulous/moondream2-syncopaid:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Mharbulous/moondream2-syncopaid:F16 # Run inference directly in the terminal: ./llama-cli -hf Mharbulous/moondream2-syncopaid:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Mharbulous/moondream2-syncopaid:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mharbulous/moondream2-syncopaid:F16
Use Docker
docker model run hf.co/Mharbulous/moondream2-syncopaid:F16
- LM Studio
- Jan
- vLLM
How to use Mharbulous/moondream2-syncopaid with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mharbulous/moondream2-syncopaid" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mharbulous/moondream2-syncopaid", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mharbulous/moondream2-syncopaid:F16
- Ollama
How to use Mharbulous/moondream2-syncopaid with Ollama:
ollama run hf.co/Mharbulous/moondream2-syncopaid:F16
- Unsloth Studio
How to use Mharbulous/moondream2-syncopaid with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mharbulous/moondream2-syncopaid to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mharbulous/moondream2-syncopaid to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mharbulous/moondream2-syncopaid to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Mharbulous/moondream2-syncopaid with Docker Model Runner:
docker model run hf.co/Mharbulous/moondream2-syncopaid:F16
- Lemonade
How to use Mharbulous/moondream2-syncopaid with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mharbulous/moondream2-syncopaid:F16
Run and chat with the model
lemonade run user.moondream2-syncopaid-F16
List all available models
lemonade list
| from dataclasses import dataclass, field | |
| from typing import Dict, List, Optional | |
| class TextConfig: | |
| dim: int = 2048 | |
| ff_dim: int = 8192 | |
| n_layers: int = 24 | |
| vocab_size: int = 51200 | |
| max_context: int = 2048 | |
| n_heads: int = 32 | |
| n_kv_heads: int = 32 | |
| prefix_attn: int = 730 | |
| group_size: Optional[int] = None | |
| class VisionConfig: | |
| enc_dim: int = 1152 | |
| enc_patch_size: int = 14 | |
| enc_n_layers: int = 27 | |
| enc_ff_dim: int = 4304 | |
| enc_n_heads: int = 16 | |
| proj_out_dim: int = 2048 | |
| crop_size: int = 378 | |
| in_channels: int = 3 | |
| max_crops: int = 12 | |
| overlap_margin: int = 4 | |
| proj_inner_dim: int = 8192 | |
| class RegionConfig: | |
| dim: int = 2048 | |
| coord_feat_dim: int = 256 | |
| coord_out_dim: int = 1024 | |
| size_feat_dim: int = 512 | |
| size_out_dim: int = 2048 | |
| inner_dim: int = 8192 | |
| group_size: Optional[int] = None | |
| class TokenizerConfig: | |
| bos_id: int = 0 | |
| eos_id: int = 0 | |
| answer_id: int = 3 | |
| thinking_id: int = 4 | |
| coord_id: int = 5 | |
| size_id: int = 6 | |
| start_ground_points_id: int = 7 | |
| end_ground_id: int = 9 | |
| templates: Dict[str, Optional[Dict[str, List[int]]]] = field( | |
| default_factory=lambda: { | |
| "caption": { | |
| "short": [1, 32708, 2, 12492, 3], | |
| "normal": [1, 32708, 2, 6382, 3], | |
| "long": [1, 32708, 2, 4059, 3], | |
| }, | |
| "query": {"prefix": [1, 15381, 2], "suffix": [3]}, | |
| "detect": {"prefix": [1, 7235, 476, 2], "suffix": [3]}, | |
| "point": {"prefix": [1, 2581, 2], "suffix": [3]}, | |
| } | |
| ) | |
| class MoondreamConfig: | |
| text: TextConfig = TextConfig() | |
| vision: VisionConfig = VisionConfig() | |
| region: RegionConfig = RegionConfig() | |
| tokenizer: TokenizerConfig = TokenizerConfig() | |
| def from_dict(cls, config_dict: dict): | |
| text_config = TextConfig(**config_dict.get("text", {})) | |
| vision_config = VisionConfig(**config_dict.get("vision", {})) | |
| region_config = RegionConfig(**config_dict.get("region", {})) | |
| tokenizer_config = TokenizerConfig(**config_dict.get("tokenizer", {})) | |
| return cls( | |
| text=text_config, | |
| vision=vision_config, | |
| region=region_config, | |
| tokenizer=tokenizer_config, | |
| ) | |
| def to_dict(self): | |
| return { | |
| "text": self.text.__dict__, | |
| "vision": self.vision.__dict__, | |
| "region": self.region.__dict__, | |
| "tokenizer": self.tokenizer.__dict__, | |
| } | |