Instructions to use satgeze/Qwen3.6-27B-DSpark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use satgeze/Qwen3.6-27B-DSpark with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="satgeze/Qwen3.6-27B-DSpark", filename="Qwen3.6-27B-DSpark.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use satgeze/Qwen3.6-27B-DSpark 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 satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: llama cli -hf satgeze/Qwen3.6-27B-DSpark
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: llama cli -hf satgeze/Qwen3.6-27B-DSpark
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 satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: ./llama-cli -hf satgeze/Qwen3.6-27B-DSpark
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 satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: ./build/bin/llama-cli -hf satgeze/Qwen3.6-27B-DSpark
Use Docker
docker model run hf.co/satgeze/Qwen3.6-27B-DSpark
- LM Studio
- Jan
- Ollama
How to use satgeze/Qwen3.6-27B-DSpark with Ollama:
ollama run hf.co/satgeze/Qwen3.6-27B-DSpark
- Unsloth Studio
How to use satgeze/Qwen3.6-27B-DSpark with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for satgeze/Qwen3.6-27B-DSpark to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for satgeze/Qwen3.6-27B-DSpark to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for satgeze/Qwen3.6-27B-DSpark to start chatting
- Pi
How to use satgeze/Qwen3.6-27B-DSpark with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf satgeze/Qwen3.6-27B-DSpark
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "satgeze/Qwen3.6-27B-DSpark" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use satgeze/Qwen3.6-27B-DSpark with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf satgeze/Qwen3.6-27B-DSpark
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 satgeze/Qwen3.6-27B-DSpark
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use satgeze/Qwen3.6-27B-DSpark with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf satgeze/Qwen3.6-27B-DSpark
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 "satgeze/Qwen3.6-27B-DSpark" \ --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"
- Docker Model Runner
How to use satgeze/Qwen3.6-27B-DSpark with Docker Model Runner:
docker model run hf.co/satgeze/Qwen3.6-27B-DSpark
- Lemonade
How to use satgeze/Qwen3.6-27B-DSpark with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull satgeze/Qwen3.6-27B-DSpark
Run and chat with the model
lemonade run user.Qwen3.6-27B-DSpark-{{QUANT_TAG}}List all available models
lemonade list
Upload train_config.py with huggingface_hub
Browse files- train_config.py +77 -0
train_config.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from deepspec.trainer import Qwen3DSparkTrainer
|
| 3 |
+
BASE_TB_DIR = os.path.expanduser("~/tensorboard")
|
| 4 |
+
BASE_CKPT_DIR = os.path.expanduser("~/checkpoints")
|
| 5 |
+
project_name = "deepspec"
|
| 6 |
+
exp_name = "dspark_block15_qwen36_27b_online"
|
| 7 |
+
seed = 42
|
| 8 |
+
|
| 9 |
+
model = dict(
|
| 10 |
+
target_model_name_or_path="/mnt/t5evo/models/Qwen3.6-27B",
|
| 11 |
+
block_size=15,
|
| 12 |
+
num_draft_layers=5,
|
| 13 |
+
# Qwen3.5-0.8B: 24 layers (6 full-attention), hidden 1024
|
| 14 |
+
target_layer_ids=[1, 16, 31, 46, 61],
|
| 15 |
+
# free embedding slot: tokenizer len 248077 < embed 248320 (same family trick as ornith_9b)
|
| 16 |
+
mask_token_id=248200,
|
| 17 |
+
init_draft_from="/mnt/data/dspark-test/head_q36_27b_dflash_init/model.safetensors",
|
| 18 |
+
num_anchors=512,
|
| 19 |
+
markov_rank=256,
|
| 20 |
+
# match z-lab DFlash warm-start geometry (differs from target-derived defaults)
|
| 21 |
+
head_dim=128,
|
| 22 |
+
num_attention_heads=32,
|
| 23 |
+
num_key_value_heads=8,
|
| 24 |
+
intermediate_size=17408,
|
| 25 |
+
markov_head_type="vanilla",
|
| 26 |
+
confidence_head_alpha=1.0,
|
| 27 |
+
confidence_head_with_markov=True,
|
| 28 |
+
loss_decay_gamma=4.0,
|
| 29 |
+
ce_loss_alpha=0.1,
|
| 30 |
+
l1_loss_alpha=0.9,
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
train = dict(
|
| 34 |
+
trainer_cls=Qwen3DSparkTrainer,
|
| 35 |
+
lr=5.0e-4,
|
| 36 |
+
warmup_ratio=0.04,
|
| 37 |
+
weight_decay=0.0,
|
| 38 |
+
precision="bf16",
|
| 39 |
+
local_batch_size=1,
|
| 40 |
+
global_batch_size=128, # single Pro 6000; 0.8B target fits with room
|
| 41 |
+
num_train_epochs=5,
|
| 42 |
+
max_train_steps=None,
|
| 43 |
+
max_grad_norm=1.0,
|
| 44 |
+
sharding_strategy="no_shard",
|
| 45 |
+
torch_compile=True,
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
logging = dict(
|
| 49 |
+
logging_steps=10,
|
| 50 |
+
checkpointing_steps=200,
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
data = dict(
|
| 54 |
+
online_target=True,
|
| 55 |
+
target_cache_path=None,
|
| 56 |
+
train_data_paths=[
|
| 57 |
+
"/mnt/data/DeepSpec/train_datasets/q27_regen_12k.jsonl",
|
| 58 |
+
],
|
| 59 |
+
min_loss_tokens=14,
|
| 60 |
+
chat_template="qwen",
|
| 61 |
+
max_length=2048,
|
| 62 |
+
num_workers=4,
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def finalize_cfg(cfg):
|
| 67 |
+
logging_cfg = dict(cfg["logging"])
|
| 68 |
+
project_name = str(cfg["project_name"])
|
| 69 |
+
exp_name = str(cfg["exp_name"])
|
| 70 |
+
logging_cfg["checkpoint_dir"] = os.path.join(BASE_CKPT_DIR, project_name, exp_name)
|
| 71 |
+
logging_cfg["tensorboard_dir"] = os.path.join(BASE_TB_DIR, project_name, exp_name)
|
| 72 |
+
cfg["logging"] = logging_cfg
|
| 73 |
+
return cfg
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
# --opts overrides applied at save time
|
| 77 |
+
train['num_train_epochs'] = 3
|