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
I think I've pinned down good sampler settings! Someone please sanity check
After a ton of testing back and forth, I think I've got some good sampler settings. Make sure you use the latest GGUF. I'm going to post the full llama.cpp launch arg just for reference, but the sampler settings and f16 kv cache are the important bits:
llama-server.exe -c 256000 -b 2048 -ub 512 --load-mode dio -cram 8192 --poll 50 -ngl auto -mg 0 -fa auto -kvo --no-repack --op-offload -fit on -fitt 1024 -fitc 256000 --mmproj-offload --temp 0.85 --top-k 0 --top-p 0.95 --min-p 0 --repeat-last-n 64 -rea auto --reasoning-budget 8192 --reasoning-budget-message I’ve thought long enough. --reasoning-preserve --jinja -ctk f16 -ctv f16 --kv-unified --host 127.0.0.1 --port 8080 -np -1 -cb --cache-prompt --cache-idle-slots --slots -to 3600 --metrics --webui -sps 0.1 -lv 3 --log-colors auto --warmup -m models/laguna-s-2.1-Q4_K_M.gguf
--top-k 0 sounds a bit odd, but will give it a try too now
Yeah basically just disabling top-k. I'm also not using Dflash at the moment so your mileage may vary if you use that.
I tested it with Myric/Laguna-S-2.1-APEX-GGUF (quality) and it was a little worse there, but that is a higher quant. Also tested with dealignai/Laguna-S-2.1-CRACK-GGUF (Q4_K_M) an it works well, even slightly better based on quick vibes. This makes me think this model is really sensitive to quantization and we'd probably have to find optimal sampler settings for the other quants.
I cannot tell if I see any difference with topk on 0
Ran a controlled measurement on these settings — I've been chasing the same intermittent "reasons a long time, then stops without emitting the tool call" behavior, so I put numbers on it. Sharing in case it's useful.
Setup: llama.cpp (poolside laguna fork), laguna-s-2.1-Q4_K_M.gguf @ 256k, -fa on, q8_0 KV. One identical single-turn edit request (expects a tool call), replayed N=12 per setting. Metric: emitted ≥1 tool call ("commit") vs stopped after reasoning with none.
| Setting | Commit | fail split (stop / length) |
|---|---|---|
| temp 0.7, top_p 0.95 (default) | 3/12 (25%) | 8 / 1 |
| your recipe (temp 0.85, top-k 0, min-p 0, repeat-last-n 64 @ 1.1) | 4/12 (33%) | 5 / 3 |
| temp 0.3 | 1/12 (8%) | 10 / 1 |
Observations:
- Your recipe vs default is flat (Fisher exact ≈ 1.0) at N=12 — no measurable harm, but I couldn't confirm a commit-rate gain either.
- temp 0.3 was worse — cooling seems to lock in the modal trajectory, which here is the early stop.
- Across all 36 draws, every commit came from a long reasoning trace (14–61k chars) that then acted; failures mostly quit under 30k. Committing seems to need diverging from the most-likely short-stop path — argues for more entropy, not less.
- The repetition penalty tripled finish=length (loop-till-budget) — feeds the long-loop mode rather than breaking it.
Net, on this quant, sampler settings didn't move the commit rate off ~25% — the stop-after-reasoning looks weights/decoding-level rather than tuning-fixable. Curious whether others see the same. Thanks for kicking off the settings thread!
I have been testing every single update since this model's release but have had no success. I think I will now wait for the updated weights by poolside team before I touch this model again. If they are able to solve it then this is perfect for the M5 Max 128gb.
I tried many setting till it ran with somewhat usable speeds on my Strix Halo AI Max 395. Below are the flags i am using at the moment, getting about 15 t/s avg while decoding.
KV type f16 was faster then q8_0. For spec draft, n-max 3 was my sweet spot with ~45% acc rate avg, with n-max 2 being at ~30% and n-max 4+ also starting at 30% and going down as the max goes up.
Last, the context size would work for me with 512k, but leaving only 10gb ram free, so atm i use 384k.
-m ../laguna-s-2.1-Q4_K_M.gguf --alias Laguna-S-2.1-Q4 --chat-template-file ../chat_template.jinja -md ../laguna-s-2.1-DFlash-BF16.gguf --spec-type draft-dflash --spec-draft-n-min 1 --spec-draft-n-max 3 -c 393216 -fa on -ngl 999 --no-mmap --cache-type-k f16 --cache-type-v f16 --cache-ram 16384 --jinja --reasoning on --no-warmup -b 2048 -ub 2048 --ctx-checkpoints 2 --kv-unified -np 1 -t 16 --host 0.0.0.0 --metrics --port 8081 --sleep-idle-seconds 900 --temp 1.0 --top-p 1.0 --top-k 20 --min-p 0.00 --presence-penalty 0.0 --repeat-penalty 1.0
I think people seeing reasoning go off the rails are messing with batch size. In my experience, leaving that at 512 is the ticket to keeping it from reasoning itself off the rails, once I kept -b at 512 and -ub at 2048 I stopped having to do all the shenanigans with top-p/top-k and penalties.
Ran a controlled measurement on these settings — I've been chasing the same intermittent "reasons a long time, then stops without emitting the tool call" behavior, so I put numbers on it. Sharing in case it's useful.
Setup: llama.cpp (poolside laguna fork), laguna-s-2.1-Q4_K_M.gguf @ 256k, -fa on, q8_0 KV. One identical single-turn edit request (expects a tool call), replayed N=12 per setting. Metric: emitted ≥1 tool call ("commit") vs stopped after reasoning with none.
Setting Commit fail split (stop / length) temp 0.7, top_p 0.95 (default) 3/12 (25%) 8 / 1 your recipe (temp 0.85, top-k 0, min-p 0, repeat-last-n 64 @ 1.1) 4/12 (33%) 5 / 3 temp 0.3 1/12 (8%) 10 / 1 Observations:
- Your recipe vs default is flat (Fisher exact ≈ 1.0) at N=12 — no measurable harm, but I couldn't confirm a commit-rate gain either.
- temp 0.3 was worse — cooling seems to lock in the modal trajectory, which here is the early stop.
- Across all 36 draws, every commit came from a long reasoning trace (14–61k chars) that then acted; failures mostly quit under 30k. Committing seems to need diverging from the most-likely short-stop path — argues for more entropy, not less.
- The repetition penalty tripled finish=length (loop-till-budget) — feeds the long-loop mode rather than breaking it.
Net, on this quant, sampler settings didn't move the commit rate off ~25% — the stop-after-reasoning looks weights/decoding-level rather than tuning-fixable. Curious whether others see the same. Thanks for kicking off the settings thread!
I have been testing every single update since this model's release but have had no success. I think I will now wait for the updated weights by poolside team before I touch this model again. If they are able to solve it then this is perfect for the M5 Max 128gb.
Thanks for all the effort, just a clarification - repeat-last-n defaults to 64 in llama.cpp but is only active if repeat penalty is set above 1 (which is deactivated). The GUI I use for llama.cpp still outputs the repeat last n regardless of whether repeat penalty is active or not. It has no effect if it isn't active.