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.
The installer checks all of this for you and picks the right llama.cpp build for your hardware.
The installer and the spark command are Windows .cmd scripts.
16 GB recommended for the default Q8_0 model. Smaller quants run in less. See the model table.
NVIDIA gets the CUDA build, AMD and Intel Arc get Vulkan. With no GPU it runs on the CPU.
~100 MB for the app and llama.cpp, plus the model file (1.5 to 8.2 GB).
Four steps. Run them in Command Prompt or Windows Terminal (cmd or PowerShell both work).
It installs into your user folder, at %USERPROFILE%\.spark-code26.
> git clone https://github.com/tattooinmtl/spark-x26.git "%USERPROFILE%\.spark-code26"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.
> 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.
install.cmd --model downloads the model without asking,
and install.cmd --gpu installs the GPU build without asking.The installer writes spark.cmd to %USERPROFILE%\.local\bin. A new terminal picks up the PATH change. Check that it works:
> spark doctorOpen 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.
> 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.
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.
Near full quality. The app looks for this file first, so it needs no extra setup.
Almost no quality loss compared with Q8_0, and about 20% smaller.
Roughly 1.7× faster than Q8_0 on a CPU, with a small quality cost.
-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.Save the .gguf file in C:\models, then pick one of these.
Set SPARK_MODEL once. It wins over every other setting. Open a new terminal afterwards.
> setx SPARK_MODEL "C:\models\Spark-X2.6-4B-Q4_K_M.gguf"> spark --model "C:\models\Spark-X2.6-4B-Q4_K_M.gguf"/model lists the .gguf files in C:\models and switches to one until you exit.
> /model Spark-X2.6-4B-Q6_K.ggufSPARK_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.From any terminal:
sparkstart the coding agent in this folderspark uillama.cpp web UI on http://127.0.0.1:8081spark updatepull a new version from GitHubspark doctorcheck the machine without loading the modelspark hardwareCPU, RAM, GPU and the best enginespark cuda installinstall the GPU build that fits this PCspark repairfix a broken installspark benchrun llama-benchspark --think lowless thinking, faster turnsspark --workspace DIRwork in another folder/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