Instructions to use poolside/Laguna-S-2.1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use poolside/Laguna-S-2.1-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="poolside/Laguna-S-2.1-GGUF", filename="laguna-s-2.1-DFlash-BF16.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 poolside/Laguna-S-2.1-GGUF 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 poolside/Laguna-S-2.1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
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 poolside/Laguna-S-2.1-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
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 poolside/Laguna-S-2.1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/poolside/Laguna-S-2.1-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use poolside/Laguna-S-2.1-GGUF with Ollama:
ollama run hf.co/poolside/Laguna-S-2.1-GGUF:Q4_K_M
- Unsloth Studio
How to use poolside/Laguna-S-2.1-GGUF 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 poolside/Laguna-S-2.1-GGUF 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 poolside/Laguna-S-2.1-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for poolside/Laguna-S-2.1-GGUF to start chatting
- Pi
How to use poolside/Laguna-S-2.1-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "poolside/Laguna-S-2.1-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use poolside/Laguna-S-2.1-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default poolside/Laguna-S-2.1-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use poolside/Laguna-S-2.1-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf poolside/Laguna-S-2.1-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "poolside/Laguna-S-2.1-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use poolside/Laguna-S-2.1-GGUF with Docker Model Runner:
docker model run hf.co/poolside/Laguna-S-2.1-GGUF:Q4_K_M
- Lemonade
How to use poolside/Laguna-S-2.1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull poolside/Laguna-S-2.1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Laguna-S-2.1-GGUF-Q4_K_M
List all available models
lemonade list
Prefill slowdown
Hi. The prefill speed on Ryzen AI MAX 395 is starting very fast but is slowing down rapidly in llama.cpp:
n_tokens = 2048, progress = 0.03, t = 4.79 s / 427.87 tokens per second
n_tokens = 4096, progress = 0.06, t = 11.20 s / 365.75 tokens per second
n_tokens = 6144, progress = 0.09, t = 18.03 s / 340.81 tokens per second
n_tokens = 8192, progress = 0.12, t = 25.44 s / 321.97 tokens per second
n_tokens = 10240, progress = 0.15, t = 33.43 s / 306.33 tokens per second
n_tokens = 12288, progress = 0.18, t = 42.39 s / 289.90 tokens per second
n_tokens = 14336, progress = 0.21, t = 53.12 s / 269.85 tokens per second
n_tokens = 16384, progress = 0.24, t = 65.69 s / 249.41 tokens per second
n_tokens = 18432, progress = 0.27, t = 80.67 s / 228.50 tokens per second
n_tokens = 20480, progress = 0.30, t = 96.40 s / 212.46 tokens per second
n_tokens = 22528, progress = 0.33, t = 115.42 s / 195.19 tokens per second
n_tokens = 24576, progress = 0.36, t = 137.20 s / 179.12 tokens per second
n_tokens = 26624, progress = 0.39, t = 162.54 s / 163.80 tokens per second
n_tokens = 28672, progress = 0.41, t = 191.06 s / 150.07 tokens per second
n_tokens = 30720, progress = 0.44, t = 224.39 s / 136.91 tokens per second
n_tokens = 32768, progress = 0.47, t = 259.16 s / 126.44 tokens per second
n_tokens = 34816, progress = 0.50, t = 298.95 s / 116.46 tokens per second
n_tokens = 36864, progress = 0.53, t = 341.22 s / 108.04 tokens per second
n_tokens = 38912, progress = 0.56, t = 389.52 s / 99.90 tokens per second
n_tokens = 40960, progress = 0.59, t = 443.73 s / 92.31 tokens per second
n_tokens = 43008, progress = 0.62, t = 498.41 s / 86.29 tokens per second
n_tokens = 45056, progress = 0.65, t = 560.22 s / 80.43 tokens per second
Is it expected behavior for model's attention, or there is a remedy for it?
Hi @vstiff , thanks for starting this thread. We're looking into it and will release a patch soon and I'll update you.
Hi @vstiff , I haven't managed to replicate prefill TPS decrease on any of NV HW but haven't tested Ryzen AI MAX 395 yet. Can you please share your server command while I'll investigate that platform? Have you enabled DFlash for your S 2.1 tests? Where the other two models running with any speculative decoding model?
llama.cpp build b10088-67b9b0e7f , using Vulkan because ROCm build from github release is 10-20% slower.
cmake llama.cpp -B llama.cpp/build -DBUILD_SHARED_LIBS=OFF -DGGML_HIP=OFF -DGGML_VULKAN=ON
cmake --build llama.cpp/build --config Release -j --clean-first --target llama-cli llama-mtmd-cli llama-server llama-gguf-split
Laguna start args:
llama-server \
--host 0.0.0.0 --threads-http 4 --alias llm \
-hf unsloth/Laguna-S-2.1-GGUF:Q4_K_XL \
-np 1 -fa on --ctx-size 262144 --swa-checkpoints 2 \
--reasoning-preserve \
--no-mmap --keep 10000
Removing --swa-checkpoints doesn't change anything in prefill, it was required for Gemma with similar attention, so I used it as a starting point. --reasoning-preserve is added to "debug" non-thinking mode in llama web UI, doesn't change anything in that regard.
I skipped DFlash for first tests because decoding was already quite decent, and because of this comment: https://github.com/ggml-org/llama.cpp/pull/25165#issuecomment-5043878753 haven't tried yet. But it seems like shouldn't affect prefill speed. I just noticed mistake on the chart, it's input tokens, not output. With --ubatch-size 256 Laguna roughly follows Gemma @ 256 line slope:
Other 2 have MTP, Gemma (it's prefill speed is not affected by mtp):
llama-server \
--host 0.0.0.0 --threads-http 4 --alias llm \
-hf unsloth/gemma-4-31B-it-qat-GGUF:UD-Q4_K_XL \
-np 1 -fa on --ctx-size 262144 --swa-checkpoints 2 \
--ubatch-size 256 \
--spec-type draft-mtp --spec-draft-n-max 3
--no-mmap --keep 10000
Qwen (works ok out of the box, didn't experiment with prefill speed, actually in this build Qwen is about ~5tps higher prefill, plotted some previous version):
llama-server \
--host 0.0.0.0 --threads-http 4 --alias llm \
-hf "unsloth/Qwen3.5-122B-A10B-MTP-GGUF:UD-Q4_K_XL" \
-np 1 --ctx-size 262144 \
--spec-type draft-mtp --spec-draft-n-max 3 \
--no-mmap --keep 10000

