Download nexc/README.md from defnoteatin/pb27-checkpoints: direct link, hf CLI and curl.
- Browser
- Download file 5.68 kB
-
https://huggingface.co/defnoteatin/pb27-checkpoints/resolve/main/nexc/README.md
- Command line
-
hf download hf://defnoteatin/pb27-checkpoints/nexc/README.md
-
curl -L -o README.md https://huggingface.co/defnoteatin/pb27-checkpoints/resolve/main/nexc/README.md
license: apache-2.0
library_name: vllm
pipeline_tag: text-generation
tags:
- pseudobrain
- qwen3.5-moe
- qwen3.8
- abliterated
- moe
- gated-deltanet
- long-context
- 1m-context
- constant-memory
- nvfp4
- vllm
PseudoBrain-Nex-35B-A3B (pb27-nexc / PB27MoEForConditionalGeneration)
GitHub Repository & vLLM Plugin: https://github.com/defnotean/pseudobrain
Hugging Face Weights: https://huggingface.co/defnotean1/PseudoBrain-Nex-35B-A3B-NVFP4
Companion Models: PseudoBrain-Qwen3.8-Flash-Next-NVFP4 (45–183 tok/s) | PseudoBrain-27B-NVFP4 (27B Dense)
Architecture Paper: docs/PSEUDOBRAIN_ARCHITECTURE_PAPER.md
Overview
PseudoBrain-Nex-35B-A3B (pb27-nexc) is a sparse Mixture-of-Experts (35B total parameters, ~3B active parameters per token across 256 routed experts + 1 shared expert) constant-GPU-memory hybrid long-context conversion of Huihui-Qwen3.5-35B-A3B-abliterated / Nex-N2.5 (Qwen3_5MoeForConditionalGeneration). All 10 full-attention layers ([3, 7, 11, ..., 39]) are converted into Hybrid Windowed-Attention + Parallel Gated DeltaNet blocks (PB27MoEDecoderLayer) alongside 30 native Gated DeltaNet layers and PseudoBrain's Three-Tier NVMe/Page-Cache Exact Memory Archive with True $O(1)$ Constant-Speed Decode (pb27_vllm).
- True $O(1)$ Constant-Speed Decode up to
1,000,000Tokens (~25–33.6 tok/sFlat):- Decoupled Prefill vs. Decode Retrieval Budget: Full scaled retrieval (
PB27_MEMORY_SCALE=2048:384:4096:512:8192:1536) runs once on the final prefill question chunk (PB27_MEMORY_PREFILL=pt) and pins the winning blocks inArchive.prompt_top+ GPU-residentcached_pre_k/cached_pre_v. - Zero-NVMe Stride-
64Decode Cache: During decode,PB27_MEMORY_DECODE_STRIDE=64,PB27_MEMORY_DECODE_BLOCKS=64, andPB27_MEMORY_DECODE_RERANK=0keep LSE-merge FlashAttention-2 running over the fixed GPU buffer ([4 sinks + prompt_top + 16K window]), eliminating the historical500K–1MNVMe decode slowdown (~8–10 tok/s→~25–33.6 tok/sconstant $O(1)$ decode speed). - 2-Level Hierarchical
bf16Quest Super-Block Bounds (PB27_MEMORY_SUPERBLOCK=64): Stores blockkmax/kmininbf16with4,096-token super-block bounds (256super-blocks at1Mtokens), reducing bound scoring to<0.05 ms($O(1)$). - Priority-Aware RoPE Sink Repositioning (
_reposition_rope_sinks) & Cross-KV-Head Unification: Dynamically re-rotates retrieved archive blocks into contiguous local RoPE positions just before the sliding window ([sinks .. win_start - 1]) with priority ordering preserved (prio_rank).
- Decoupled Prefill vs. Decode Retrieval Budget: Full scaled retrieval (
- $O(1)$ Constant GPU KV Cache (
~27–31 GiBTotal GPU Footprint up to1,000,000Tokens): Uses only8.1%of a fixed6 GiBKV cache pool even at1,000,000tokens. - 100% (
40/40 = 1.000) Exact Single-Needle, 4-Needle (multi4), and 4-Hop Call-Chain Trace (trace4) Retrieval from8Kto1,000,000Tokens: Combines median-centered Quest block bounds, per-query Z-score normalization, post-merge[b, b+1]successor expansion (k=1024, c=8192at 1M), immutableprompt_top+ rollingdecode_topretention, and position-invariant 2-hop key-to-key bridge retrieval over the $75%$ unrotated key subspace (d // 4 :). - W4A16 Marlin NVFP4 MoE Scale Alignment: Includes automatic
w1/w3weight_global_scaleharmonization (_install_nvfp4_scale_hooks), reducing fused SwiGLU scale discrepancy from $38.1%$ to $2.9%$.
Benchmark Summary
| Context Length ($L$) | needle@0.1 |
needle@0.5 |
needle@0.9 |
multi4 (4 constants) |
trace4 (4-hop chain) |
Mean TTFT | KV Pool Used |
|---|---|---|---|---|---|---|---|
8,192 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
2.0s (33.59 tok/s) |
8.1% |
32,768 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
17.0s (8.8s warm) |
8.1% |
65,536 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
21.2s |
8.1% |
120,000 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
36.7s |
8.1% |
200,000 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
81.2s |
8.1% |
250,000 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
90.3s |
8.1% |
500,000 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
238.3s |
8.1% |
1,000,000 |
1.0 |
1.0 |
1.0 |
1.0 (4/4) |
1.0 |
615.4s |
8.1% |
- Custom Medium-Hard Coding Benchmark (
nexc_med, 33 problems × 2 samples):26 / 33problems solved (78.8%),43 / 66sample pass rate (65.2%) (reports/pb27/nexc_med.summary.json).
Quickstart with vLLM
Clone the PseudoBrain repository and install the
pb27_vllmout-of-tree vLLM plugin:git clone https://github.com/defnotean/pseudobrain.git cd pseudobrain pip install -e serving/pb27_vllmServe the NVFP4 + BF16 GDN checkpoint directly (
O(1)constant-speed decode defaults are enabled automatically):bash serving/pb27_vllm/serve.sh defnotean1/PseudoBrain-Nex-35B-A3B-NVFP4 8000