How to use from the
Use from the
llama-cpp-python library
# !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?"
		}
	]
)

🌙 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


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)

llama-cli \
-m MidnightCoder-30B-Q4_K_M.gguf \
-c 32768

Example (Ollama)

Create a Modelfile:

FROM MidnightCoder-30B-Q4_K_M.gguf

SYSTEM """
<Midnight Coder system prompt>
"""

Build:

ollama create midnightcoder -f Modelfile

Run:

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.

Downloads last month
251
GGUF
Model size
31B params
Architecture
qwen3moe
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for midnightcoderagent/MidnightCoder-30B

Quantized
(151)
this model