Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: llama.cpp
|
| 3 |
+
base_model:
|
| 4 |
+
- Jackrong/Qwopus3.6-27B-Coder-MTP
|
| 5 |
+
base_model_relation: quantized
|
| 6 |
+
license: apache-2.0
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
- zh
|
| 10 |
+
- es
|
| 11 |
+
- ru
|
| 12 |
+
- ja
|
| 13 |
+
pipeline_tag: image-text-to-text
|
| 14 |
+
tags:
|
| 15 |
+
- gguf
|
| 16 |
+
- llama.cpp
|
| 17 |
+
- nvfp4
|
| 18 |
+
- blackwell
|
| 19 |
+
- vision
|
| 20 |
+
- multimodal
|
| 21 |
+
- mtp
|
| 22 |
+
- speculative-decoding
|
| 23 |
+
- qwen3_6
|
| 24 |
+
- reasoning
|
| 25 |
+
- coder
|
| 26 |
+
- agent
|
| 27 |
+
- tool-use
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
# Qwopus3.6-27B-Coder-NVFP4-MTP-GGUF
|
| 31 |
+
|
| 32 |
+
NVFP4 (Blackwell native FP4) quantized GGUF of [Jackrong/Qwopus3.6-27B-Coder-MTP](https://huggingface.co/Jackrong/Qwopus3.6-27B-Coder-MTP-GGUF) for llama.cpp with Multi-Token Prediction (MTP) speculative decoding support.
|
| 33 |
+
|
| 34 |
+
## Quantization Details
|
| 35 |
+
|
| 36 |
+
| Attribute | Value |
|
| 37 |
+
|-----------|-------|
|
| 38 |
+
| **Source** | Q8_0 GGUF (28 GB, 8.50 BPW) |
|
| 39 |
+
| **Output** | Mixed-precision NVFP4 (15 GB, 4.60 BPW) |
|
| 40 |
+
| **Size reduction** | 46% (28 GB β 15 GB) |
|
| 41 |
+
| **NVFP4 tensors** | 311 (attn_q, attn_k, attn_v, attn_qkv, attn_output, ffn_down, ffn_gate, ffn_up) |
|
| 42 |
+
| **Q4_K tensors** | 194 (attn_gate, ssm_alpha, ssm_beta, ssm_out, nextn.eh_proj, token_embd) |
|
| 43 |
+
| **Q4_K_S tensors** | 1 (output.weight) |
|
| 44 |
+
| **F32 tensors** | 360 (norms, biases, SSM state) |
|
| 45 |
+
| **Total tensors** | 866 |
|
| 46 |
+
|
| 47 |
+
### Tensor Mapping Strategy
|
| 48 |
+
|
| 49 |
+
Following Unsloth's NVFP4 approach for Qwen3.6-27B hybrid Mamba2-Transformer models:
|
| 50 |
+
|
| 51 |
+
- **NVFP4** β 8 large weight tensor patterns that dominate model size and bandwidth (attention projections + FFN weights)
|
| 52 |
+
- **Q4_K** β Smaller weights (SSM parameters, MTP head projection, token embeddings) β preserves quality where tensor dimensions are small
|
| 53 |
+
- **F32** β Norms, biases, and SSM state β must remain full precision for numerical stability
|
| 54 |
+
|
| 55 |
+
This mapping matches the reference [Qwen3.6-27B-NVFP4-MTP](https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF) quantization exactly.
|
| 56 |
+
|
| 57 |
+
## Performance
|
| 58 |
+
|
| 59 |
+
### NVIDIA DGX Spark (GB10, ARM64, 128 GB unified memory)
|
| 60 |
+
|
| 61 |
+
| Config | Decode Speed | Prefill | Draft Acceptance |
|
| 62 |
+
|--------|-------------|---------|-----------------|
|
| 63 |
+
| Baseline (no spec) | 14.4 tok/s | 166 tok/s | β |
|
| 64 |
+
| MTP nmax=4 | 25.4 tok/s | 150 tok/s | 47% |
|
| 65 |
+
|
| 66 |
+
### NVIDIA RTX PRO 6000 Blackwell (98 GB VRAM)
|
| 67 |
+
|
| 68 |
+
Expected performance based on the identical Qwopus3.6-27B-v2 NVFP4 architecture:
|
| 69 |
+
|
| 70 |
+
| Config | Decode Speed | vs Q8_0 |
|
| 71 |
+
|--------|-------------|---------|
|
| 72 |
+
| Baseline (no spec) | ~79 tok/s | 1.72Γ faster |
|
| 73 |
+
| MTP nmax=4 | ~136 tok/s | 1.91Γ faster |
|
| 74 |
+
|
| 75 |
+
## Usage
|
| 76 |
+
|
| 77 |
+
### llama-server (recommended)
|
| 78 |
+
|
| 79 |
+
```bash
|
| 80 |
+
llama-server \
|
| 81 |
+
--model Qwopus3.6-27B-Coder-MTP-NVFP4.gguf \
|
| 82 |
+
--mmproj mmproj-F32.gguf \
|
| 83 |
+
--chat-template-file prompt.jinja \
|
| 84 |
+
--host 0.0.0.0 --port 8080 \
|
| 85 |
+
-c 262144 -b 512 -ub 512 \
|
| 86 |
+
--flash-attn on \
|
| 87 |
+
--spec-type draft-mtp --spec-draft-n-max 4 \
|
| 88 |
+
--reasoning-budget 0 \
|
| 89 |
+
--jinja
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
### Key flags
|
| 93 |
+
|
| 94 |
+
- `--mmproj mmproj-F32.gguf` β Required for vision/multimodal support
|
| 95 |
+
- `--spec-type draft-mtp --spec-draft-n-max 4` β Enable MTP speculative decoding (2Γ speedup)
|
| 96 |
+
- `--flash-attn on` β Required for NVFP4 on Blackwell
|
| 97 |
+
- `--reasoning-budget 0` β Disable thinking mode for agentic coding tasks
|
| 98 |
+
- `--chat-template-file prompt.jinja` β Use the Qwen3.6 MTP chat template
|
| 99 |
+
|
| 100 |
+
## Reproduction
|
| 101 |
+
|
| 102 |
+
```bash
|
| 103 |
+
# Create tensor-type-file
|
| 104 |
+
cat > nvfp4-tensor-types.txt << 'TYPES'
|
| 105 |
+
attn_q=nvfp4 attn_k=nvfp4 attn_v=nvfp4 attn_qkv=nvfp4 attn_output=nvfp4 ffn_down=nvfp4 ffn_gate=nvfp4 ffn_up=nvfp4
|
| 106 |
+
TYPES
|
| 107 |
+
|
| 108 |
+
# Convert Q8_0 β NVFP4
|
| 109 |
+
llama-quantize \
|
| 110 |
+
--allow-requantize \
|
| 111 |
+
--tensor-type-file nvfp4-tensor-types.txt \
|
| 112 |
+
Qwopus3.6-27B-Coder-MTP-Q8_0.gguf \
|
| 113 |
+
Qwopus3.6-27B-Coder-MTP-NVFP4.gguf \
|
| 114 |
+
Q4_K
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
## Model Architecture
|
| 118 |
+
|
| 119 |
+
Qwopus3.6-27B-Coder is a LoRA/SFT fine-tune of Qwopus3.6-27B-v2 (itself built on Qwen3.6-27B), specialized for agentic coding with tool calling, debugging, and repository-level tasks. It retains the hybrid Mamba2-Transformer architecture with SSM layers interleaved with full attention layers every 4 blocks, plus an MTP head at the final layer.
|
| 120 |
+
|
| 121 |
+
- **Architecture**: Hybrid Mamba2-Transformer (qwen35)
|
| 122 |
+
- **Parameters**: 27B dense
|
| 123 |
+
- **Layers**: 65 (64 base + 1 MTP)
|
| 124 |
+
- **Context**: 262,144 tokens native
|
| 125 |
+
- **Vision**: Yes (mmproj included)
|
| 126 |
+
|
| 127 |
+
## Credits
|
| 128 |
+
|
| 129 |
+
- **[Jackrong](https://huggingface.co/Jackrong)** β Original Qwopus3.6-27B-Coder model and GGUF quantizations
|
| 130 |
+
- **[Alibaba/Qwen](https://huggingface.co/Qwen)** β Qwen3.6-27B base model
|
| 131 |
+
- **[Unsloth](https://huggingface.co/unsloth)** β Fine-tuning framework and reference NVFP4 quantization approach
|
| 132 |
+
- **[llama.cpp](https://github.com/ggml-org/llama.cpp)** β Inference engine with NVFP4 support
|
| 133 |
+
|
| 134 |
+
## License
|
| 135 |
+
|
| 136 |
+
Apache-2.0 β same as the original model.
|