Instructions to use Harsha001/Spark-X2.6-4B-ROCmFPX 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 Harsha001/Spark-X2.6-4B-ROCmFPX 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 Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP # Run inference directly in the terminal: llama cli -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP # Run inference directly in the terminal: llama cli -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
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 Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP # Run inference directly in the terminal: ./llama-cli -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
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 Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP # Run inference directly in the terminal: ./build/bin/llama-cli -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
Use Docker
docker model run hf.co/Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
- LM Studio
- Jan
- vLLM
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Harsha001/Spark-X2.6-4B-ROCmFPX" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Harsha001/Spark-X2.6-4B-ROCmFPX", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
- Ollama
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with Ollama:
ollama run hf.co/Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
- Unsloth Desktop
- Pi
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with Docker Model Runner:
docker model run hf.co/Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
- Lemonade
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
Run and chat with the model
lemonade run user.Spark-X2.6-4B-ROCmFPX-Q4_0_ROCMFP
List all available models
lemonade list
- Hermes Agent
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
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 Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Harsha001/Spark-X2.6-4B-ROCmFPX with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP
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 "Harsha001/Spark-X2.6-4B-ROCmFPX:Q4_0_ROCMFP" \ --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"
Spark-X2.6-4B — ROCmFPX GGUF
XHToken/Spark-X2.6-4B quantized to two ROCmFPX types. ROCmFPX is a llama.cpp fork with AMD-oriented low-bit weight types for Vulkan and HIP/ROCm.
These files only load in the ROCmFPX fork. Stock llama.cpp, LM Studio and Ollama do not know these types.
| File | Size | |
|---|---|---|
Spark-X2.6-4B-Q8_0_ROCMFPX.gguf |
4.2 GB | 8-bit, closest to the original |
Spark-X2.6-4B-Q4_0_ROCMFP4.gguf |
2.8 GB | 4-bit, smaller and faster |
Measured quality
Against the BF16 model on WikiText-2 test, 100 chunks of 512 tokens, CPU backend. KLD is the mean KL divergence of the token distribution from BF16 (lower is better). Same top is how often the quant picks the same next token as BF16. The stock types, made the same way, are there for comparison and are not published here.
| Model | PPL | KLD | Same top |
|---|---|---|---|
| BF16 (original) | 23.0696 | 0 | 100% |
Q8_0_ROCMFPX |
22.6619 | 0.0208 | 93.49% |
Q4_0_ROCMFP4 |
22.4672 | 0.1267 | 84.72% |
Q8_0 (stock, comparison only) |
23.2565 | 0.0049 | 97.01% |
Q4_K_M (stock, comparison only) |
28.5549 | 0.2104 | 80.13% |
How to read this: a perplexity a little below the original's does not mean a quant is better; KLD and same-top measure
how closely it follows the original, and there Q4_0_ROCMFP4 is clearly closer than stock Q4_K_M at a similar
size. Q8_0_ROCMFPX stays close but is further from the original than stock Q8_0. All five files answered the
chat test the same way.
How this was made
- BF16 GGUF from upstream llama.cpp's
convert_hf_to_gguf.py(f849095). The ROCmFPX fork (fb08d7c) runs thespark2_5architecture but its own converter does not have it yet; the fork loads the upstream file as is. - Importance matrix from the original weights on 200 chunks of WikiText-2 train (not the test text). The importance matrix and the BF16 reference row ran on an F32 copy of the BF16 file: the same values, only faster on the CPU.
llama-quantize --imatrixfrom ROCmFPX (fb08d7c), from the BF16 weights, one run per type.- Perplexity and KL divergence on the CPU backend; each file answered a short chat prompt correctly before upload.
Run
git clone https://github.com/charlie12345/ROCmFPX && cd ROCmFPX
cmake -B build -DGGML_VULKAN=ON # or -DGGML_HIP=ON -DAMDGPU_TARGETS=gfx1151
cmake --build build --target llama-server -j
build/bin/llama-server -m Spark-X2.6-4B-Q4_0_ROCMFP4.gguf -ngl 999 -fa on --jinja
The chat template is the model's own (thinking on by default; --chat-template-kwargs '{"enable_thinking": false}'
turns it off).
License
Apache-2.0, same as the base model. All credit for the model goes to XHToken.
- Downloads last month
- 13
4-bit
8-bit