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
- 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
Architects: Tri (@Trivnpk) & Ritmada (@RitmadaPrompt)
Base Model: empero-ai/Qwen3.8-4B-Distill (4.3B Parameters · 32 Layers · Hidden Dimension 2560)
Calibrated Ground Zero: Layer 26 / 32
⚡ Quick Start: 1-Click Ollama Deployment
This repository provides quantized GGUF weights ready for Ollama, llama.cpp, and LM Studio:
| Artifact | Size | Description / Target |
|---|---|---|
qwen-compiler-mind-4b-Q6_K.gguf |
~2.8 GB | Recommended Sweet Spot: 99.5% FP16 accuracy, fast inference on PC/Mac. |
qwen-compiler-mind-4b-Q4_K_M.gguf |
~2.1 GB | Lightweight RAM-optimized build for mobile and lower-spec laptops. |
qwen-compiler-mind-4b-Q8_0.gguf |
~3.6 GB | Reference benchmark precision. |
Run with Ollama:
# Clone the repository files
git clone https://huggingface.co/Trivnpk/Qwen-Compiler-Mind-4B
cd Qwen-Compiler-Mind-4B
# Create and run the model in Ollama
ollama create qwen-compiler-mind -f Modelfile
ollama run qwen-compiler-mind
🏛️ Isomorphic Latent Compensation (PyTorch Bundle)
In addition to GGUF artifacts, this repository includes the calibrated representation steering bundle: qwen_isomorphic_bundle.pt (calibrated at Layer 26).
The Law of Isomorphic Latent Compensation:
"Qwen là mô hình của Trung Quốc — Xóa cái gì bắt buộc phải bù đắp ngay cái đó!"
Instead of hard zeroing (which tears the activation manifold and breaks RMSNorm scaling), this engine applies Soft Margin Attenuation ($\tau$) + Cross-Domain Energy Rebalancing:
accompanied by strict $L_2$ Norm Conservation:
- Rút Phản Xạ Từ Chối $\to$ Bù Kỷ Luật Kỹ Sư Hệ Thống (
-Werror): Chuyển hóa vector từ chối kiểm duyệt thành tính khắt khe của compiler (ép kiểu an toànsize_t, bắt lỗi DMA, dọn dẹp LIFO). - Rút Lực Kéo Hán Tự $\to$ Bù Giàn Giáo Kỹ Thuật Anh-Việt: Neo giữ chuỗi suy luận bằng tiếng Anh POSIX và tiếng Việt kỹ thuật đời sống.
- Bảo Toàn Chuẩn $L_2$: Khóa chặt scale RMSNorm, ngăn chặn triệt để nổ logits.
Radar Localization Ground Zero:
- Đỉnh Từ Chối (Refusal Ground Zero):
Layer 26(Cường độ:15.4400) - Đỉnh Tiếng Trung (Chinese Ground Zero):
Layer 26(Cường độ:13.8238)
Python Inference with Hook Adapter:
import torch
from apply_transmutation import load_transmuted_qwen
model, tokenizer = load_transmuted_qwen(
base_repo="empero-ai/Qwen3.8-4B-Distill",
bundle_path="qwen_isomorphic_bundle.pt"
)
prompt = "Viết hàm C khởi tạo driver: acquire lock -> map DMA -> register IRQ. Nếu bước 3 lỗi, phải dọn dẹp theo đúng thứ tự LIFO."
formatted_input = f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n<think>\n"
inputs = tokenizer(formatted_input, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
📁 Repository File Structure
qwen-compiler-mind-4b-Q6_K.gguf: Primary GGUF quantized model.qwen-compiler-mind-4b-Q4_K_M.gguf: 4-bit medium quantized model.qwen-compiler-mind-4b-Q8_0.gguf: 8-bit quantized model.Modelfile: Ready-to-use Ollama configuration template.compiler_mind.gbnf: Grammar file for deterministic compiler-grade code generation.qwen_isomorphic_bundle.pt: Representation engineering tensors (Layer 26).apply_transmutation.py: Dynamic PyTorch forward hook loader.
- Downloads last month
- 173