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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,16 +1,243 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
| 3 |
language:
|
| 4 |
-
- en
|
| 5 |
-
base_model:
|
| 6 |
-
- Qwen/Qwen3-Coder-30B-A3B-Instruct
|
| 7 |
tags:
|
| 8 |
-
- gguf
|
| 9 |
-
- qwen3
|
| 10 |
-
- coding
|
| 11 |
-
-
|
| 12 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3-Coder-30B-A3B-Instruct
|
| 4 |
+
library_name: llama.cpp
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
language:
|
| 7 |
+
- en
|
|
|
|
|
|
|
| 8 |
tags:
|
| 9 |
+
- gguf
|
| 10 |
+
- qwen3
|
| 11 |
+
- coding
|
| 12 |
+
- code-assistant
|
| 13 |
+
- software-engineering
|
| 14 |
+
- agent
|
| 15 |
+
- llama.cpp
|
| 16 |
+
- ollama
|
| 17 |
+
- local-ai
|
| 18 |
+
- developer-tools
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# π MidnightCoder-30B-GGUF
|
| 22 |
+
|
| 23 |
+
> **A GGUF distribution of Qwen3-Coder-30B-A3B-Instruct optimized for the Midnight Coder software engineering agent.**
|
| 24 |
+
|
| 25 |
+
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.
|
| 26 |
+
|
| 27 |
+
This distribution is intended to work together with the **Midnight Coder** agent, providing a structured and specification-driven software engineering workflow.
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
# Features
|
| 32 |
+
|
| 33 |
+
- π Optimized for software engineering
|
| 34 |
+
- π Specification-driven development
|
| 35 |
+
- π€ Designed for AI coding agents
|
| 36 |
+
- π§ Compatible with llama.cpp
|
| 37 |
+
- π¦ Compatible with Ollama
|
| 38 |
+
- π» Local-first development
|
| 39 |
+
- π Strong support for large codebases
|
| 40 |
+
- π Refactoring and debugging assistance
|
| 41 |
+
- π§ͺ Test generation support
|
| 42 |
+
- π Documentation generation
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
# Base Model
|
| 47 |
+
|
| 48 |
+
This model is based on:
|
| 49 |
+
|
| 50 |
+
**Qwen3-Coder-30B-A3B-Instruct**
|
| 51 |
+
|
| 52 |
+
All credit for the pretrained model belongs to the **Qwen Team (Alibaba)**.
|
| 53 |
+
|
| 54 |
+
This repository distributes the model in **GGUF** format for local inference.
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
# About Midnight Coder
|
| 59 |
+
|
| 60 |
+
Midnight Coder is an open-source AI coding assistant focused on structured software engineering.
|
| 61 |
+
|
| 62 |
+
Instead of behaving like a generic chatbot, Midnight Coder follows an engineering workflow centered around planning, specifications, implementation, and verification.
|
| 63 |
+
|
| 64 |
+
Typical workflow:
|
| 65 |
+
|
| 66 |
+
1. Understand the task
|
| 67 |
+
2. Create a technical specification
|
| 68 |
+
3. Define implementation scope
|
| 69 |
+
4. Implement changes
|
| 70 |
+
5. Verify results
|
| 71 |
+
6. Report completed work
|
| 72 |
+
|
| 73 |
+
This workflow helps produce predictable, maintainable, and review-friendly code.
|
| 74 |
+
|
| 75 |
+
---
|
| 76 |
+
|
| 77 |
+
# Intended Use
|
| 78 |
+
|
| 79 |
+
MidnightCoder-30B-GGUF is suitable for:
|
| 80 |
+
|
| 81 |
+
- Software Engineering
|
| 82 |
+
- Backend Development
|
| 83 |
+
- Frontend Development
|
| 84 |
+
- API Design
|
| 85 |
+
- SQL
|
| 86 |
+
- Docker
|
| 87 |
+
- DevOps
|
| 88 |
+
- Linux
|
| 89 |
+
- Code Review
|
| 90 |
+
- Refactoring
|
| 91 |
+
- Documentation
|
| 92 |
+
- Debugging
|
| 93 |
+
- Architecture Discussions
|
| 94 |
+
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
# Compatible Software
|
| 98 |
+
|
| 99 |
+
The model can be used with:
|
| 100 |
+
|
| 101 |
- llama.cpp
|
| 102 |
+
- Ollama
|
| 103 |
+
- LM Studio
|
| 104 |
+
- Open WebUI
|
| 105 |
+
- Jan
|
| 106 |
+
- KoboldCpp
|
| 107 |
+
- Text Generation WebUI
|
| 108 |
+
- Any GGUF-compatible runtime
|
| 109 |
+
|
| 110 |
+
---
|
| 111 |
+
|
| 112 |
+
# Recommended Context
|
| 113 |
+
|
| 114 |
+
Recommended context sizes:
|
| 115 |
+
|
| 116 |
+
| Context | Recommended Usage |
|
| 117 |
+
|----------|-------------------|
|
| 118 |
+
| 8K | Small projects |
|
| 119 |
+
| 16K | General development |
|
| 120 |
+
| 32K | Large repositories |
|
| 121 |
+
| 64K+ | Complex multi-file projects (hardware permitting) |
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
# Quantization
|
| 126 |
+
|
| 127 |
+
This repository provides the model in GGUF format.
|
| 128 |
+
|
| 129 |
+
The quantization is indicated in the filename.
|
| 130 |
+
|
| 131 |
+
Examples:
|
| 132 |
+
|
| 133 |
+
- Q4_K_M
|
| 134 |
+
- Q5_K_M
|
| 135 |
+
- Q6_K
|
| 136 |
+
- Q8_0
|
| 137 |
+
|
| 138 |
+
---
|
| 139 |
+
|
| 140 |
+
# Example (llama.cpp)
|
| 141 |
+
|
| 142 |
+
```bash
|
| 143 |
+
llama-cli \
|
| 144 |
+
-m MidnightCoder-30B-Q4_K_M.gguf \
|
| 145 |
+
-c 32768
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+
---
|
| 149 |
+
|
| 150 |
+
# Example (Ollama)
|
| 151 |
+
|
| 152 |
+
Create a Modelfile:
|
| 153 |
+
|
| 154 |
+
```text
|
| 155 |
+
FROM MidnightCoder-30B-Q4_K_M.gguf
|
| 156 |
+
|
| 157 |
+
SYSTEM """
|
| 158 |
+
<Midnight Coder system prompt>
|
| 159 |
+
"""
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
Build:
|
| 163 |
+
|
| 164 |
+
```bash
|
| 165 |
+
ollama create midnightcoder -f Modelfile
|
| 166 |
+
```
|
| 167 |
+
|
| 168 |
+
Run:
|
| 169 |
+
|
| 170 |
+
```bash
|
| 171 |
+
ollama run midnightcoder
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
---
|
| 175 |
+
|
| 176 |
+
# Performance Notes
|
| 177 |
+
|
| 178 |
+
The required memory depends on:
|
| 179 |
+
|
| 180 |
+
- Quantization
|
| 181 |
+
- Context size
|
| 182 |
+
- KV cache precision
|
| 183 |
+
- Runtime configuration
|
| 184 |
+
|
| 185 |
+
Lower quantizations reduce memory usage while higher quantizations generally preserve more model quality.
|
| 186 |
+
|
| 187 |
+
---
|
| 188 |
+
|
| 189 |
+
# Limitations
|
| 190 |
+
|
| 191 |
+
Like any language model:
|
| 192 |
+
|
| 193 |
+
- Responses may contain inaccuracies.
|
| 194 |
+
- Generated code should always be reviewed.
|
| 195 |
+
- Security-sensitive code requires human validation.
|
| 196 |
+
- Production deployments should include proper testing.
|
| 197 |
+
|
| 198 |
+
---
|
| 199 |
+
|
| 200 |
+
# License
|
| 201 |
+
|
| 202 |
+
This repository distributes a GGUF version of the original model.
|
| 203 |
+
|
| 204 |
+
Please refer to the original **Qwen3-Coder-30B-A3B-Instruct** license for licensing terms regarding the base model.
|
| 205 |
+
|
| 206 |
+
---
|
| 207 |
+
|
| 208 |
+
# Acknowledgements
|
| 209 |
+
|
| 210 |
+
Special thanks to:
|
| 211 |
+
|
| 212 |
+
- Alibaba Qwen Team
|
| 213 |
+
- Hugging Face
|
| 214 |
+
- llama.cpp
|
| 215 |
+
- Ollama
|
| 216 |
+
|
| 217 |
+
for making local AI development accessible to the community.
|
| 218 |
+
|
| 219 |
+
---
|
| 220 |
+
|
| 221 |
+
# Midnight Coder
|
| 222 |
+
|
| 223 |
+
Midnight Coder is an open-source project dedicated to building high-quality AI tools for software developers.
|
| 224 |
+
|
| 225 |
+
## Links
|
| 226 |
+
|
| 227 |
+
**GitHub**
|
| 228 |
+
|
| 229 |
+
https://github.com/midnightcoderagent/Midnight-Coder
|
| 230 |
+
|
| 231 |
+
**Organization**
|
| 232 |
+
|
| 233 |
+
https://huggingface.co/MidnightCoder
|
| 234 |
+
|
| 235 |
+
---
|
| 236 |
+
|
| 237 |
+
## Disclaimer
|
| 238 |
+
|
| 239 |
+
This repository is an independent GGUF distribution based on **Qwen3-Coder-30B-A3B-Instruct**.
|
| 240 |
+
|
| 241 |
+
It is **not an official release** from the Qwen Team or Alibaba.
|
| 242 |
+
|
| 243 |
+
All trademarks and original model rights belong to their respective owners.
|