GGUF
Chinese
English
spark-x2.5
llama.cpp
speculative-decoding
t4
cuda
colab
edge-deployment
conversational
Instructions to use gasschina/Spark-X2.5-4B-build-cpp 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 gasschina/Spark-X2.5-4B-build-cpp 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 gasschina/Spark-X2.5-4B-build-cpp:Q8_0 # Run inference directly in the terminal: llama cli -hf gasschina/Spark-X2.5-4B-build-cpp:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf gasschina/Spark-X2.5-4B-build-cpp:Q8_0 # Run inference directly in the terminal: llama cli -hf gasschina/Spark-X2.5-4B-build-cpp: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 gasschina/Spark-X2.5-4B-build-cpp:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf gasschina/Spark-X2.5-4B-build-cpp: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 gasschina/Spark-X2.5-4B-build-cpp:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf gasschina/Spark-X2.5-4B-build-cpp:Q8_0
Use Docker
docker model run hf.co/gasschina/Spark-X2.5-4B-build-cpp:Q8_0
- LM Studio
- Jan
- Ollama
How to use gasschina/Spark-X2.5-4B-build-cpp with Ollama:
ollama run hf.co/gasschina/Spark-X2.5-4B-build-cpp:Q8_0
- Unsloth Desktop
- Pi
How to use gasschina/Spark-X2.5-4B-build-cpp with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gasschina/Spark-X2.5-4B-build-cpp:Q8_0
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": "gasschina/Spark-X2.5-4B-build-cpp:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use gasschina/Spark-X2.5-4B-build-cpp with Docker Model Runner:
docker model run hf.co/gasschina/Spark-X2.5-4B-build-cpp:Q8_0
- Lemonade
How to use gasschina/Spark-X2.5-4B-build-cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gasschina/Spark-X2.5-4B-build-cpp:Q8_0
Run and chat with the model
lemonade run user.Spark-X2.5-4B-build-cpp-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use gasschina/Spark-X2.5-4B-build-cpp with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gasschina/Spark-X2.5-4B-build-cpp: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 gasschina/Spark-X2.5-4B-build-cpp:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use gasschina/Spark-X2.5-4B-build-cpp with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf gasschina/Spark-X2.5-4B-build-cpp: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 "gasschina/Spark-X2.5-4B-build-cpp: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"
Upload scripts/deploy_spark_t4.sh with huggingface_hub
Browse files
scripts/deploy_spark_t4.sh
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
# CUDA 后端完整支持的架构,编译一次即可,之后日常使用无需再编译。
|
| 14 |
#
|
| 15 |
# 【量化档位怎么选(T4 16GB 显存)】
|
| 16 |
-
# Q8_0 (8bit) 4.07GB 质量近无损,T4 跑 32k~64k 上下文很从容
|
| 17 |
# Q6_K (6bit) 3.15GB 质量与速度折中
|
| 18 |
-
# Q4_K_M(4bit) 2.42GB 速度最快、可冲 128k+ 长上下文
|
| 19 |
# 注意: 官方仓 XHToken/Spark-X2.5-4B-GGUF 里的 7.66GB 文件是 F16
|
| 20 |
# 全精度(不是 8bit),T4 上没必要用;8bit 用本脚本的默认 imatrix 仓。
|
| 21 |
#
|
|
@@ -23,7 +23,7 @@
|
|
| 23 |
# chmod +x deploy_spark_t4.sh
|
| 24 |
# ./deploy_spark_t4.sh deps # 1. 装系统依赖 + 构建工具
|
| 25 |
# ./deploy_spark_t4.sh build # 2. 克隆 fork 并编译 CUDA 版(约10~20分钟)
|
| 26 |
-
# ./deploy_spark_t4.sh download # 3. 下载量化模型(默认
|
| 27 |
# ./deploy_spark_t4.sh serve # 4. 启动 OpenAI 兼容 API 服务
|
| 28 |
# ./deploy_spark_t4.sh test # 5. 发一条测试请求
|
| 29 |
# ./deploy_spark_t4.sh status # 查看运行状态
|
|
@@ -38,7 +38,7 @@
|
|
| 38 |
set -euo pipefail
|
| 39 |
|
| 40 |
# ---------------------------- 可调配置 --------------------------------------
|
| 41 |
-
QUANT="${QUANT:-
|
| 42 |
GGUF_REPO="${GGUF_REPO:-miifanboy/Spark-X2.5-4B-i1-GGUF}" # 含全档位 imatrix 量化
|
| 43 |
LLAMA_REPO="${LLAMA_REPO:-https://github.com/XHToken/llama.cpp.git}"
|
| 44 |
BASE_DIR="${BASE_DIR:-$HOME/spark-t4}"
|
|
|
|
| 13 |
# CUDA 后端完整支持的架构,编译一次即可,之后日常使用无需再编译。
|
| 14 |
#
|
| 15 |
# 【量化档位怎么选(T4 16GB 显存)】
|
| 16 |
+
# Q8_0 (8bit) 4.07GB 质量近无损,T4 跑 32k~64k 上下文很从容
|
| 17 |
# Q6_K (6bit) 3.15GB 质量与速度折中
|
| 18 |
+
# Q4_K_M(4bit) 2.42GB 速度最快、可冲 128k+ 长上下文 <- 默认
|
| 19 |
# 注意: 官方仓 XHToken/Spark-X2.5-4B-GGUF 里的 7.66GB 文件是 F16
|
| 20 |
# 全精度(不是 8bit),T4 上没必要用;8bit 用本脚本的默认 imatrix 仓。
|
| 21 |
#
|
|
|
|
| 23 |
# chmod +x deploy_spark_t4.sh
|
| 24 |
# ./deploy_spark_t4.sh deps # 1. 装系统依赖 + 构建工具
|
| 25 |
# ./deploy_spark_t4.sh build # 2. 克隆 fork 并编译 CUDA 版(约10~20分钟)
|
| 26 |
+
# ./deploy_spark_t4.sh download # 3. 下载量化模型(默认 Q4_K_M)
|
| 27 |
# ./deploy_spark_t4.sh serve # 4. 启动 OpenAI 兼容 API 服务
|
| 28 |
# ./deploy_spark_t4.sh test # 5. 发一条测试请求
|
| 29 |
# ./deploy_spark_t4.sh status # 查看运行状态
|
|
|
|
| 38 |
set -euo pipefail
|
| 39 |
|
| 40 |
# ---------------------------- 可调配置 --------------------------------------
|
| 41 |
+
QUANT="${QUANT:-Q4_K_M}" # Q4_K_M(默认) / Q8_0 / Q6_K / Q5_K_M ...
|
| 42 |
GGUF_REPO="${GGUF_REPO:-miifanboy/Spark-X2.5-4B-i1-GGUF}" # 含全档位 imatrix 量化
|
| 43 |
LLAMA_REPO="${LLAMA_REPO:-https://github.com/XHToken/llama.cpp.git}"
|
| 44 |
BASE_DIR="${BASE_DIR:-$HOME/spark-t4}"
|