Instructions to use Mungert/DiffuCoder-7B-Instruct-GGUF 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 Mungert/DiffuCoder-7B-Instruct-GGUF 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 Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
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 Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
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 Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Mungert/DiffuCoder-7B-Instruct-GGUF with Ollama:
ollama run hf.co/Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
- Unsloth Studio
How to use Mungert/DiffuCoder-7B-Instruct-GGUF 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 Mungert/DiffuCoder-7B-Instruct-GGUF 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 Mungert/DiffuCoder-7B-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mungert/DiffuCoder-7B-Instruct-GGUF to start chatting
- Pi
How to use Mungert/DiffuCoder-7B-Instruct-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
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": "Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Mungert/DiffuCoder-7B-Instruct-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mungert/DiffuCoder-7B-Instruct-GGUF: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 "Mungert/DiffuCoder-7B-Instruct-GGUF: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"
- Docker Model Runner
How to use Mungert/DiffuCoder-7B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
- Lemonade
How to use Mungert/DiffuCoder-7B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.DiffuCoder-7B-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Mungert/DiffuCoder-7B-Instruct-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Mungert/DiffuCoder-7B-Instruct-GGUF: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 Mungert/DiffuCoder-7B-Instruct-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
| base_model: | |
| - apple/DiffuCoder-7B-Base | |
| tags: | |
| - code | |
| - text-diffusion-model | |
| - diffusion large language model | |
| license: unknown | |
| # <span style="color: #7FFF7F;">DiffuCoder-7B-Instruct GGUF Models</span> | |
| ## <span style="color: #7F7FFF;">Model Generation Details</span> | |
| This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`21c02174`](https://github.com/ggerganov/llama.cpp/commit/21c021745d781edf9c44b4972ef6cbbf53b0ecff). | |
| --- | |
| ## <span style="color: #7FFF7F;">Quantization Beyond the IMatrix</span> | |
| I've been experimenting with a new quantization approach that selectively elevates the precision of key layers beyond what the default IMatrix configuration provides. | |
| In my testing, standard IMatrix quantization underperforms at lower bit depths, especially with Mixture of Experts (MoE) models. To address this, I'm using the `--tensor-type` option in `llama.cpp` to manually "bump" important layers to higher precision. You can see the implementation here: | |
| 👉 [Layer bumping with llama.cpp](https://github.com/Mungert69/GGUFModelBuilder/blob/main/model-converter/tensor_list_builder.py) | |
| While this does increase model file size, it significantly improves precision for a given quantization level. | |
| ### **I'd love your feedback—have you tried this? How does it perform for you?** | |
| --- | |
| <a href="https://readyforquantum.com/huggingface_gguf_selection_guide.html" style="color: #7FFF7F;"> | |
| Click here to get info on choosing the right GGUF model format | |
| </a> | |
| --- | |
| <!--Begin Original Model Card--> | |
| ### DiffuCoder-7B-Instruct | |
| The DiffuCoder-7B-Instruct model builds on the DiffuCoder-7B-Base checkpoint with instruction-tuning to better follow code-related prompts. | |
| - Training recipe: with a newly introduced pad token, we train this model with fixed length conditionally on [OpenCoder-SFT](https://huggingface.co/datasets/OpenCoder-LLM/opc-sft-stage2) data for 5 epochs. | |
| - Benchmarks: Demonstrates stronger instruction-following capabilities than the Base model. | |
| #### More details and usage examples: | |
| - Paper: [DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation](https://arxiv.org/abs/2506.20639) | |
| - GitHub: https://github.com/apple/ml-diffucoder | |
| ``` | |
| import torch | |
| from transformers import AutoModel, AutoTokenizer | |
| model_path = "apple/DiffuCoder-7B-Instruct" | |
| model = AutoModel.from_pretrained(model_path, torch_dtype=torch.bfloat16, trust_remote_code=True) | |
| tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) | |
| model = model.to("cuda").eval() | |
| query = "Write a function to find the shared elements from the given two lists." | |
| prompt = f"""<|im_start|>system | |
| You are a helpful assistant.<|im_end|> | |
| <|im_start|>user | |
| {query.strip()} | |
| <|im_end|> | |
| <|im_start|>assistant | |
| """ ## following the template of qwen; you can also use apply_chat_template function | |
| TOKEN_PER_STEP = 1 # diffusion timesteps * TOKEN_PER_STEP = total new tokens | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| input_ids = inputs.input_ids.to(device="cuda") | |
| attention_mask = inputs.attention_mask.to(device="cuda") | |
| output = model.diffusion_generate( | |
| input_ids, | |
| attention_mask=attention_mask, | |
| max_new_tokens=256, | |
| output_history=True, | |
| return_dict_in_generate=True, | |
| steps=256//TOKEN_PER_STEP, | |
| temperature=0.3, | |
| top_p=0.95, | |
| alg="entropy", | |
| alg_temp=0., | |
| ) | |
| generations = [ | |
| tokenizer.decode(g[len(p) :].tolist()) | |
| for p, g in zip(input_ids, output.sequences) | |
| ] | |
| print(generations[0].split('<|dlm_pad|>')[0]) | |
| ``` | |
| #### Acknowledgement | |
| To power this HuggingFace model release, we reuse [Dream](https://huggingface.co/Dream-org/Dream-v0-Base-7B)'s modeling architecture and generation utils. | |
| <!--End Original Model Card--> | |
| --- | |
| # <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span> | |
| Help me test my **AI-Powered Quantum Network Monitor Assistant** with **quantum-ready security checks**: | |
| 👉 [Quantum Network Monitor](https://readyforquantum.com/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) | |
| The full Open Source Code for the Quantum Network Monitor Service available at my github repos ( repos with NetworkMonitor in the name) : [Source Code Quantum Network Monitor](https://github.com/Mungert69). You will also find the code I use to quantize the models if you want to do it yourself [GGUFModelBuilder](https://github.com/Mungert69/GGUFModelBuilder) | |
| 💬 **How to test**: | |
| Choose an **AI assistant type**: | |
| - `TurboLLM` (GPT-4.1-mini) | |
| - `HugLLM` (Hugginface Open-source models) | |
| - `TestLLM` (Experimental CPU-only) | |
| ### **What I’m Testing** | |
| I’m pushing the limits of **small open-source models for AI network monitoring**, specifically: | |
| - **Function calling** against live network services | |
| - **How small can a model go** while still handling: | |
| - Automated **Nmap security scans** | |
| - **Quantum-readiness checks** | |
| - **Network Monitoring tasks** | |
| 🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads on huggingface docker space): | |
| - ✅ **Zero-configuration setup** | |
| - ⏳ 30s load time (slow inference but **no API costs**) . No token limited as the cost is low. | |
| - 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate! | |
| ### **Other Assistants** | |
| 🟢 **TurboLLM** – Uses **gpt-4.1-mini** : | |
| - **It performs very well but unfortunatly OpenAI charges per token. For this reason tokens usage is limited. | |
| - **Create custom cmd processors to run .net code on Quantum Network Monitor Agents** | |
| - **Real-time network diagnostics and monitoring** | |
| - **Security Audits** | |
| - **Penetration testing** (Nmap/Metasploit) | |
| 🔵 **HugLLM** – Latest Open-source models: | |
| - 🌐 Runs on Hugging Face Inference API. Performs pretty well using the lastest models hosted on Novita. | |
| ### 💡 **Example commands you could test**: | |
| 1. `"Give me info on my websites SSL certificate"` | |
| 2. `"Check if my server is using quantum safe encyption for communication"` | |
| 3. `"Run a comprehensive security audit on my server"` | |
| 4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a [Quantum Network Monitor Agent](https://readyforquantum.com/Download/?utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) to run the .net code on. This is a very flexible and powerful feature. Use with caution! | |
| ### Final Word | |
| I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful. | |
| If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone. | |
| I'm also open to job opportunities or sponsorship. | |
| Thank you! 😊 | |