Text Generation
GGUF
English
llama.cpp
qwen3
coding
code-assistant
software-engineering
agent
ollama
local-ai
developer-tools
imatrix
conversational
Instructions to use midnightcoderagent/MidnightCoder-30B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use midnightcoderagent/MidnightCoder-30B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="midnightcoderagent/MidnightCoder-30B", filename="MidnightCoder-30B.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use midnightcoderagent/MidnightCoder-30B 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 midnightcoderagent/MidnightCoder-30B # Run inference directly in the terminal: llama cli -hf midnightcoderagent/MidnightCoder-30B
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf midnightcoderagent/MidnightCoder-30B # Run inference directly in the terminal: llama cli -hf midnightcoderagent/MidnightCoder-30B
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 midnightcoderagent/MidnightCoder-30B # Run inference directly in the terminal: ./llama-cli -hf midnightcoderagent/MidnightCoder-30B
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 midnightcoderagent/MidnightCoder-30B # Run inference directly in the terminal: ./build/bin/llama-cli -hf midnightcoderagent/MidnightCoder-30B
Use Docker
docker model run hf.co/midnightcoderagent/MidnightCoder-30B
- LM Studio
- Jan
- vLLM
How to use midnightcoderagent/MidnightCoder-30B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "midnightcoderagent/MidnightCoder-30B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "midnightcoderagent/MidnightCoder-30B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/midnightcoderagent/MidnightCoder-30B
- Ollama
How to use midnightcoderagent/MidnightCoder-30B with Ollama:
ollama run hf.co/midnightcoderagent/MidnightCoder-30B
- Unsloth Studio
How to use midnightcoderagent/MidnightCoder-30B 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 midnightcoderagent/MidnightCoder-30B 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 midnightcoderagent/MidnightCoder-30B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for midnightcoderagent/MidnightCoder-30B to start chatting
- Pi
How to use midnightcoderagent/MidnightCoder-30B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf midnightcoderagent/MidnightCoder-30B
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": "midnightcoderagent/MidnightCoder-30B" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use midnightcoderagent/MidnightCoder-30B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf midnightcoderagent/MidnightCoder-30B
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 midnightcoderagent/MidnightCoder-30B
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use midnightcoderagent/MidnightCoder-30B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf midnightcoderagent/MidnightCoder-30B
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 "midnightcoderagent/MidnightCoder-30B" \ --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 midnightcoderagent/MidnightCoder-30B with Docker Model Runner:
docker model run hf.co/midnightcoderagent/MidnightCoder-30B
- Lemonade
How to use midnightcoderagent/MidnightCoder-30B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull midnightcoderagent/MidnightCoder-30B
Run and chat with the model
lemonade run user.MidnightCoder-30B-{{QUANT_TAG}}List all available models
lemonade list
File size: 4,990 Bytes
c4ca671 7029e38 a20c4cc 7029e38 a20c4cc 7029e38 8eb39de 7029e38 a20c4cc 7029e38 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | ---
license: apache-2.0
base_model: Qwen/Qwen3-Coder-30B-A3B-Instruct
library_name: llama.cpp
pipeline_tag: text-generation
language:
- en
tags:
- gguf
- qwen3
- coding
- code-assistant
- software-engineering
- agent
- llama.cpp
- ollama
- local-ai
- developer-tools
---
# π MidnightCoder-30B-GGUF
> **A GGUF distribution of Qwen3-Coder-30B-A3B-Instruct optimized for the Midnight Coder software engineering agent.**
MidnightCoder-30B-GGUF is designed for developers who want to run a powerful coding model locally using **llama.cpp**, **Ollama**, **LM Studio**, or any GGUF-compatible inference engine.
This distribution is optimized for the **Midnight Coder** agent but is fully compatible with any coding agent or workflow. It excels at structured, specification-driven software engineering while remaining suitable for general-purpose coding tasks.
## π Midnight Coder Agent
- **GitHub:** https://github.com/midnightcoderagent/Midnight-Coder
- **Website:** https://midnightcoderagent.github.io
- **Install:** npm install -g midnight-coder (Linux support currently available. Windows and macOS support coming soon.)
- **Issues & Feature Requests:** https://github.com/midnightcoderagent/Midnight-Coder/issues
---
# Features
- π Optimized for software engineering
- π Specification-driven development
- π€ Designed for AI coding agents
- π§ Compatible with llama.cpp
- π¦ Compatible with Ollama
- π» Local-first development
- π Strong support for large codebases
- π Refactoring and debugging assistance
- π§ͺ Test generation support
- π Documentation generation
---
# Base Model
This model is based on:
**Qwen3-Coder-30B-A3B-Instruct**
All credit for the pretrained model belongs to the **Qwen Team (Alibaba)**.
This repository distributes the model in **GGUF** format for local inference.
---
# About Midnight Coder
Midnight Coder is an open-source AI coding assistant focused on structured software engineering.
Instead of behaving like a generic chatbot, Midnight Coder follows an engineering workflow centered around planning, specifications, implementation, and verification.
Typical workflow:
1. Understand the task
2. Create a technical specification
3. Define implementation scope
4. Implement changes
5. Verify results
6. Report completed work
This workflow helps produce predictable, maintainable, and review-friendly code.
---
# Intended Use
MidnightCoder-30B-GGUF is suitable for:
- Software Engineering
- Backend Development
- Frontend Development
- API Design
- SQL
- Docker
- DevOps
- Linux
- Code Review
- Refactoring
- Documentation
- Debugging
- Architecture Discussions
---
# Compatible Software
The model can be used with:
- llama.cpp
- Ollama
- LM Studio
- Open WebUI
- Jan
- KoboldCpp
- Text Generation WebUI
- Any GGUF-compatible runtime
---
# Recommended Context
Recommended context sizes:
| Context | Recommended Usage |
|----------|-------------------|
| 8K | Small projects |
| 16K | General development |
| 32K | Large repositories |
| 64K+ | Complex multi-file projects (hardware permitting) |
---
# Quantization
This repository provides the model in GGUF format.
The quantization is indicated in the filename.
Examples:
- Q4_K_M
- Q5_K_M
- Q6_K
- Q8_0
---
# Example (llama.cpp)
```bash
llama-cli \
-m MidnightCoder-30B-Q4_K_M.gguf \
-c 32768
```
---
# Example (Ollama)
Create a Modelfile:
```text
FROM MidnightCoder-30B-Q4_K_M.gguf
SYSTEM """
<Midnight Coder system prompt>
"""
```
Build:
```bash
ollama create midnightcoder -f Modelfile
```
Run:
```bash
ollama run midnightcoder
```
---
# Performance Notes
The required memory depends on:
- Quantization
- Context size
- KV cache precision
- Runtime configuration
Lower quantizations reduce memory usage while higher quantizations generally preserve more model quality.
---
# Limitations
Like any language model:
- Responses may contain inaccuracies.
- Generated code should always be reviewed.
- Security-sensitive code requires human validation.
- Production deployments should include proper testing.
---
# License
This repository distributes a GGUF version of the original model.
Please refer to the original **Qwen3-Coder-30B-A3B-Instruct** license for licensing terms regarding the base model.
---
# Acknowledgements
Special thanks to:
- Alibaba Qwen Team
- Hugging Face
- llama.cpp
- Ollama
for making local AI development accessible to the community.
---
# Midnight Coder
Midnight Coder is an open-source project dedicated to building high-quality AI tools for software developers.
## Links
**GitHub**
https://github.com/midnightcoderagent/Midnight-Coder
**Organization**
https://huggingface.co/MidnightCoder
---
## Disclaimer
This repository is an independent GGUF distribution based on **Qwen3-Coder-30B-A3B-Instruct**.
It is **not an official release** from the Qwen Team or Alibaba.
All trademarks and original model rights belong to their respective owners. |