A coding agent that runs on your own PC.

Spark Code 2.6 is a terminal coding agent built around the Spark X2.6 4B model and llama.cpp. Open a terminal in your project, type spark, and it reads, edits and runs code there. No cloud, no API key.

Model Spark-X2.6-4B · 4.4B dense
Engine llama.cpp b11873 (CPU, CUDA or Vulkan)
Context up to 1M tokens
License Apache-2.0

01Requirements

The installer checks all of this for you and picks the right llama.cpp build for your hardware.

System

Windows 10 or 11, 64-bit

The installer and the spark command are Windows .cmd scripts.

Python

Python 3.12 or newer

From python.org, with the py launcher. Tick “Add python.exe to PATH”.

Git

Git for Windows

From git-scm.com. spark update uses it to pull new versions.

Memory

8 GB RAM minimum

16 GB recommended for the default Q8_0 model. Smaller quants run in less. See the model table.

GPU (optional)

NVIDIA, AMD or Intel

NVIDIA gets the CUDA build, AMD and Intel Arc get Vulkan. With no GPU it runs on the CPU.

Disk

About 5 GB free

~100 MB for the app and llama.cpp, plus the model file (1.5 to 8.2 GB).

02Install

Four steps. Run them in Command Prompt or Windows Terminal (cmd or PowerShell both work).

  1. Clone the app

    It installs into your user folder, at %USERPROFILE%\.spark-code26.

    cmd
    > git clone https://github.com/tattooinmtl/spark-x26.git "%USERPROFILE%\.spark-code26"
  2. Run the installer

    It checks the checkout, downloads llama.cpp (and the CUDA or Vulkan build if you have a GPU), finds or downloads the model, puts the spark command on your PATH and runs the self-tests.

    cmd
    > cd /d "%USERPROFILE%\.spark-code26"
    > install.cmd

    When it asks to download the model, say yes. It downloads Spark-X2.6-4B-Q8_0.gguf (4.38 GB) from Hugging Face. To use a smaller quant, download it from the table below into C:\models first, then run install.cmd.

    Options: install.cmd --model downloads the model without asking, and install.cmd --gpu installs the GPU build without asking.
  3. Open a new terminal

    The installer writes spark.cmd to %USERPROFILE%\.local\bin. A new terminal picks up the PATH change. Check that it works:

    cmd
    > spark doctor
  4. Start it in your project

    Open a terminal in the project folder you want to work on and type spark. The first time, it asks permission to work in that folder.

    cmd
    > cd /d C:\projects\my-app
    > spark
    [spark] started in C:\projects\my-app
    [spark] allow Spark to read, edit and run commands here? [Y/n]

    Press Enter to allow it. Folders you allow are remembered, so it asks only once per folder. Type /help inside the agent for its commands.

03Models and quants

Every Spark X2.6 GGUF below runs on the llama.cpp build the installer ships (b11873; the model needs b10828 or newer). Smaller quants load faster and use less memory, and lose some quality. “Needs” is the file plus about 1.5 GB for context and buffers: for full speed it should fit in your GPU's VRAM, otherwise in free RAM.

Default · what the installer downloads

Q8_0

XHToken · 4.38 GB · needs ≈ 5.9 GB

Near full quality. The app looks for this file first, so it needs no extra setup.

Balanced

Q6_K

bartowski · 3.61 GB · needs ≈ 5.1 GB

Almost no quality loss compared with Q8_0, and about 20% smaller.

Fast on CPU · low memory

Q4_K_M

bartowski · 2.62 GB · needs ≈ 4.1 GB

Roughly 1.7× faster than Q8_0 on a CPU, with a small quality cost.

near lossless recommended usable, noticeable loss low quality, last resort
Not in this list: the -imatrix.gguf and calibration files in bartowski's repo are quantization helpers, not models. The INT4, INT8 and FP8 repos are for vLLM and SGLang, not llama.cpp. Community fine-tunes such as abliterated or uncensored variants may use another chat template and are not tested with the agent.

04Use a different quant

Save the .gguf file in C:\models, then pick one of these.

Make it the default (recommended)

Set SPARK_MODEL once. It wins over every other setting. Open a new terminal afterwards.

cmd
> setx SPARK_MODEL "C:\models\Spark-X2.6-4B-Q4_K_M.gguf"

For one run

cmd
> spark --model "C:\models\Spark-X2.6-4B-Q4_K_M.gguf"

Inside the agent

/model lists the .gguf files in C:\models and switches to one until you exit.

spark
> /model Spark-X2.6-4B-Q6_K.gguf
How the app finds the model: SPARK_MODEL first, then the model entry in config.json, then Spark-X2.6-4B-Q8_0.gguf in the install folder or in C:\models. If none of those exist, it takes the first Spark-X2.6*.gguf in C:\models alphabetically. With several quants in that folder, set SPARK_MODEL so you know which one it loads.

05Commands

From any terminal:

sparkstart the coding agent in this folder
spark uillama.cpp web UI on http://127.0.0.1:8081
spark updatepull a new version from GitHub
spark doctorcheck the machine without loading the model
spark hardwareCPU, RAM, GPU and the best engine
spark cuda installinstall the GPU build that fits this PC
spark repairfix a broken install
spark benchrun llama-bench
spark --think lowless thinking, faster turns
spark --workspace DIRwork in another folder

Inside the agent

/helpevery command
/modelshow or switch the model
/reasoningnone, low or high thinking
/projectshow or switch the workspace
/diffgit diff of the workspace
/compactsummarise and continue
/resumerestore a saved session
/exitleave and stop the model