Instructions to use Myric/Laguna-S-2.1-APEX-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Myric/Laguna-S-2.1-APEX-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Myric/Laguna-S-2.1-APEX-GGUF", filename="Laguna-S-2.1-APEX-i-compact.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Myric/Laguna-S-2.1-APEX-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 Myric/Laguna-S-2.1-APEX-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Myric/Laguna-S-2.1-APEX-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf Myric/Laguna-S-2.1-APEX-GGUF: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 Myric/Laguna-S-2.1-APEX-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Myric/Laguna-S-2.1-APEX-GGUF: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 Myric/Laguna-S-2.1-APEX-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
Use Docker
docker model run hf.co/Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use Myric/Laguna-S-2.1-APEX-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Myric/Laguna-S-2.1-APEX-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Myric/Laguna-S-2.1-APEX-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
- Ollama
How to use Myric/Laguna-S-2.1-APEX-GGUF with Ollama:
ollama run hf.co/Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
- Unsloth Studio
How to use Myric/Laguna-S-2.1-APEX-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 Myric/Laguna-S-2.1-APEX-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 Myric/Laguna-S-2.1-APEX-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Myric/Laguna-S-2.1-APEX-GGUF to start chatting
- Pi
How to use Myric/Laguna-S-2.1-APEX-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
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": "Myric/Laguna-S-2.1-APEX-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Myric/Laguna-S-2.1-APEX-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 Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
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 Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Myric/Laguna-S-2.1-APEX-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
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 "Myric/Laguna-S-2.1-APEX-GGUF:Q8_0" \ --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 Myric/Laguna-S-2.1-APEX-GGUF with Docker Model Runner:
docker model run hf.co/Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
- Lemonade
How to use Myric/Laguna-S-2.1-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Myric/Laguna-S-2.1-APEX-GGUF:Q8_0
Run and chat with the model
lemonade run user.Laguna-S-2.1-APEX-GGUF-Q8_0
List all available models
lemonade list
Laguna-S-2.1 β APEX GGUF (with DFlash speculative decoding)
MoE-aware, mixed-precision APEX quantization of poolside/Laguna-S-2.1 β a 118B-total / ~8B-active open-weight agentic coding MoE (48 layers, 256 routed + 1 shared expert, top-10 routing, GQA with per-head softplus output gating, mixed sliding-window/global attention, 1M context).
APEX assigns quantization precision per tensor role and per layer instead of uniformly β keeping always-active shared experts and edge layers high-precision while compressing the sparse routed-expert middle layers hard. On a 256-expert MoE this is a large win: near-full-precision quality at a fraction of the size, and small enough to actually run this model locally.
Paired here with the DFlash speculative-decoding draft model for fast generation.
Disclaimer. Unofficial community quantization β not affiliated with or endorsed by Poolside or unsloth. Provided as-is, without warranty; validate before relying on it. Quality figures below are measured post-hoc (see Results). The i-mini (IQ2_S, 2-bit) tier is experimental and expected to degrade noticeably vs the larger tiers β treat it as a size/speed experiment, not a quality target. DFlash speculative decoding requires Poolside's llama.cpp fork (see Usage).
Quality gate (retrofit, added after initial publish): a true PPL-ratio still can't be measured here β the 235 GB bf16 baseline doesn't fit on the author's hardware even to run, not just to store, so the Results table below stays TBD as originally noted. What WAS run: real generation on a fixed prompt suite, and a 3-turn chained tool-calling test (a distractor tool offered but correctly never called) β all three tiers passed both, including i-mini, which this card's own disclaimer above flags as experimental / expected to degrade. In practice it held up: coherent, 3/3 on the harder tool-calling test. See GATE.md and TOOL_CALLING.md for full results and a reproducible transcript.
Results
Perplexity measured on wikitext-2-raw (test, 200 Γ 512-token windows) with
llama-perplexity. Pending β to be measured on-device; numbers below are filled in after the run.
| File | Size | PPL | Ξ vs BF16 |
|---|---|---|---|
| BF16 (reference baseline) | 235 GB | TBD | β |
| APEX-i-quality | 73.9 GB (5.03 BPW) | TBD | TBD |
| APEX-i-compact | 54.4 GB (3.70 BPW) | TBD | TBD |
| APEX-i-mini (experimental) | 43.6 GB (2.97 BPW) | TBD | TBD |
| DFlash draft (BF16) | 2.2 GB | β | (speculative-decoding drafter) |
| DFlash draft (Q8_0) | 1.13 GB | β | (drafter; same acceptance as BF16) |
| DFlash draft (Q4_K_M) | 652 MB | β | (drafter, recommended; same acceptance as BF16) |
DFlash speculative decoding β measured
Draft-quantization sweep on a DGX Spark (GB10, 128 GB unified memory) with
Poolside's llama.cpp fork. Target = APEX-i-quality; single 512-token
completion, temperature=0, --spec-draft-n-max 15, flash-attention on.
Acceptance = draft_n_accepted / draft_n from server timings (deterministic at
temperature=0); decode throughput is the reported predicted_per_second.
| Draft (vs APEX-i-quality) | Draft size | Acceptance | Decode tok/s | Speedup |
|---|---|---|---|---|
| none (no speculation) | β | β | 27.4 | 1.00Γ |
| DFlash BF16 | 2.2 GB | 27.5 % | 31.1 | 1.13Γ |
| DFlash Q8_0 | 1.13 GB | 27.8 % | 31.1 | 1.13Γ |
| DFlash Q4_K_M (recommended) | 652 MB | 27.8 % | 32.9 | 1.20Γ |
Quantizing the DFlash draft is essentially free: Q4_K_M matches BF16 acceptance at under a third of the size (and is marginally faster to run). These numbers are from a generic prompt; on the coding / agentic workloads Laguna is built for, DFlash acceptance and speedup are substantially higher β Poolside reports 2.5β3.7Γ on HumanEval / MBPP / GSM8K (see the DFlash draft card).
Same sweep against the much coarser APEX-i-mini target (same hardware/settings):
| Draft (vs APEX-i-mini) | Draft size | Acceptance | Decode tok/s | Speedup |
|---|---|---|---|---|
| none (no speculation) | β | β | 35.2 | 1.00Γ |
| DFlash BF16 | 2.2 GB | 23.4 % | 34.7 | 0.99Γ |
| DFlash Q8_0 | 1.13 GB | 23.4 % | 36.7 | 1.04Γ |
| DFlash Q4_K_M (recommended) | 652 MB | 24.2 % | 38.5 | 1.09Γ |
Two effects show up on the smaller tier: acceptance is lower (23β24 % vs 27β28 %) β the more aggressively quantized target's output distribution diverges further from the draft's β and because i-mini already decodes fast, the speculation overhead barely pays for itself. The light Q4 draft is the only clearly net-positive one here (the BF16 draft's overhead makes it a wash), so Q4 is the right draft on every tier. As above, on real coding/agentic workloads the wins are larger than these generic-prompt figures.
Recommended serve command (Poolside fork, branch laguna):
./build/bin/llama-server \
-m Laguna-S-2.1-APEX-i-quality.gguf \
-md laguna-s-2.1-DFlash-Q4_K.gguf \
--spec-type draft-dflash --spec-draft-n-max 15 \
-fa on --jinja -ngl 999 -c 32768 \
--host 0.0.0.0 --port 8000
Which file to pick
- APEX-i-quality (73.9 GB) β recommended. Highest quality. Routed experts:
edge layers (L0β4, L43β47)
Q6_K, near-edge (L5β9, L38β42)Q5_K, middle (L10β37)IQ4_XS; shared expertQ8_0; attentionQ6_K; dense layer 0Q8_0. Diverse ("I") imatrix. Overall ~4.9 bpw. Fits the DGX Spark's 128 GB with room for the draft + KV cache. - APEX-i-compact (54.4 GB) β smaller and faster to decode (fewer bytes/token
on bandwidth-bound generation) at some quality cost. Routed experts
Q4_K/Q3_K, sharedQ6_K, attentionQ4_K. Good speed/quality compromise. - APEX-i-mini (43.6 GB, experimental) β smallest/fastest. Middle routed
experts at IQ2_S (2-bit), near/edge
Q3_K, sharedQ4_K/Q5_K. Expect a real quality drop; a size/speed experiment, not a quality target. - laguna-s-2.1-DFlash-BF16.gguf (2.2 GB) β the DFlash speculative-decoding draft
model (kept BF16 for best token-acceptance; not APEX-quantized). Used as the
-mddraft with any tier above. Ships from poolside/Laguna-S-2.1-GGUF.
Usage (llama.cpp)
DFlash speculative decoding requires Poolside's llama.cpp fork (branch laguna)
β it carries the --spec-type draft-dflash path. (Upstream llama.cpp has the
laguna architecture and will run the APEX quant without speculative decoding, but
not the DFlash draft path.)
# Build Poolside's fork (add -DGGML_CUDA=ON on the Spark / any NVIDIA box)
git clone --branch laguna https://github.com/poolsideai/llama.cpp
cd llama.cpp && cmake -B build -DGGML_CUDA=ON && cmake --build build -j
# Recommended: serve with DFlash speculative decoding (fastest)
./build/bin/llama-server \
-m Laguna-S-2.1-APEX-i-quality.gguf \
-md laguna-s-2.1-DFlash-BF16.gguf \
--spec-type draft-dflash --spec-draft-n-max 15 \
-fa on --jinja \
-ngl 999 -c 32768 \
--host 0.0.0.0 --port 8000
Recommended-settings notes:
-md laguna-s-2.1-DFlash-BF16.gguf+--spec-type draft-dflashβ the DFlash draft embeds the target tokenizer and DFlash metadata and works directly as the draft model. This is the whole point of the pairing: big speedup on the coding / agentic workloads Laguna is built for.--spec-draft-n-max 15β clamped to the trained draft block size (15 draft tokens + 1). Leaving it higher has no effect.-fa onβ flash attention; recommended for Laguna's mixed SWA/global attention.--jinjaβ use the model's chat template (native interleaved reasoning + tool calling). Required for correct agentic/tool behavior.-ngl 999β offload all layers. On the DGX Spark (GB10, 128 GB unified) the 73.9 GB i-quality quant + 2.2 GB draft + KV cache fit comfortably in unified memory (i-compact/i-mini leave even more headroom for context).-c 32768β context. Laguna supports up to 1M; size it to your memory budget (32k is a sane coding default; raise as headroom allows).
Without speculative decoding (any recent upstream llama.cpp with laguna support):
llama-server -m Laguna-S-2.1-APEX-i-quality.gguf -fa on --jinja -ngl 999 \
-c 32768 --host 0.0.0.0 --port 8000
Method & notes
APEX is a bit-allocation recipe over stock llama-quantize --tensor-type-file
(no kernel/format changes). Laguna-specific observations for this run:
- No config patching needed. Laguna's routed-expert intermediate size is 1024
(256-divisible), so K-quants (
Q6_K/Q5_K/IQ4_XS) apply directly toffn_down_expsβ unlike Moonlight (dim 1408), noIQ4_NLfallback is required. - Layer 0 is dense (
mlp_only_layers=[0]) β kept atQ8_0(generated with--dense-layers 1). - MTP drafter is a separate file. Laguna's multi-token-prediction speculator (DFlash) ships as its own GGUF, not embedded in the main model, so the APEX tensor-map covers the entire main model with nothing left unassigned.
- Attention uses standard
attn_q/k/v/outputnames (GQA, 48 q / 8 kv heads); the per-head softplus output gate, if present as a tensor, is covered atQ6_K.
Baseline: quantized from
unsloth/Laguna-S-2.1-GGUF's BF16
conversion. The importance matrix is unsloth's β
imatrix_unsloth.gguf_file,
reused as-is rather than regenerated (thanks to the unsloth team for publishing it).
It is bundled here for reproducibility.
Reproduce
# 1. Configs (48 layers, dense L0). Bundled as configs/laguna_s_*.txt
bash generate_config.sh --profile i-quality --layers 48 --dense-layers 1 -o laguna_s_i-quality.txt
bash generate_config.sh --profile i-compact --layers 48 --dense-layers 1 -o laguna_s_i-compact.txt
bash generate_config.sh --profile mini --layers 48 --dense-layers 1 -o laguna_s_i-mini.txt
# 2. Quantize from the BF16 split (base type Q6_K catches token_embd/output;
# llama-quantize auto-follows the 5-shard split from shard 1)
for tier in i-quality i-compact i-mini; do
llama-quantize --tensor-type-file laguna_s_${tier}.txt \
--imatrix imatrix_unsloth.gguf_file \
Laguna-S-2.1-BF16-00001-of-00005.gguf \
Laguna-S-2.1-APEX-${tier}.gguf Q6_K
done
Production testing
I ran the i-quality version of this on my dgx-spark with a llama.cpp backend and a nice large context and hooked it up to Opencode. I had it read the source of a moderately complex (19M of text) golang project I've been working on. It took a while to read and summarize the entire project into context. I'd say it meandered a little bit as I watched the reasoning process, but it inferred some pretty subtle details.
I then gave it a task to create a pair of systemd --user unit files for a pair of new models I had generated. It needed to create the files in the proper format to be discovered by my parser, which was buried in the code. It had to decide proper context sizes and model tuning parameters based on the model size and my available system parameters. It figured out my system architecture autonomously, including the unified memory and cuda architecture. It made educated guesses about the drafter settings (and got them right).
It determined that naming conventions and picked sane defaults for both models. It crafted and placed the two units, ran the proper system tools to reread the units, ran the systemd verify command to check that the format was correctly parsed by systemd.
It then wrote a little parser to double-check that the systemd units it had written parsed correctly and fixed
a bug it found in its parsing string. Once all that was done, it summarized all this for me and reported success.
If anything I would have preferred it asked for more clarification, but it completed the entire task autonomously.
Everything worked on the first try.
This is a capable large-context model natively trained to 1M tokens of context. I think this is the model I'll use when I want to do something hard on my local machine that the fast little models get stuck.
Attribution & licenses
- Base model + DFlash draft: Poolside (@poolside) β
Laguna-S-2.1 and the
laguna-s-2.1-DFlash-BF16.ggufdraft (OpenMDW-1.1). - BF16 GGUF conversion and importance matrix: unsloth
(@unsloth) β
Laguna-S-2.1-GGUF (OpenMDW-1.1).
This quant is built on unsloth's BF16 conversion and reuses unsloth's
imatrix_unsloth.gguf_fileβ full credit to the unsloth team. - Quantization engine: llama.cpp by the ggml authors
(@ggml-org) (MIT); DFlash speculative decoding
via poolsideai/llama.cpp branch
laguna. - APEX recipe & toolkit: Ettore Di Giacinto / LocalAI (@mudler) β localai-org/apex-quant (MIT).
License compatibility
Fully compatible. OpenMDW-1.1 (Poolside's base weights and unsloth's conversion/imatrix) is a permissive, MIT-like model license β it grants use, modification, and redistribution without restriction and imposes no copyleft. Its one substantive condition is license preservation: any redistribution of the model materials must carry (1) a copy of the OpenMDW-1.1 agreement and (2) all original copyright and origin notices. The tooling (APEX toolkit, llama.cpp) is MIT, which stacks with OpenMDW without conflict.
Accordingly this derivative is released under OpenMDW-1.1 (inherited from the
base), and this repo ships the OpenMDW-1.1 license text plus the Poolside and unsloth
origin/copyright notices (see LICENSE and NOTICE), alongside
the MIT notices for the APEX toolkit and llama.cpp. The reused imatrix is bundled
under the same terms.
This is an unofficial community quantization and is not affiliated with or endorsed by Poolside or unsloth.
- Downloads last month
- 27,637
8-bit
Model tree for Myric/Laguna-S-2.1-APEX-GGUF
Base model
poolside/Laguna-S-2.1