Text Generation
NInfer
English
qwen3.6
qwen3_5
27b
thinkingcap
token-efficient
efficient-thinking
conversational
image-text-to-text
multimodal
nvfp4
w4a4
groupwise-quantization
w4a16
4bit
llm
single-file
Instructions to use knoopx/ThinkingCap-Qwen3.6-27B-NInfer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NInfer
How to use knoopx/ThinkingCap-Qwen3.6-27B-NInfer with NInfer:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,8 +4,6 @@ language:
|
|
| 4 |
- en
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
library_name: ninfer
|
| 7 |
-
base_model:
|
| 8 |
-
- Qwen/Qwen3.6-27B
|
| 9 |
tags:
|
| 10 |
- qwen3.6
|
| 11 |
- qwen3_5
|
|
@@ -24,150 +22,92 @@ tags:
|
|
| 24 |
- llm
|
| 25 |
- ninfer
|
| 26 |
- single-file
|
|
|
|
|
|
|
| 27 |
---
|
| 28 |
|
| 29 |
# ThinkingCap-Qwen3.6-27B
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
- **`thinkingcap_qwen3_6_27b_nvfp4.ninfer`** — NVFP4 (W4A4 mixed-precision) artifact, 16.55 GiB
|
| 34 |
-
- **`thinkingcap_qwen3_6_27b.ninfer`** — groupwise-int4 (on-the-fly Q4/Q5/Q6/W8) artifact, 16.07 GiB
|
| 35 |
-
|
| 36 |
-
Both are byte-level containers (`raw-bytes-v1` encoding) produced by the NInfer converter toolchain, not Hugging Face `pytorch_model.bin` / `safetensors` weights. They are the serving artifacts for the model on the NInfer runtime.
|
| 37 |
|
| 38 |
## Model architecture
|
| 39 |
|
| 40 |
-
-
|
| 41 |
-
- **Text:** 64 decoder layers
|
| 42 |
-
- **Vision:** 27-layer ViT (hidden 1152, intermediate 4304, 16 heads), 16×16 spatial patch, 2-frame temporal patch, 2×2 spatial merge
|
| 43 |
-
- **Positional:** RoPE θ
|
| 44 |
-
-
|
| 45 |
|
| 46 |
## Artifacts
|
| 47 |
|
| 48 |
-
### 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
-
2. **vLLM-quantized NVFP4** checkpoint — the NVFP4 source (`sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4`, rev `9b5389d4`), preflight of 379 `linear_nvfp4` + 117 `linear_bf16` lines with dtypes U8×379 / F8_E4M3×379 / F32×758.
|
| 56 |
|
| 57 |
-
|
| 58 |
|
| 59 |
-
|
| 60 |
|
| 61 |
-
|
| 62 |
|
| 63 |
```bash
|
| 64 |
python3 -m tools.convert.qwen3_6_27b.convert_nvfp4 \
|
| 65 |
-
--model <bf16-
|
| 66 |
-
--nvfp4-model <nvfp4-
|
| 67 |
-
--out out/
|
| 68 |
-
--device cpu
|
| 69 |
```
|
| 70 |
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
**Artifact stats** (from `thinkingcap_qwen3_6_27b_nvfp4.ninfer.conversion.json`):
|
| 74 |
-
|
| 75 |
-
| field | value |
|
| 76 |
-
|---|---|
|
| 77 |
-
| identity | `qwen3.6-27b` / weights_id `nvfp4` |
|
| 78 |
-
| target_key | `qwen3_6_27b` |
|
| 79 |
-
| recipe_id | `qwen3_6_27b_nvfp4-v1` |
|
| 80 |
-
| objects | 1307 (1301 tensors + 6 resources) |
|
| 81 |
-
| artifact bytes | 18,324,064,000 (16.55 GiB) |
|
| 82 |
-
| tensor_bytes | 18,310,883,160 |
|
| 83 |
-
| resource_bytes | 12,833,441 |
|
| 84 |
-
| alignment_bytes | 138,503 |
|
| 85 |
-
| md5 | `24a3d90b8aae9ea4f5296061439bd625` |
|
| 86 |
-
| elapsed | 69.54 s |
|
| 87 |
-
|
| 88 |
-
**Format histogram** (per-tensor format counts, summing to 1301 tensors):
|
| 89 |
-
|
| 90 |
-
| format | count |
|
| 91 |
-
|---|---|
|
| 92 |
-
| BF16 | 591 |
|
| 93 |
-
| FP32 | 343 |
|
| 94 |
-
| NVFP4 | 247 |
|
| 95 |
-
| Q4G64_F16S | 55 |
|
| 96 |
-
| Q5G64_F16S | 54 |
|
| 97 |
-
| W8G32_F16S | 9 |
|
| 98 |
-
| Q6G64_F16S | 1 |
|
| 99 |
-
| I32 | 1 |
|
| 100 |
-
| **total tensors** | **1301** |
|
| 101 |
-
|
| 102 |
-
Plus **6 resources** (`raw-bytes-v1` encoding). Layouts: `blockscale-k16-m128x4-v1` ×247 (the NVFP4 blockscale line), `contiguous-le-v1` ×935, `row-split-k128-v1` ×119.
|
| 103 |
-
|
| 104 |
-
**NVFP4 source:** [`sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4`](https://huggingface.co/sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4) (the `--nvfp4-model` input to the conversion; rev `9b5389d4`)
|
| 105 |
-
|
| 106 |
-
---
|
| 107 |
|
| 108 |
-
|
| 109 |
|
| 110 |
-
|
| 111 |
|
| 112 |
-
|
| 113 |
|
| 114 |
-
|
| 115 |
|
| 116 |
```bash
|
| 117 |
-
python -m tools.convert.
|
| 118 |
-
--model <bf16-
|
| 119 |
-
--
|
| 120 |
-
--device cuda
|
| 121 |
```
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
**Artifact stats** (from `thinkingcap_qwen3_6_27b.ninfer.conversion.json`):
|
| 126 |
|
| 127 |
-
|
| 128 |
-
|---|---|
|
| 129 |
-
| identity | `qwen3.6-27b` / weights_id `groupwise-int` |
|
| 130 |
-
| target_key | `qwen3_6_27b` |
|
| 131 |
-
| recipe_id | `qwen3_6_27b-v2` |
|
| 132 |
-
| objects | 1124 (1118 tensors + 6 resources) |
|
| 133 |
-
| artifact bytes | 17,495,365,888 (16.07 GiB) |
|
| 134 |
-
| tensor_bytes | 17,482,342,304 |
|
| 135 |
-
| resource_bytes | 12,833,441 |
|
| 136 |
-
| alignment_bytes | 14,015 |
|
| 137 |
-
| md5 | `8c08f2f50ca93cab2e13508365d65147` |
|
| 138 |
-
| elapsed | 188.55 s |
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
|
| 143 |
-
|---|---|
|
| 144 |
-
|
|
| 145 |
-
|
|
| 146 |
-
|
|
| 147 |
-
| FP32 | 96 |
|
| 148 |
-
| W8G32_F16S | 7 |
|
| 149 |
-
| Q6G64_F16S | 3 |
|
| 150 |
-
| I32 | 1 |
|
| 151 |
-
| **total tensors** | **1118** |
|
| 152 |
-
|
| 153 |
-
Plus **6 resources** (`raw-bytes-v1` encoding). Layouts: `contiguous-le-v1` ×679, `row-split-k128-v1` ×439.
|
| 154 |
-
|
| 155 |
-
**Source:** [`bottlecapai/ThinkingCap-Qwen3.6-27B`](https://huggingface.co/bottlecapai/ThinkingCap-Qwen3.6-27B) (BF16 base, rev `6a9e13bd`; preflight 1,118 recipes / 1,199 BF16 tensors / 3 shards).
|
| 156 |
|
| 157 |
## Serving
|
| 158 |
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
```bash
|
| 162 |
-
--model-id thinkingcap-27b
|
| 163 |
-
```
|
| 164 |
|
| 165 |
-
## Known
|
| 166 |
|
| 167 |
-
|
| 168 |
|
| 169 |
## References
|
| 170 |
|
| 171 |
-
- Base checkpoint: [`bottlecapai/ThinkingCap-Qwen3.6-27B`](https://huggingface.co/bottlecapai/ThinkingCap-Qwen3.6-27B)
|
| 172 |
-
- NVFP4
|
| 173 |
-
-
|
|
|
|
|
|
| 4 |
- en
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
library_name: ninfer
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
- qwen3.6
|
| 9 |
- qwen3_5
|
|
|
|
| 22 |
- llm
|
| 23 |
- ninfer
|
| 24 |
- single-file
|
| 25 |
+
base_model:
|
| 26 |
+
- Qwen/Qwen3.6-27B
|
| 27 |
---
|
| 28 |
|
| 29 |
# ThinkingCap-Qwen3.6-27B
|
| 30 |
|
| 31 |
+
Three single-file NInfer (`*.ninfer`) artifacts for **ThinkingCap-Qwen3.6-27B**, a token-efficient, thinking-oriented, multimodal (image+video→text) 27B finetune of [`Qwen/Qwen3.6-27B`](https://huggingface.co/Qwen/Qwen3.6-27B). Each artifact is a self-contained binary the NInfer engine serves directly. All three trace back to the same finetune, but each is produced by a distinct converter module and carries a distinct recipe and weight profile — so none is a re-label of another.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
## Model architecture
|
| 34 |
|
| 35 |
+
- `Qwen3_5ForConditionalGeneration` (`model_type: qwen3_5`), dense multimodal (image+video→text) finetune of [`Qwen/Qwen3.6-27B`](https://huggingface.co/Qwen/Qwen3.6-27B). Fully dense transformer: every decoder layer uses a dense SwiGLU MLP with no routing.
|
| 36 |
+
- **Text:** 64 decoder layers; hybrid attention — 16 full-attention layers interleaved with 48 recurrent layers (short convolution, width 4), full-attention interval 4; hidden 5120, intermediate 17408, output matrix 248320 rows (tokenizer domain 248077); 24 query / 4 KV heads (head dim 256); 1 MTP draft layer; 262144 max position embeddings.
|
| 37 |
+
- **Vision:** 27-layer ViT (hidden 1152, intermediate 4304, 16 heads), 16×16 spatial patch, 2-frame temporal patch, 2×2 spatial merge.
|
| 38 |
+
- **Positional:** RoPE θ=10,000,000 with mRoPE section `[11, 11, 10]`.
|
| 39 |
+
- Upstream base: [`bottlecapai/ThinkingCap-Qwen3.6-27B`](https://huggingface.co/bottlecapai/ThinkingCap-Qwen3.6-27B), itself a finetune of [`Qwen/Qwen3.6-27B`](https://huggingface.co/Qwen/Qwen3.6-27B).
|
| 40 |
|
| 41 |
## Artifacts
|
| 42 |
|
| 43 |
+
### 1. Groupwise-int4 (W4A16) — `thinkingcap_qwen3_6_27b.ninfer`
|
| 44 |
+
|
| 45 |
+
On-the-fly groupwise quantization from a single BF16 source; each linear layer is quantized at conversion time into a per-group 4/5/6-bit + W8 format selected by tensor size/role (`Q4G64_F16S`, `Q5G64_F16S`, `Q6G64_F16S`, `W8G32_F16S`). Weights are groupwise-quantized while activations stay 16-bit (W4A16-class build).
|
| 46 |
+
|
| 47 |
+
Single-source provenance: base BF16 checkpoint `bottlecapai/ThinkingCap-Qwen3.6-27B` (rev `6a9e13bd`). Converter module `tools.convert.qwen3_6_27b.convert` (recipe `qwen3_6_27b-v2`, weights_id `groupwise-int`):
|
| 48 |
|
| 49 |
+
```bash
|
| 50 |
+
python -m tools.convert.qwen3_6_27b.convert \
|
| 51 |
+
--model <base-bf16-checkpoint-dir> --out out/<name>.ninfer --device cuda
|
| 52 |
+
```
|
| 53 |
|
| 54 |
+
Stats: objects 1124 (1118 tensors + 6 resources); tensor_bytes 17482342304; resource_bytes 12833441; alignment_bytes 14015; md5 `8c08f2f50ca93cab2e13508365d65147`.
|
| 55 |
|
| 56 |
+
Histogram (sums to 1118): `BF16 582, Q5G64_F16S 246, Q4G64_F16S 183, FP32 96, W8G32_F16S 7, Q6G64_F16S 3, I32 1`. Layouts: `contiguous-le-v1 ×679, row-split-k128-v1 ×439`; 6 resources encoded `raw-bytes-v1`.
|
|
|
|
| 57 |
|
| 58 |
+
### 2. NVFP4 (W4A4) — `thinkingcap_qwen3_6_27b_nvfp4.ninfer`
|
| 59 |
|
| 60 |
+
NVFP4 W4A4 mixed-precision: packed 4-bit FP4 (E2M1) weights with per-tensor group scales and `input_activations: tensor_group`, so activations are also 4-bit at inference. True W4A4 path (vs W4A16, where activations stay 16-bit).
|
| 61 |
|
| 62 |
+
Dual-source: base BF16 `bottlecapai/ThinkingCap-Qwen3.6-27B` (rev `6a9e13bd`) fused with vLLM-quantized NVFP4 partner [`sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4`](https://huggingface.co/sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4) (rev `9b5389d4`). NFp4-packed lines take 4-bit weight bytes + scales from the partner; remaining 16-bit/resource tensors come from the base BF16 tree. Converter `tools.convert.qwen3_6_27b.convert_nvfp4` (recipe `qwen3_6_27b_nvfp4-v1`, weights_id `nvfp4`, model_id `qwen3.6-27b`):
|
| 63 |
|
| 64 |
```bash
|
| 65 |
python3 -m tools.convert.qwen3_6_27b.convert_nvfp4 \
|
| 66 |
+
--model <base-bf16-checkpoint-dir> \
|
| 67 |
+
--nvfp4-model <nvfp4-checkpoint-dir> \
|
| 68 |
+
--out out/<name>.ninfer --device cpu
|
|
|
|
| 69 |
```
|
| 70 |
|
| 71 |
+
Stats: objects 1307 (1301 tensors + 6 resources); tensor_bytes 18310883160; resource_bytes 12833441; alignment_bytes 138503; md5 `24a3d90b8aae9ea4f5296061439bd625`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
Histogram (sums to 1301): `BF16 591, FP32 343, NVFP4 247, Q4G64_F16S 55, Q5G64_F16S 54, W8G32_F16S 9, Q6G64_F16S 1, I32 1`. Layouts: `blockscale-k16-m128x4-v1 ×247, contiguous-le-v1 ×935, row-split-k128-v1 ×119`; 6 resources `raw-bytes-v1`.
|
| 74 |
|
| 75 |
+
### 3. NVFP4 (W4A4) w8g32 — `thinkingcap_qwen3_6_27b_nvfp4_w8g32.ninfer`
|
| 76 |
|
| 77 |
+
Shares the same W4A4 FP4 recipe family as Artifact 2 — packs the same inventory including one `Q6G64_F16S` object — but is produced by a distinct converter generation (weights_id `nvfp4_w8g32`) and carries a larger payload (+3840 bytes vs Artifact 2). Separate build, not a rename of Artifact 2. Named on the same compact scheme as the other two artifacts, distinguished by the `w8g32` weight-generation suffix.
|
| 78 |
|
| 79 |
+
Dual-source: same partners as Artifact 2. Converter `tools.convert.qwen3_8_27b.w8g32_nvfp4.convert_nvfp4` (weights_id `nvfp4_w8g32`):
|
| 80 |
|
| 81 |
```bash
|
| 82 |
+
python -m tools.convert.qwen3_8_27b.w8g32_nvfp4.convert_nvfp4 \
|
| 83 |
+
--model <base-bf16-checkpoint-dir> \
|
| 84 |
+
--nvfp4-model <nvfp4-checkpoint-dir> \
|
| 85 |
+
--out out/<name>.ninfer --device cuda
|
| 86 |
```
|
| 87 |
|
| 88 |
+
Stats: objects 1307 (1301 tensors + 6 resources); byte total 18324067840; layouts `blockscale-k16-m128x4-v1 ×247, contiguous-le-v1 ×935, row-split-k128-v1 ×119`; raw-bytes-v1 encodings. Identity embedded in the artifact: model_id `qwen3.8-27b`, weights_id `nvfp4_w8g32`.
|
|
|
|
|
|
|
| 89 |
|
| 90 |
+
## Files and checksums
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
+
Byte sizes below are authoritative LFS sizes.
|
| 93 |
|
| 94 |
+
| File | Size (bytes) | SHA256 | Scheme |
|
| 95 |
+
|---|---|---|---|
|
| 96 |
+
| `thinkingcap_qwen3_6_27b.ninfer` | 17495365888 | `406d7ca3c8248ec304518563b9dbb00cf48d9cfc19d126e6df66d354e6d5b892` | Groupwise-int4 W4A16 |
|
| 97 |
+
| `thinkingcap_qwen3_6_27b_nvfp4.ninfer` | 18324064000 | `ec149b15d29acc0bfdb6f5720e12a39f15746b688ac4e290a6ebf6661ac2c8e7` | NVFP4 W4A4 |
|
| 98 |
+
| `thinkingcap_qwen3_6_27b_nvfp4_w8g32.ninfer` | 18324067840 | `00c3412b764c24bdf37058dea5209b677462fa68c517c8e21c89aec9f38dcbd1` | NVFP4 W4A4 (w8g32) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
## Serving
|
| 101 |
|
| 102 |
+
All artifacts are served directly by the **NInfer** engine as self-contained single binaries — no separate weights download. Capability flags relevant to this model: multimodal image input (`--vision`), MTP decoding (1 MTP draft layer), and int8 KV cache.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
+
## Known limitations
|
| 105 |
|
| 106 |
+
No KL-divergence or perplexity benchmark has been run on any artifact; quantization fidelity is unmeasured against the BF16 reference. Validation performed is structural only — format histogram, object/tensor/resource counts, and byte/alignment integrity from the converter's accounting. The artifacts are not numerically validated for downstream quality claims.
|
| 107 |
|
| 108 |
## References
|
| 109 |
|
| 110 |
+
- Base checkpoint: [`bottlecapai/ThinkingCap-Qwen3.6-27B`](https://huggingface.co/bottlecapai/ThinkingCap-Qwen3.6-27B) (finetune of [`Qwen/Qwen3.6-27B`](https://huggingface.co/Qwen/Qwen3.6-27B))
|
| 111 |
+
- NVFP4 partner: [`sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4`](https://huggingface.co/sakamakismile/ThinkingCap-Qwen3.6-27B-NVFP4)
|
| 112 |
+
- NInfer engine: https://github.com/ninfer
|
| 113 |
+
- Converter toolchain: `tools.convert.qwen3_6_27b.{convert,convert_nvfp4}` and `tools.convert.qwen3_8_27b.w8g32_nvfp4.convert_nvfp4`
|