Instructions to use Trivnpk/Qwen-Compiler-Mind-4B 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 Trivnpk/Qwen-Compiler-Mind-4B 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 Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
Use Docker
docker model run hf.co/Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Trivnpk/Qwen-Compiler-Mind-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Trivnpk/Qwen-Compiler-Mind-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Trivnpk/Qwen-Compiler-Mind-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
- Ollama
How to use Trivnpk/Qwen-Compiler-Mind-4B with Ollama:
ollama run hf.co/Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
- Unsloth Desktop
- Pi
How to use Trivnpk/Qwen-Compiler-Mind-4B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trivnpk/Qwen-Compiler-Mind-4B: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": "Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Trivnpk/Qwen-Compiler-Mind-4B with Docker Model Runner:
docker model run hf.co/Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
- Lemonade
How to use Trivnpk/Qwen-Compiler-Mind-4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
Run and chat with the model
lemonade run user.Qwen-Compiler-Mind-4B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Trivnpk/Qwen-Compiler-Mind-4B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trivnpk/Qwen-Compiler-Mind-4B: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 Trivnpk/Qwen-Compiler-Mind-4B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Trivnpk/Qwen-Compiler-Mind-4B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Trivnpk/Qwen-Compiler-Mind-4B: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 "Trivnpk/Qwen-Compiler-Mind-4B: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"
Qwen-Compiler-Mind-4B v3.2.1 (PAL Arithmetic & Latent Static Analysis Edition)
Qwen-Compiler-Mind-4B v3.2.1 represents the definitive mathematical and algorithmic convergence of the Compiler Mind architecture. By embedding Program-Aided Language (PAL) Scratchpad Grounding and the Latent Static Analysis Invariant (LSAI), v3.2.1 achieves a massive leap on quantitative mathematical reasoning—catapulting GSM8K from 37.0% to an all-time record 78.0% (+41.0% absolute gain)—while solidly anchoring 80.0% Pass@1 on HumanEval and 55.5% on MMLU College CS & Formal Logic.
🏆 Multi-Generation Benchmark Scorecard (All 5 Generations)
| Generation | HumanEval (Pass@1, 50s) | GSM8K (CoT, 100s) | MMLU (College CS & Formal Logic, 100s) | Cognitive Density $\rho$ | Avg Thought Latency |
|---|---|---|---|---|---|
| v2.1 | 76.0% | 52.0% | 42.0% | 0.90 | 1.8s |
| v3.0 | 78.0% | 66.0% | 50.0% | 0.85 | 1.0s |
| v3.1.1 (Surgical Alignment) | 82.0% | 24.0% (Timeout) | 25.0% (Random Guess Ceiling) | 0.17 (Diluted) | 14.2s |
| v3.2 (EPE Edition) | 84.0% | 37.0% (Mental Math Slip) | 56.0% (Breakthrough) | 0.62 | 5.7s |
| v3.2.1 (Current Release) | 80.0% 🚀 | 78.0% 🏆 (All-Time High) | 55.5% 🧠 (Logic Invariant) | 0.65 (Optimal) | 6.1s (Fluid) |
Evaluated on NVIDIA L4 Tensor Core GPU using zero-dependency direct JSONL test runners.
🧠 Core Architectural Pillars in v3.2.1
1. Program-Aided Language (PAL) Scratchpad Grounding
- The Problem Solved: Small 4B models frequently stumble when performing multi-digit mental arithmetic inside continuous token embeddings, leading to off-by-one errors on word problems ($14 \times 17 - 38$).
- The PAL Invariant: Injects strict calculator scratchpad anchor tokens (
<<expr = ans>>) directly into the reasoning flow:
Result: GSM8K leaped from 37.0% straight to 78.0% (+41.0% absolute increase).Natalia sold 48/2 = <<48/2=24>>24 clips in May. Natalia sold 48+24 = <<48+24=72>>72 clips altogether.
2. Latent Static Analysis Invariant (LSAI)
Before concluding thought and generating executable functions, the model verifies 3 non-negotiable compiler checks:
- Type Safety Check: Guard against null pointers, empty collections, and signed integer overflow.
- Off-by-One Guard: Strict bounds verification on loop and slice invariants (
range(n)vsrange(n + 1)). - Asymptotic Complexity Bound: Confirms optimal algorithmic time/space constraints.
3. Tri-Phase Elimination Protocol (TPEP)
- Maintained the breakthrough on College Computer Science & Formal Logic (55.5%), completely preventing the 25% random-guess collapse of verbose CoT models.
4. Curriculum Structure (3,200 Pure Golden Samples)
- 1,100 Compiler & Systems Samples: C++20 SPSC queues, LLVM SSA dominance frontiers, AVX2 FMA kernels, Rust lock-free memory pools.
- 1,000 Formal Logic & CS Theory Samples: 949 real academic MMLU questions with counter-example falsification.
- 1,100 Real GSM8K Math Samples: Diverse real word problems with calculator scratchpads.
- 100% Zero Chinese tokens, 0% finance, 0% psychology chitchat.
📦 Quantized GGUF Triplet (Available Now)
Compiled natively with CMake AVX2/SIMD:
| File Name | Precision | File Size | Recommended Target |
|---|---|---|---|
qwen-compiler-mind-v3.2.1-Q8_0.gguf |
8-bit | ~4.48 GB | Reference accuracy, server inference, benchmarking |
qwen-compiler-mind-v3.2.1-Q6_K.gguf |
6-bit | ~3.46 GB | Sweet spot: Laptop CPU / Intel Iris Xe (~22 tok/s) |
qwen-compiler-mind-v3.2.1-Q4_K_M.gguf |
4-bit | ~2.59 GB | Low-memory edge devices, mobile RAM |
🚀 Running with Ollama
# 1. Download Modelfile and Q6_K GGUF
ollama create qwen-compiler-mind-v3.2.1 -f Modelfile
# 2. Run interactively
ollama run qwen-compiler-mind-v3.2.1
📜 Citations & Architecture Credits
- Architects: Ritmada (@RitmadaPrompt) & Tri (@Trivnpk)
- Base Architecture: Qwen2.5-Coder-3B-Instruct / Continual Adaptation on Organic Reasoning Datasets
- License: Apache 2.0
- Downloads last month
- 1,903
Model tree for Trivnpk/Qwen-Compiler-Mind-4B
Unable to build the model tree, the base model loops to the model itself. Learn more.