license: apache-2.0
base_model: benjamin920101/Qwen3.8-9B-Distill-uncensored-heretic-china_uncensored_dpo
tags:
- qwen3
- gguf
- coding
- rust
- function-calling
- tool-use
- agents
- mcp
- reasoning
- cot
- uncensored
pipeline_tag: text-generation
language: - en
- pt
Qwen 3.8 9B Uncensored Heretic Ch. Enhanced V1 (GGUF)
📌 Executive Summary
🇧🇷 Resumo em Português
O Qwen 3.8 9B Uncensored Heretic Ch. Enhanced V1 é uma versão especializada e aprimorada via fine-tuning QLoRA de alto rigor a partir do modelo base Qwen3.8-9B-Distill-uncensored-heretic-china_uncensored_dpo. Esta versão foi intensamente treinada em 5 domínios críticos: Programação avançada (Rust First, Python, TypeScript e SQL), Lógica algorítmica e raciocínio profundo (Chain-of-Thought), Chamada de ferramentas e schemas estritos (Tool-Use / Function Calling), Orquestração autônoma de subagentes e Protocolo MCP (Model Context Protocol) & Skills. O modelo mantém sua natureza sem censura prévia, ao mesmo tempo em que eleva a confiabilidade de código e conformidade sintática, demonstrando um salto global de +137% de evolução matemática em testes de benchmark.
🇺🇸 English Summary
Qwen 3.8 9B Uncensored Heretic Ch. Enhanced V1 is a specialized, post-trained iteration of Qwen3.8-9B-Distill-uncensored-heretic-china_uncensored_dpo, enhanced through precision QLoRA fine-tuning. It has been trained across five core technical pillars: Advanced Programming (Idiomatic Rust First, Python, TypeScript, SQL), Algorithmic Logic and Deep Chain-of-Thought reasoning, Structured Function Calling and Tool-Use, Autonomous Multi-Agent Orchestration, and the Model Context Protocol (MCP) & Agentic Skills. The model preserves its uncensored foundation while dramatically improving structured reasoning, tool syntax compliance, and coding precision, achieving a +137% measured global intelligence increase across comprehensive benchmark evaluations.
📊 Benchmark Evaluations & Quantitative Intelligence Gains
The model was subjected to a rigorous 50-scenario benchmark suite covering the 5 targeted specialization areas, evaluated under identical criteria before and after training.
Comparative Performance Matrix
| Evaluation Category | Baseline (Pre-Training) | Enhanced V1 (Post-Training) | Absolute Gain | Relative Gain (%) |
|---|---|---|---|---|
| 🔌 Model Context Protocol (MCP) & Skills | 0.20 / 10.0 | 2.65 / 10.0 | +2.45 pts | +1225.0% 🚀 |
| 🤖 Autonomous Multi-Agent Orchestration | 0.30 / 10.0 | 2.67 / 10.0 | +2.37 pts | +790.0% 🚀 |
| 🛠️ Tool-Use & JSON Function Calling | 1.20 / 10.0 | 5.08 / 10.0 | +3.88 pts | +323.3% 🚀 |
| 🦀 Programming (Rust / Python / TS / SQL) | 3.80 / 10.0 | 6.26 / 10.0 | +2.46 pts | +64.7% 🚀 |
| 🧩 Algorithmic Logic & CoT Reasoning | 4.10 / 10.0 | 6.10 / 10.0 | +2.00 pts | +48.8% 🚀 |
| 🏆 GLOBAL COMPOSITE AVERAGE | 1.92 / 10.0 | 4.55 / 10.0 | +2.63 pts | +137.0% Overall Gain 🚀 |
Training Loss & Token Metrics
- Initial Training Loss:
1.205 - Final Training Loss:
0.6185(-51.3% error reduction) - Validation Loss:
0.5857(confirmed generalization without overfitting) - Token Prediction Accuracy: Jumped from
68.97%to83.51%(+14.54 percentage points) - Total Processed Tokens:
4,290,000+tokens across 1,000 optimization steps
🧠 Training Methodology & Architecture
Base Architecture
- Base Model: Qwen 3.8 9B Distill Uncensored Heretic DPO
- Architecture: Hybrid SSM (Gated DeltaNet / Mamba-style recurrent layers) + Full Attention Transformer layers
- Total Parameters: 9.4 Billion
QLoRA Fine-Tuning Setup
- Quantization: NF4 (4-bit NormalFloat) with double quantization and
torch.bfloat16compute dtype - Adapter Targets: All projection layers (
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj) - LoRA Hyperparameters:
- Rank ($r$):
16 - Alpha ($\alpha$):
32 - Dropout:
0.05 - Trainable Parameters:
29,622,272(~0.31% of total parameters)
- Rank ($r$):
- Optimization:
- Optimizer:
adamw_torch(PyTorch native) - Learning Rate:
2e-5with cosine decay and warmup - Batching: Micro-batch size
1, Gradient Accumulation steps8(Effective Batch Size =8) - Sequence Length:
896tokens - Precision: Native
bfloat16mixed precision
- Optimizer:
Fusion & Quantization Pipeline
- Weight Merging: The LoRA adapter was dequantized and merged in full 16-bit precision (
bfloat16) with the base model weights, producing a unified 17.9 GB model. - GGUF Native Quantization: Converted via
llama.cppusing exact 427-tensor layout compatibility:- Q6_K (~6.85 GB): High-precision quantization for maximum adherence to strict coding standards and JSON schemas.
- Q5_K_M (~6.02 GB): Compact, fast quantization optimized for quick interactive inference.
📚 Dataset Curation & Processing
A curated dataset of 18,491 total high-signal instruction-response pairs was created and normalized into canonical ChatML format:
- Coding Domain (
code_feedback) — 5,991 pairs:- Idiomatic Rust implementations (memory safety, zero-cost abstractions, Axum, Serde, Tokio async, concurrency).
- Python debugging, optimization, algorithm development, and SQL database schema optimization.
- Function Calling & Tool-Use (
xlam_tool_use) — 4,000 pairs:- Multi-parameter tool calls, schema validation, structured error recovery, and strict JSON output formats.
- Chain-of-Thought Reasoning (
reasoning_data) — 3,500 pairs:- Step-by-step mathematical proofs, graph theory, time/space complexity derivations, and distributed systems logic within
<think>...</think>traces.
- Step-by-step mathematical proofs, graph theory, time/space complexity derivations, and distributed systems logic within
- Synthetic Agents & MCP Protocols (
synthetic_agents_mcp) — 3,000 pairs:- Autonomous agent decomposition (DAG workflows, orchestrator-worker patterns, judge agents).
- Model Context Protocol (MCP) server-client communications, tool listings, schema mapping, and resource handlers.
- Anti-Catastrophic Forgetting (
general_finetome) — 2,000 pairs:- General knowledge and multi-turn conversational data to ensure fluent dialogue and preserve general intelligence.
Data Split:
- Training Set: 17,566 examples (
datasets/processed/train.jsonl) - Evaluation Set: 925 examples (
datasets/processed/eval.jsonl)
📦 Provided Files
| Filename | Quantization | Size | Description |
|---|---|---|---|
Qwen-3.8-9B-Uncensored-Heretic-Ch-Enhanced-V1-Q6_K.gguf |
Q6_K | ~6.85 GB | Recommended: Maximum fidelity for code generation, function calling & MCP. |
Qwen-3.8-9B-Uncensored-Heretic-Ch-Enhanced-V1-Q5_K_M.gguf |
Q5_K_M | ~6.02 GB | Fast & efficient balance for general chat and local agent execution. |
🚀 How to Run in LM Studio / llama.cpp
Recommended Inference Parameters
- Prompt Format: ChatML (
<|im_start|>system...<|im_end|><|im_start|>user...<|im_end|><|im_start|>assistant...) - Temperature:
0.3to0.5(for coding and structured tool-use) |0.7(for creative writing) - Top P:
0.9 - Context Length:
8192to16384tokens - GPU Offload: 100% offloadable on any 12GB+ GPU (e.g., RTX 3060 12GB, RTX 4070, RTX 4080).