Instructions to use jfan/Qwen3.8-27B-heretic-dflash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use jfan/Qwen3.8-27B-heretic-dflash with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("jfan/Qwen3.8-27B-heretic-dflash") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use jfan/Qwen3.8-27B-heretic-dflash with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "jfan/Qwen3.8-27B-heretic-dflash" --prompt "Once upon a time"
- Atomic Chat
Qwen3.8-27B-heretic-dflash: Official 5-Layer DFlash Speculative Drafter
WARNING: This model is still in training and does not currenly improve performance.
Qwen3.8-27B-heretic-dflash is a high-performance DFlash (Block Diffusion Speculative Drafter) trained explicitly for trohrbaugh/Qwen3.8-27B-heretic-ara (Qwen3 27B architecture, 248,320 vocabulary, 5,120 hidden dimension).
It achieves up to 2.5Γβ3.5Γ decoding speedups by generating 16-token draft blocks in parallel from deep feature conditioning, verified in single forward passes.
ποΈ Architecture Specification
The model adheres 100% to the official z-lab/Qwen3.6-27B-DFlash architecture and parameter schema:
| Architectural Component | Value / Configuration |
|---|---|
| Base / Target Model | trohrbaugh/Qwen3.8-27B-heretic-ara (64 total layers) |
Drafter Layers (num_hidden_layers) |
5 Transformer Decoder Layers |
Hidden Size (hidden_size) |
5,120 |
Intermediate Size (intermediate_size) |
17,408 (SwiGLU MLP) |
| Attention Heads | 32 Q-Heads / 8 KV-Heads (Grouped Query Attention 4:1) |
Head Dimension (head_dim) |
128 |
Block Size (block_size) |
16 tokens |
Target Layer IDs (target_layer_ids) |
[1, 16, 31, 46, 61] (5 uniformly spaced feature extraction layers) |
Feature Projection (fc) |
Linear(25600, 5120, bias=False) |
Mask Token ID (mask_token_id) |
248070 |
Vocabulary Size (vocab_size) |
248,320 |
π Training Dataset Composition
Trained on a balanced, polyglot multi-domain stream designed specifically for coding, tool use, and multi-turn instruction following:
- Polyglot Code (45%) β
ise-uiuc/Magicoder-OSS-Instruct-75K- Real-world code generation, bug fixing, and refactoring across C++, Rust, Python, Go, and TypeScript.
- Tool & Function Calling (25%) β
glaiveai/glaive-function-calling-v2- Complex structured JSON schemas, API call syntax, parameter filling, and tool outputs.
- Dialogue & Reasoning (30%) β
HuggingFaceH4/ultrachat_200k- Multi-turn conversational planning, explanations, and general knowledge.
βοΈ Training Methodology: Two-Phase Zero-Spill Pipeline
Trained on an NVIDIA GeForce RTX 3090 (24 GB VRAM) using a two-phase decoupled distillation pipeline to ensure maximum tensor core throughput with 0 MB/s PCIe spilling:
- Phase 1 (Offline Target Feature Extraction):
- Target model (
trohrbaugh/Qwen3.8-27B-heretic-ara) loaded in 4-bit NormalFloat (NF4) consuming 16.45 GB VRAM. - Streamed 10,000 multi-domain sequences (
seq_len = 1024) and extracted concatenated hidden representations from layers[1, 16, 31, 46, 61]($5 \times 5120 = 25,600$ dims) directly to disk shards.
- Target model (
- Phase 2 (Ultra-Fast Drafter Optimization):
- Base model unloaded completely from VRAM.
- Trained the 5-layer drafter (461M params) for 10,000 optimization steps using
bitsandbytes.optim.AdamW8bit($lr = 2 \times 10^{-4}$, weight decay = $0.01$) directly on on-die GDDR6X memory (7.96 GB VRAM footprint) at full 385W GPU TDP.
π How to Use
1. Apple Silicon (MLX-VLM / MLX-LM)
python3 -m mlx_vlm.server \
--host 0.0.0.0 \
--port 8080 \
--model trohrbaugh/Qwen3.8-27B-heretic-ara \
--draft-model jfan/Qwen3.8-27B-heretic-dflash
2. vLLM (CUDA / High-Throughput Serving)
python3 -m vllm.entrypoints.openai.api_server \
--model trohrbaugh/Qwen3.8-27B-heretic-ara \
--speculative-model jfan/Qwen3.8-27B-heretic-dflash \
--num-speculative-tokens 16 \
--port 8000
3. SGLang
python3 -m sglang.launch_server \
--model-path trohrbaugh/Qwen3.8-27B-heretic-ara \
--speculative-draft-model-path jfan/Qwen3.8-27B-heretic-dflash \
--speculative-num-steps 16 \
--port 30000
π Citation & Credits
- Base Model:
trohrbaugh/Qwen3.8-27B-heretic-ara - DFlash Architecture: DFlash: Block Diffusion for Speculative Decoding (arXiv:2602.06036)
- Trained by: jfan
- Downloads last month
- 2,098
Quantized
Model tree for jfan/Qwen3.8-27B-heretic-dflash
Base model
trohrbaugh/Qwen3.8-27B-heretic-ara