Instructions to use MalxTech/MalxLabs-Fable5_QwenCoder 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 MalxTech/MalxLabs-Fable5_QwenCoder 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 MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M # Run inference directly in the terminal: llama cli -hf MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M # Run inference directly in the terminal: llama cli -hf MalxTech/MalxLabs-Fable5_QwenCoder: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 MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
Use Docker
docker model run hf.co/MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use MalxTech/MalxLabs-Fable5_QwenCoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MalxTech/MalxLabs-Fable5_QwenCoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MalxTech/MalxLabs-Fable5_QwenCoder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
- Ollama
How to use MalxTech/MalxLabs-Fable5_QwenCoder with Ollama:
ollama run hf.co/MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
- Unsloth Desktop
- Pi
How to use MalxTech/MalxLabs-Fable5_QwenCoder with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MalxTech/MalxLabs-Fable5_QwenCoder: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": "MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use MalxTech/MalxLabs-Fable5_QwenCoder with Docker Model Runner:
docker model run hf.co/MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
- Lemonade
How to use MalxTech/MalxLabs-Fable5_QwenCoder with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
Run and chat with the model
lemonade run user.MalxLabs-Fable5_QwenCoder-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use MalxTech/MalxLabs-Fable5_QwenCoder with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MalxTech/MalxLabs-Fable5_QwenCoder: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 MalxTech/MalxLabs-Fable5_QwenCoder:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MalxTech/MalxLabs-Fable5_QwenCoder with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MalxTech/MalxLabs-Fable5_QwenCoder: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 "MalxTech/MalxLabs-Fable5_QwenCoder: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"
|
Download README.md from MalxTech/MalxLabs-Fable5_QwenCoder: direct link, hf CLI and curl.
- Browser
- Download file 4.71 kB
-
https://huggingface.co/MalxTech/MalxLabs-Fable5_QwenCoder/resolve/main/README.md
- Command line
-
hf download hf://MalxTech/MalxLabs-Fable5_QwenCoder/README.md
-
curl -L -o README.md https://huggingface.co/MalxTech/MalxLabs-Fable5_QwenCoder/resolve/main/README.md
4.71 kB
| language: | |
| - en | |
| license: apache-2.0 | |
| tags: | |
| - gguf | |
| - code | |
| - reasoning | |
| - agentic | |
| - qwen2 | |
| - dpo | |
| - llama.cpp | |
| base_model: Qwen/Qwen2.5-Coder-7B-Instruct | |
| pipeline_tag: text-generation | |
| # MalxLabs-Fable5_QwenCoder (Fable-Coder-7B-DPO) | |
| <div align="center"> | |
| [](https://github.com/YoMosa2009/MalxLabs-Fable5_QwenCoder) | |
| [](LICENSE) | |
| [](#model-details) | |
| [-indigo.svg)](#benchmark-performance) | |
| **A specialized 4.36 GB Q4_K_M GGUF model optimized for multi-turn agent tool execution and logical programming correctness.** | |
| [π GitHub Benchmark & Harness](https://github.com/YoMosa2009/MalxLabs-Fable5_QwenCoder) β’ [π Findings & Transcripts](https://github.com/YoMosa2009/MalxLabs-Fable5_QwenCoder/blob/main/FINDINGS.md) | |
| </div> | |
| --- | |
| ## Overview | |
| **Fable-Coder-7B-DPO** is an aligned, post-trained derivative of `Qwen/Qwen2.5-Coder-7B-Instruct`. It was specifically tuned to eliminate arithmetic hallucinations, handle strict constraints, and reliably execute tool paths in autonomous agent workflows. | |
| In a closed comparative benchmark of 33 tasks across 7 domains against its base model, Fable-Coder scored **92/115 (80.0%)** versus **88/115 (76.5%)** for `Qwen2.5-Coder-7B-Instruct`, demonstrating a **+20.0% improvement in complex reasoning** while matching baseline coding capability. | |
| --- | |
| ## Architectural Pipeline Flow | |
| ``` | |
| [Base Model: Qwen2.5-Coder-7B] (Natively Loaded in BF16 Precision) | |
| β | |
| βΌ | |
| [Stage 1: Multi-Turn SFT with LoRA] βββΊ Adapts agent behavioral trajectories via ChatML | |
| β | |
| βΌ | |
| [Stage 2: Direct Preference Optimization] βββΊ Aligns tool call decisions & correct syntax | |
| β | |
| βΌ | |
| [Stage 3: Full FP16 Parameter Merge] βββΊ Fuses low-rank adapters back into base model | |
| β | |
| βΌ | |
| [Stage 4: Tokenizer & GGUF Compilation] βββΊ Converts PyTorch checkpoint to GGUF format | |
| β | |
| βΌ | |
| [Stage 5: Q4_K_M CMake Quantization] βββΊ Compresses FP16 parameters to 4.36 GB binary | |
| ``` | |
| ### Key Training Highlights | |
| 1. **Supervised Fine-Tuning (SFT) with LoRA**: Injected LoRA matrices (r=8, alpha=16) targeting attention projection layers (`q_proj`, `v_proj`) using actual agent trajectories from `MoreThought/Fable-5.1-Max-Reasoning-Filtered-5000x`. | |
| 2. **Direct Preference Optimization (DPO)**: Pairwise dataset contrasting clean, efficient tool invocations against redundant loops and lazy stubs (positive reward margin peak: 0.01457). | |
| 3. **Full FP16 Merge & Tokenizer Patch**: Fused weights into native BF16 base and patched tokenizer configuration for clean GGUF compilation. | |
| 4. **CMake Q4_K_M Quantization**: Compressed the 14.5 GB weights to a single-file **4.36 GB binary** (~70% storage reduction), fitting within ~5.1 GB VRAM on consumer GPUs. | |
| --- | |
| ## Benchmark Comparison | |
| | Category | Fable-Coder-7B-DPO | Qwen2.5-Coder-7B-Instruct | Delta | | |
| |---|:---:|:---:|:---:| | |
| | **Overall Score** | **92 / 115 (80.0%)** | 88 / 115 (76.5%) | **+4 pts (+3.5%) Fable** | | |
| | **Reasoning** | **17 / 20 (85.0%)** | 13 / 20 (65.0%) | **+4 pts (+20.0%) Fable** | | |
| | **Coding** | 25 / 35 (71.4%) | 25 / 35 (71.4%) | Tied | | |
| | **Agentic Planning** | 21 / 25 (84.0%) | 21 / 25 (84.0%) | Tied | | |
| | **Security** | 9 / 11 (81.8%) | 9 / 11 (81.8%) | Tied | | |
| | **Knowledge** | 8 / 8 (100.0%) | 8 / 8 (100.0%) | Tied | | |
| | **Context Retention** | 6 / 6 (100.0%) | 6 / 6 (100.0%) | Tied | | |
| --- | |
| ## Quickstart & Usage | |
| ### Using `llama.cpp` | |
| ```bash | |
| llama-cli -m fable-coder-7b-dpo.Q4_K_M.gguf -p "Write a Python function to merge intervals without mutating the input." -n 512 | |
| ``` | |
| ### Using `huggingface-cli` | |
| ```bash | |
| huggingface-cli download MalxTech/MalxLabs-Fable5_QwenCoder fable-coder-7b-dpo.Q4_K_M.gguf --local-dir . | |
| ``` | |
| ### Using Ollama | |
| Create a `Modelfile`: | |
| ```dockerfile | |
| FROM ./fable-coder-7b-dpo.Q4_K_M.gguf | |
| TEMPLATE """<|im_start|>system | |
| {{ .System }}<|im_end|> | |
| <|im_start|>user | |
| {{ .Prompt }}<|im_end|> | |
| <|im_start|>assistant | |
| """ | |
| PARAMETER stop "<|im_start|>" | |
| PARAMETER stop "<|im_end|>" | |
| ``` | |
| Then build and run: | |
| ```bash | |
| ollama create fable-coder -f Modelfile | |
| ollama run fable-coder | |
| ``` | |
| --- | |
| ## Citation & Acknowledgments | |
| * Base model: [Qwen/Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) | |
| * SFT dataset: [MoreThought/Fable-5.1-Max-Reasoning-Filtered-5000x](https://huggingface.co/datasets/MoreThought/Fable-5.1-Max-Reasoning-Filtered-5000x) | |
| * Full benchmark repository: [YoMosa2009/MalxLabs-Fable5_QwenCoder](https://github.com/YoMosa2009/MalxLabs-Fable5_QwenCoder) | |