Instructions to use Firworks/Ergo-dspark-GGUF 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 Firworks/Ergo-dspark-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 Firworks/Ergo-dspark-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Firworks/Ergo-dspark-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 Firworks/Ergo-dspark-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Firworks/Ergo-dspark-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Firworks/Ergo-dspark-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Firworks/Ergo-dspark-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Firworks/Ergo-dspark-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Firworks/Ergo-dspark-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Firworks/Ergo-dspark-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": "Firworks/Ergo-dspark-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Firworks/Ergo-dspark-GGUF:Q4_K_M
- Ollama
How to use Firworks/Ergo-dspark-GGUF with Ollama:
ollama run hf.co/Firworks/Ergo-dspark-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use Firworks/Ergo-dspark-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Firworks/Ergo-dspark-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Firworks/Ergo-dspark-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Firworks/Ergo-dspark-GGUF with Docker Model Runner:
docker model run hf.co/Firworks/Ergo-dspark-GGUF:Q4_K_M
- Lemonade
How to use Firworks/Ergo-dspark-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Firworks/Ergo-dspark-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Ergo-dspark-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Firworks/Ergo-dspark-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 Firworks/Ergo-dspark-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:9931/v1 hermes config set model.default Firworks/Ergo-dspark-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Firworks/Ergo-dspark-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Firworks/Ergo-dspark-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:9931/v1 \ --custom-model-id "Firworks/Ergo-dspark-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"
Amazon Ergo DSpark (3.24B) โ GGUF
GGUF conversions and quantizations of Amazon-FMR/Ergo-dspark, the official 3.24B-parameter, 5-layer block-8 DSpark speculative decoding draft model for Amazon Ergo 1.1T (including Firworks/Ergo-IQ2_S-GGUF and any other Ergo GGUF quantization).
Available Files
| File | Quant | Size | Notes |
|---|---|---|---|
Ergo-dspark-BF16.gguf |
BF16 |
6.1 GiB | Exact lossless conversion from upstream model.safetensors |
Ergo-dspark-Q8_0.gguf |
Q8_0 |
3.3 GiB | Near-lossless 8-bit draft, good default for GPU rigs |
Ergo-dspark-Q4_K_M.gguf |
Q4_K_M |
1.8 GiB | Fast & tiny (~1.8 GiB); verified at 86.7%โ90.5% code acceptance on CPU-only inference |
All files were converted with llama.cpp's convert_hf_to_gguf.py (--target-model-dir pointing to Amazon-FMR/Ergo tokenizer/config metadata, preserving dflash.target_layers = [2, 17, 32, 47, 62], dflash.block_size = 8, dflash.sample_from_anchor = true, dflash.has_confidence_head = true, and the rank-256 Markov + confidence heads).
Important llama.cpp Setup Notes (Read First!)
Getting Amazon-FMR/Ergo-dspark working properly in llama.cpp requires two critical details that are easy to miss:
1. Always use -ctkd bf16 -ctvd bf16 for the draft KV cache
Do not leave the draft KV cache at the default
f16(orf32with-fa on)!
Amazon-FMR/Ergo-dspark was trained in BF16 (max โ 3.39e+38) with unusually large linear projection magnitudes (e.g., layers.4.self_attn.v_proj.weight has rms = 23.9, max = 174). Because of this, layer-4 injected V values routinely exceed FP16's 65,504 ceiling:
- With the default
-ctkd f16 -ctvd f16, layer-4Voverflows to+InfโNaNinl_out-4andresult_normโ all-zero backbone logits.Ergo-dsparksilently degrades into a context-blind Markov bigram table (~3.5% acceptance). - Even
-ctkd f32 -ctvd f32still hitsNaNwhen-fa onis enabled, becausellama.cpp'ssrc/llama-graph.cppcastsF32K/V tensors down toF16right beforeggml_flash_attn_ext. - Solution: Pass
-ctkd bf16 -ctvd bf16. That bypasses theF32 โ F16cast, keeps-fa onworking, preservesBF16's full dynamic range, and caps the 32K sliding-window draft KV cache at only ~640 MiB.
2. Hidden-state taps in src/models/ergo.cpp
If your llama.cpp build aborts with GGML_ASSERT(src != nullptr && "layer input tensor is null"), src/models/ergo.cpp needs the two res->t_layer_inp assignments so draft-dspark can read target hidden states from layers [2, 17, 32, 47, 62]:
--- a/src/models/ergo.cpp
+++ b/src/models/ergo.cpp
@@ -96,6 +96,7 @@ llama_model_ergo::graph::graph(const llm_graph_params & params) : llm_graph_cont
const float kq_scale = 1.0f / sqrtf(float(n_embd_head));
for (int il = 0; il < n_layer; ++il) {
+ res->t_layer_inp[il] = inpL;
const auto & layer = model.layers[il];
ggml_tensor * inpSA = inpL;
@@ -185,6 +186,8 @@ llama_model_ergo::graph::graph(const llm_graph_params & params) : llm_graph_cont
inpL = cur;
}
+ res->t_layer_inp[n_layer] = inpL;
+
cur = inpL;
cur = build_norm(cur, model.output_norm, NULL, LLM_NORM_RMS, -1);
Usage (llama.cpp)
Direct Hugging Face Draft Loading (-hfd)
llama-server \
-m Ergo-IQ2_S-00001-of-00009.gguf \
-hfd Firworks/Ergo-dspark-GGUF:Q4_K_M \
--spec-type draft-dspark \
-ctkd bf16 -ctvd bf16 \
-c 65536 -fa on --jinja
Recommended Settings (Local Draft File)
- GPU / hybrid rigs:
--spec-draft-n-max 7(or8) withQ8_0orBF16. - CPU-only MoE rigs: Verifying many tokens on a 256-expert MoE activates more unique experts per step, so pairing DSpark's built-in confidence head (
--spec-draft-p-min 0.35) with--spec-draft-n-max 4 --spec-draft-n-min 1trims low-confidence drafts while sustaining ~4.5โ4.6 tokens/step on code:
llama-server \
-m Ergo-IQ2_S-00001-of-00009.gguf \
-md Ergo-dspark-Q4_K_M.gguf \
--spec-type draft-dspark \
--spec-draft-n-max 4 \
--spec-draft-n-min 1 \
--spec-draft-p-min 0.35 \
-ctkd bf16 -ctvd bf16 \
--host 0.0.0.0 --port 8080 \
-c 65536 -fa on --jinja
(Tip: Add --reasoning off if you want immediate direct answers without long chain-of-thought blocks โ DSpark acceptance is also significantly higher on direct code and structured output.)
Verified Benchmarks
Tested end-to-end with Firworks/Ergo-IQ2_S-GGUF + Ergo-dspark-Q4_K_M.gguf (-ctkd bf16 -ctvd bf16, --spec-draft-n-max 4 --spec-draft-n-min 1 --spec-draft-p-min 0.35, CPU-only on 2ร Intel Xeon E5-2690 v3, interleaved dual-NUMA, -t 32 --poll 50 -fa on):
| Workload | No Draft | With Ergo-dspark-Q4_K_M |
Acceptance | Mean Accepted Len | Speedup |
|---|---|---|---|---|---|
Python code (--temp 0, --reasoning off) |
2.0 t/s |
3.2 t/s |
90.5% | 4.62 | +60% |
Python code (--temp 0.8, --reasoning off) |
2.0 t/s |
3.2 t/s |
89.1% | 4.52 | +60% |
Live /v1/chat/completions (--temp 0.6, --reasoning off) |
2.0 t/s |
3.18 t/s |
86.7% | โ | +59% |
Chat w/ thinking + code (--temp 0.8) |
2.1 t/s |
2.2 t/s |
55.3% | 3.02 | +5% |
Confidence-head calibration check (--spec-draft-n-max 7 on 200-token prompt):
p_min = 0.00:28.1%acceptancep_min = 0.50:64.3%acceptancep_min = 0.70:85.9%acceptancep_min = 0.85:100.0%acceptance (27/27)
License
Released under the Amazon Ergo Open Weight License, matching Amazon-FMR/Ergo-dspark.
- Downloads last month
- 625
4-bit
8-bit
16-bit