Text Generation
Transformers
GGUF
English
Chinese
Merge
ties
dare
Mixture of Experts
qwen
qwen3.5
qwen3.6
causal-lm
deltanet
agentic
reasoning
code
conversational
Instructions to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF 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 pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
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 pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
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 pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
Use Docker
docker model run hf.co/pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
- SGLang
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with Ollama:
ollama run hf.co/pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
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": "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with Docker Model Runner:
docker model run hf.co/pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
- Lemonade
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen-35B-A3B-SignOfFour-Coder-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
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 pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M
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 "pragmaticcs/Qwen-35B-A3B-SignOfFour-Coder-GGUF:Q4_K_M" \ --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"
Commit ·
fdf2cc9
1
Parent(s): 7815aa8
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,43 +87,55 @@ A four-way MoE merge of the Qwen 35B-A3B architecture, fusing task vectors from
|
|
| 87 |
|
| 88 |
## Merge Methodology
|
| 89 |
|
| 90 |
-
For each floating-point parameter, a task delta is computed per donor
|
| 91 |
|
| 92 |
-
$$
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
**DARE pruning.** A Bernoulli mask at retention density
|
| 95 |
|
| 96 |
-
$$
|
|
|
|
|
|
|
| 97 |
|
| 98 |
-
**TIES sign election.** A consensus sign
|
| 99 |
|
| 100 |
-
$$
|
|
|
|
|
|
|
| 101 |
|
| 102 |
-
$$
|
|
|
|
|
|
|
| 103 |
|
| 104 |
**Depth-scaled reconstruction.** The merged weight is reconstructed as:
|
| 105 |
|
| 106 |
-
$$
|
|
|
|
|
|
|
| 107 |
|
| 108 |
-
where the layer scaling factor
|
| 109 |
|
| 110 |
-
$$
|
|
|
|
|
|
|
| 111 |
|
| 112 |
-
This keeps input/output projections closer to the base and applies the strongest task transfer to middle layers (
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
## Layer-Stratified Policies
|
| 117 |
|
| 118 |
-
| Parameter Group | Match Substring | Policy | Density (
|
| 119 |
| :--- | :--- | :---: | :---: | :---: |
|
| 120 |
| **Embeddings / LM head** | `embed_tokens`, `lm_head` | Linear | — | 1.00 |
|
| 121 |
| **Norms / biases** | `norm`, `bias`, 1D tensors | Linear | — | 1.00 |
|
| 122 |
| **DeltaNet recurrent state** | `a_log`, `dt_bias`, `conv1d` | Linear | — | 1.00 |
|
| 123 |
| **MoE router gate** | `mlp.gate.weight`, `block_sparse_moe.gate` | Linear | — | 1.00 |
|
| 124 |
-
| **MoE shared expert** | `shared_expert` | DARE
|
| 125 |
-
| **Attention projections** | `attn`, `rotary`, `in_proj`, `out_proj`, `x_proj` | DARE
|
| 126 |
-
| **Routed experts (×256)** | `experts`, `mlp` | DARE
|
| 127 |
|
| 128 |
- **Router protection:** Gate weights use linear interpolation (~57% base, ~43% donors) rather than DARE to avoid destabilizing expert routing.
|
| 129 |
- **DeltaNet stability:** Recurrent state kernels are excluded from DARE to prevent divergence in the linear-attention state space.
|
|
|
|
| 87 |
|
| 88 |
## Merge Methodology
|
| 89 |
|
| 90 |
+
For each floating-point parameter, a task delta is computed per donor \\(k\\):
|
| 91 |
|
| 92 |
+
$$
|
| 93 |
+
\Delta_k = D_k - W_0
|
| 94 |
+
$$
|
| 95 |
|
| 96 |
+
**DARE pruning.** A Bernoulli mask at retention density \\(p\\) zeroes out low-magnitude updates; surviving values are rescaled by \\(p^{-1}\\):
|
| 97 |
|
| 98 |
+
$$
|
| 99 |
+
\tilde{\Delta}_k = \frac{1}{p} \left(\Delta_k \odot M_k\right), \quad M_k \sim \text{Bernoulli}(p)
|
| 100 |
+
$$
|
| 101 |
|
| 102 |
+
**TIES sign election.** A consensus sign \\(\Gamma\\) is computed via weighted vote across donors, and any donor update conflicting with it is dropped before averaging:
|
| 103 |
|
| 104 |
+
$$
|
| 105 |
+
\Gamma = \operatorname{sgn}\left(\sum_{k=1}^K \alpha_k \tilde{\Delta}_k\right)
|
| 106 |
+
$$
|
| 107 |
|
| 108 |
+
$$
|
| 109 |
+
\Delta_{\text{TIES}} = \frac{\sum_{k=1}^K \alpha_k \tilde{\Delta}_k \odot \mathbb{I}\left(\operatorname{sgn}(\tilde{\Delta}_k) = \Gamma\right)}{\sum_{k=1}^K \alpha_k \cdot \mathbb{I}\left(\operatorname{sgn}(\tilde{\Delta}_k) = \Gamma\right) + \epsilon}
|
| 110 |
+
$$
|
| 111 |
|
| 112 |
**Depth-scaled reconstruction.** The merged weight is reconstructed as:
|
| 113 |
|
| 114 |
+
$$
|
| 115 |
+
W_{\text{final}} = W_0 + \lambda(l) \cdot \Delta_{\text{TIES}}
|
| 116 |
+
$$
|
| 117 |
|
| 118 |
+
where the layer scaling factor \\(\lambda(l)\\) across decoder layer index \\(l \in [0, 39]\\) is defined as:
|
| 119 |
|
| 120 |
+
$$
|
| 121 |
+
\lambda(l) = \beta \cdot \left(0.5 + 0.5 \sin\left(\pi \frac{l}{39}\right)\right)
|
| 122 |
+
$$
|
| 123 |
|
| 124 |
+
This keeps input/output projections closer to the base and applies the strongest task transfer to middle layers \\((l \in [12, 28])\\).
|
| 125 |
|
| 126 |
---
|
| 127 |
|
| 128 |
## Layer-Stratified Policies
|
| 129 |
|
| 130 |
+
| Parameter Group | Match Substring | Policy | Density (p) | Base Scale (β) |
|
| 131 |
| :--- | :--- | :---: | :---: | :---: |
|
| 132 |
| **Embeddings / LM head** | `embed_tokens`, `lm_head` | Linear | — | 1.00 |
|
| 133 |
| **Norms / biases** | `norm`, `bias`, 1D tensors | Linear | — | 1.00 |
|
| 134 |
| **DeltaNet recurrent state** | `a_log`, `dt_bias`, `conv1d` | Linear | — | 1.00 |
|
| 135 |
| **MoE router gate** | `mlp.gate.weight`, `block_sparse_moe.gate` | Linear | — | 1.00 |
|
| 136 |
+
| **MoE shared expert** | `shared_expert` | DARE‑TIES | 0.70 | 0.60 |
|
| 137 |
+
| **Attention projections** | `attn`, `rotary`, `in_proj`, `out_proj`, `x_proj` | DARE‑TIES | 0.75 | 0.60 |
|
| 138 |
+
| **Routed experts (×256)** | `experts`, `mlp` | DARE‑TIES | 0.65 | 0.55 |
|
| 139 |
|
| 140 |
- **Router protection:** Gate weights use linear interpolation (~57% base, ~43% donors) rather than DARE to avoid destabilizing expert routing.
|
| 141 |
- **DeltaNet stability:** Recurrent state kernels are excluded from DARE to prevent divergence in the linear-attention state space.
|