Instructions to use multimodalart/laguna-s-2.1-DFlash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use multimodalart/laguna-s-2.1-DFlash with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="multimodalart/laguna-s-2.1-DFlash", filename="laguna-s-2.1-DFlash-Q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use multimodalart/laguna-s-2.1-DFlash 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 multimodalart/laguna-s-2.1-DFlash:Q8_0 # Run inference directly in the terminal: llama cli -hf multimodalart/laguna-s-2.1-DFlash:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf multimodalart/laguna-s-2.1-DFlash:Q8_0 # Run inference directly in the terminal: llama cli -hf multimodalart/laguna-s-2.1-DFlash:Q8_0
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 multimodalart/laguna-s-2.1-DFlash:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf multimodalart/laguna-s-2.1-DFlash:Q8_0
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 multimodalart/laguna-s-2.1-DFlash:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf multimodalart/laguna-s-2.1-DFlash:Q8_0
Use Docker
docker model run hf.co/multimodalart/laguna-s-2.1-DFlash:Q8_0
- LM Studio
- Jan
- Ollama
How to use multimodalart/laguna-s-2.1-DFlash with Ollama:
ollama run hf.co/multimodalart/laguna-s-2.1-DFlash:Q8_0
- Unsloth Studio
How to use multimodalart/laguna-s-2.1-DFlash 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 multimodalart/laguna-s-2.1-DFlash 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 multimodalart/laguna-s-2.1-DFlash to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for multimodalart/laguna-s-2.1-DFlash to start chatting
- Atomic Chat new
- Docker Model Runner
How to use multimodalart/laguna-s-2.1-DFlash with Docker Model Runner:
docker model run hf.co/multimodalart/laguna-s-2.1-DFlash:Q8_0
- Lemonade
How to use multimodalart/laguna-s-2.1-DFlash with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull multimodalart/laguna-s-2.1-DFlash:Q8_0
Run and chat with the model
lemonade run user.laguna-s-2.1-DFlash-Q8_0
List all available models
lemonade list
Laguna S 2.1 DFlash drafter — Q8_0 GGUF (+ Apple Silicon recipe)
Q8_0 quantization of the Laguna S 2.1
DFlash speculative-decoding drafter from
poolside/Laguna-S-2.1-GGUF
(post the metadata fix in
discussion #12),
for llama.cpp (poolside fork, branch laguna).
laguna-s-2.1-DFlash-Q8_0.gguf— 1.1 GB, half the weight reads per draft round vs BF16. Drafter quantization cannot affect output quality (all drafts are verified by the target model); measured acceptance is identical to BF16 (77.8% on a 7K-context coding A/B).
History
The originally shipped drafter GGUF was missing dflash.attention.sliding_window — the
drafter ran full attention while trained with a 512 sliding window, so draft acceptance
collapsed with context length (27% at 767 tokens → 1.2% at 7K), making DFlash a net
slowdown on long prompts. Upstream fixed this in discussion #12; this repo's Q8_0 is
quantized from the fixed file. (Note: the GGUF's rope.freq_base = 500000 differs from
Laguna-S-2.1-DFlash-NVFP4's
rope_theta = 10000, but these are different drafter checkpoints — the weights don't
match — each quantization-matched to its target and internally consistent. A/B on the GGUF
pairing confirms 500000 is its trained value: 77.8% vs 71.6% acceptance.)
Usage (Apple Silicon recipe)
Verify batches on this fine-grained MoE are expensive on memory-bound hardware, so shallow adaptive drafting wins — measured ~1.25× over base decoding on an M4 Max 128GB at ~10K context:
./build/bin/llama-server -m laguna-s-2.1-Q4_K_M.gguf \
-md laguna-s-2.1-DFlash-Q8_0.gguf \
--spec-type draft-dflash --spec-draft-n-max 2 --spec-draft-p-min 0.5 \
-fa on --jinja -c 262144 -ub 4096 --cache-reuse 256 --port 8000
On CUDA-class hardware use the model card's --spec-draft-n-max 15 instead.
Related llama.cpp work (branch
apolinario/llama.cpp@laguna,
partially upstreamed via
poolsideai/llama.cpp#2): Metal
f16-overflow sanitization of DFlash target features and two Metal decode optimizations
(~+10%).
- Downloads last month
- 512
8-bit