Instructions to use dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx"
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 dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx"
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 "dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx
MLX conversion of a GGUF model (converted by llama.cpp from XHToken/Spark-X2.5-1.7B-INT8), quantized with a ridge_4_6_8 recipe.
Ridge policy ridge_4_6_8 (Spark-X2.5): 4-bit middle FFN (mlp.gate/up/down_proj), 6-bit sliding-layer attn_qkv (self_attn.q_k_v_proj), out_proj, and edge FFN layers, and 8-bit protection for the sensitive control path: the per-head sigmoid gate attn_gate (self_attn.g_proj) and the fused attn_qkv of every full_attention layer (the long-context path with 2-wide, 256-dim KV). The tied embedding (model.embedding, doubling as the output unembedding) and lm_head are 6-bit; norms stay fp16.
Supported runtime: mlx_lm (upgraded to support the model type).
True parameter count: 1.71B. (HF's automatic 'Model size' badge apparently undercounts MLX quantized models because the packed weights are stored at <=8 bits per element.)
Usage
from mlx_lm import load, generate
model, tokenizer = load("dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx")
print(generate(model, tokenizer, prompt="hello"))
Example generation
mlx_lm.generate --model dakerholdings/Spark-X2.5-1.7B-ridge_4_6_8-mlx --prompt "What is the square root of 2?" --max-tokens 400
==========
The user asked "What is the square root of 2?" I need to provide the value of the square root of 2.
The square root of 2 is an irrational number, approximately 1.41421356237...
I should provide the exact value and the approximate decimal value.
Let me structure the response:
1. State the exact value: √2
2. Provide the approximate decimal value: approximately 1.4142
3. Maybe mention it's irrational.
Let me make sure the answer is clear and accurate.</think>The square root of 2 is an irrational number, which means it cannot be expressed as a simple fraction.
- **Exact value:** √2
- **Approximate value:** ≈ 1.41421356237...
So, the square root of 2 is approximately **1.4142**.
==========
Prompt: 25 tokens, 215.179 tokens-per-sec
Generation: 208 tokens, 41.483 tokens-per-sec
Peak memory: 1.253 GB
(M1 MacBook Air)
- Downloads last month
- 14
6-bit