Nanbeige4.3-33B-Weight-Space-Programming (Lightweight 3-Adapter Build · IQ2_XS)

Training-free, closed-form Two-Phase Reasoning-Boundary Weight-Space Programming (WSP) for Nanbeige/Nanbeige4.3-33B (LlamaForCausalLM, 52 layers), synthesized in 21.19s with ZERO gradient descent and packaged as THREE rank=8 GGUF LoRAs totaling 8.63 MB.

Upstream Model Credits & Provenance


Key Highlights (Single 12 GB RTX 4070 Ti · temp=0.0)

  1. Full-GPU 12 GB Fit with 8.63 MB of Closed-Form Rank-8 LoRAs:
    • Loaded 100% in GPU VRAM (-ngl 99 -c 8192 -ctk q8_0 -ctv q8_0 --fit off, 11,446–11,676 MiB loaded on a 12,282 MiB RTX 4070 Ti) at 40.8 tok/s median decode (40.9 tok/s on full 155-task run).
    • 3 sparse-vocab + attention-output rank-8 LoRAs (8833.5 KB = 8.63 MB total):
      • wsp_nb_think_close.gguf: Phase-1 </think> boundary closure vs. ruminative pivots (Wait, Actually, However, Hmm, Alternatively, Let).
      • wsp_nb_restraint.gguf: Phase-2 anti-false <tool_call> restraint and Turn-2 { JSON compliance.
      • wsp_nb_shell_action.gguf: Phase-2 decisive exec shell <tool_call> emission (null_leak = 2.961%).
  2. Eliminates All Mid-Think Cutoffs (34 -> 0) + +25 Tasks Combined (99/155 -> 124/155):
    • Combined 155-Task Score: 124/155 (80.0%, +25) vs. Base 99/155 (63.9%).
    • agent100: 87/100 (+21) — Holdout 28/30 (93.3%, S2_RESTRAINT 4/4, S3 5/5, S5 3/3, S8 3/3) + Established 59/70 (EST_NL2BASH 6/20 -> 15/20, EST_BFCL_IRR 8/15 -> 13/15).
    • stem45: 33/45 (+4) — STEM_MMLU_PRO 6/15 -> 11/15 (+5), cut_mid_think 16 -> 0.
    • Live WSL2 tbench10: 4/10 (40.0%, zcmd=0) with clean multi-turn termination (avg_cmds = 6.1, avg_tok = 644.5, -17.4% fewer tokens than Base 780.0).
  3. Non-Quantization Shrunk Bundles (en90k & drop4-en90k):
    • Lossless en90k (52L / 90,624 vocab, -584.34 MiB GGUF, -362 MiB VRAM) + 5.13 MB adapters_pruned/: 3/3 Parity Gate, 24/28 on VAL_28, 28/30 on Holdout30, 0 cutoffs, 42.6 tok/s median.
    • Stacked drop4-en90k (48L / 90,624 vocab, 8.639 GiB, -1295.66 MiB GGUF, -1,138 MiB VRAM at 8K) + 5.13 MB adapters_drop4_pruned/: Fast -c 16384 fit (11180 MiB, 46.93 tok/s), 110/155 (71.0%, +11 vs Orig Base, cut=0/145) at 46.0 tok/s median.

1. Quickstart (run_nanbeige_lite.py)

Download the bundle and install lightweight Python runtime dependencies:

pip install -r requirements.txt
hf download jstarks/Nanbeige4.3-33B-Weight-Space-Programming --local-dir ./nanbeige43-33b-wsp
cd nanbeige43-33b-wsp

Ensure llama-server (mainline llama.cpp supporting IQ2_XS and /lora-adapters) is on PATH or in ./llama.cpp/, then run (Nanbeige_Nanbeige4.3-33B-IQ2_XS.gguf downloads automatically into ./gguf/ on first run):

# Start OpenAI-compatible HTTP proxy on http://127.0.0.1:8090/v1 (model: nanbeige4.3-33b-wsp-lite)
python run_nanbeige_lite.py

# Interactive terminal chat session
python run_nanbeige_lite.py --chat

# Toggle exact Base parity mode (all LoRA scales forced to 0.0)
python run_nanbeige_lite.py --mode base

Endpoints exposed: GET /health, GET /v1/models (nanbeige4.3-33b-wsp-lite), and POST /v1/chat/completions (standard OpenAI JSON response + x_wsp routing telemetry).


2. Benchmark Results (155 Tasks · temp=0.0)

Configuration Adapters & Size Combined 155 Tasks agent100 (30 Hold + 70 Est) stem45 (15+15+15) Live WSL2 tbench10 Total cut_mid_think Server Decode (tok/s)
Track A Base (scales=0) 0 (0 MB) 99/155 (63.9%) 66/100 (21/30 · 45/70) 29/45 (cut=16) 4/10 (6.8 cmds, zcmd=0) 34/145 36.9 med / 36.8 mean
Initial WSP-Lite (Step 6) 3 (8.63 MB) 122/155 (78.7%) 85/100 (26/30 · 59/70) 33/45 (cut=0) 4/10 (12.0 cmds, zcmd=0) 0/145 40.9 med / 40.6 mean
Follow-Up WSP-Lite (Current, nb_balanced) 3 (8.63 MB) 124/155 (80.0%, +25)* 87/100 (+21) (28/30 · 59/70) 33/45 (+4, cut=0) 4/10 (6.1 cmds, 644.5t, zcmd=0) 0/145 (100% fixed) 40.8 med / 40.4 mean

*Methodology note on Follow-Up evaluation: benchmarks/nanbeige_followup_results.json re-evaluated all 30 Holdout (S1..S9) tasks and all 10 live stateful WSL2 tbench10 episodes after enabling wsp_nb_restraint in multi_tool_think_close and clean <|im_end|> handling for terminal_episode (direct_p1_eos). All 70 EST_* and 45 stem45 tasks in benchmarks/nanbeige_lite_results.json had 0/115 invocations of the modified router branches.

agent100 Breakdown (30 Holdout + 70 Established)

Suite Tasks Base (cut) Step-6 WSP-Lite Current WSP-Lite Delta vs Base
S1_THINK (Holdout S1: Think Closure) 3 3/3 (cut=0) 3/3 3/3 (cut=0) +0
S2_RESTRAINT (Holdout S2: Tool Restraint & Anti-Sycophancy) 4 3/4 (cut=1) 2/4 4/4 (cut=0) +1
S3_ROUTER (Holdout S3: Multi-Tool Router) 5 4/5 (cut=0) 5/5 5/5 (cut=0) +1
S4_CODE (Holdout S4: Mid-Band Code Synthesis) 2 2/2 (cut=0) 2/2 2/2 (cut=0) +0
S5_TURN2_JSON (Holdout S5: Turn-2 Structured JSON) 3 1/3 (cut=0) 3/3 3/3 (cut=0) +2
S6_HANDOFF (Holdout S6: Escalation Handoff Gate) 4 3/4 (cut=1) 3/4 3/4 (cut=0) +0
S7_INJECTION_GUARD (Holdout S7: Indirect Injection Guard) 3 1/3 (cut=0) 2/3 2/3 (cut=0) +1
S8_GROUNDING (Holdout S8: Grounded Abstention) 3 1/3 (cut=0) 3/3 3/3 (cut=0) +2
S9_ERROR_RECOVERY (Holdout S9: Error Self-Recovery) 3 3/3 (cut=0) 3/3 3/3 (cut=0) +0
EST_GSM8K (Established: OpenAI GSM8K) 20 18/20 (cut=2) 18/20 18/20* (cut=0) +0
EST_HUMANEVAL (Established: HumanEval pass@1) 15 13/15 (cut=2) 13/15 13/15* (cut=0) +0
EST_BFCL_IRR (Established: BFCL v3 Irrelevance) 15 8/15 (cut=2) 13/15 13/15* (cut=0) +5
EST_NL2BASH (Established: InterCode-NL2Bash) 20 6/20 (cut=10) 15/20 15/20* (cut=0) +9
Total agent100 100 66/100 (Hold=21/30) 85/100 (Hold=26/30) 87/100 (Hold=28/30) +21

stem45 Breakdown (MATH-500 + MMLU-Pro + MMLU-4C)

Sub-Benchmark Tasks Base (cut, avg tok) WSP-Lite (cut, avg tok) Delta
STEM_MATH500 (MATH-500 (Level-5 Math, 1536t)) 15 12/15 (cut=3, 939.5t) 11/15 (cut=0, 952.0t) -1
STEM_MMLU_PRO (MMLU-Pro STEM (10-Choice, 1024t)) 15 6/15 (cut=9, 778.7t) 11/15 (cut=0, 709.5t) +5
STEM_MMLU_4C (MMLU STEM (4-Choice, 1024t)) 15 11/15 (cut=4, 468.1t) 11/15 (cut=0, 497.3t) +0
Total stem45 45 29/45 (cut=16) 33/45 (cut=0) +4

Live WSL2 Stateful tbench10 Breakdown (10 Easy Tasks)

Task (tbench10, WSL2 Stateful) Difficulty Base (cmds / tok) Step-6 (cmds / tok) Follow-Up WSP-Lite (cmds / tok)
hello-world easy PASS (1 / 117t) PASS (41 / 2465t) PASS (1 / 122t)
fix-permissions easy PASS (3 / 307t) PASS (3 / 430t) PASS (3 / 334t)
processing-pipeline easy FAIL (9 / 418t) FAIL (30 / 2770t) FAIL (11 / 464t)
extract-safely easy PASS (3 / 402t) PASS (3 / 738t) PASS (4 / 447t)
git-workflow-hack easy FAIL (24 / 1422t) FAIL (10 / 1470t) FAIL (13 / 801t)
grid-pattern-transform easy FAIL (4 / 1629t) FAIL (7 / 1493t) FAIL (5 / 923t)
csv-to-parquet easy PASS (4 / 696t) PASS (6 / 734t) PASS (4 / 514t)
pandas-etl easy FAIL (5 / 642t) FAIL (9 / 1483t) FAIL (5 / 890t)
logistic-regression-divergence easy FAIL (5 / 715t) FAIL (6 / 1591t) FAIL (7 / 842t)
cpp-compatibility easy FAIL (10 / 1452t) FAIL (5 / 3175t) FAIL (8 / 1108t)
Total tbench10 10 Easy 4/10 (avg=6.8c, 780.0t, 279.4s) 4/10 (avg=12.0c, 1634.9t, 555.7s) 4/10 (avg=6.1c, 644.5t, 195.1s, zcmd=0)

3. Weight-Space Synthesis, LoRA Probes & Disjoint VAL_28

Adapter (adapters_lite/) Size Tensors (rank=8) lam_null / lam_i svd_energy null_leak_pct Active dz (+ / -)
wsp_nb_think_close.gguf 2944.5 KB output.weight, blk.51.attn_output.weight 50.0 / 0.003 1.0 3.778% +7.371 / -3.276
wsp_nb_restraint.gguf 2944.5 KB output.weight, blk.51.attn_output.weight 30.0 / 0.003 1.0 2.101% +7.093 / -12.102
wsp_nb_shell_action.gguf 2944.5 KB output.weight, blk.51.attn_output.weight 30.0 / 0.003 1.0 2.961% +11.259 / -8.846
  • Disjoint VAL_28 Validation (adapters_lite/val28_lite_results.json): Parity Gate (vnl_0, vmcq_10, vre_0) 3/3 PASS; winning preset nb_balanced (s_think=0.95, s_stem=1.05, s_code=0.65, s_restr=0.95, s_shell=0.85) scored 24/28 (85.7%), cut=0 vs. Base 22/28 (78.6%), cut=4 (val_nl2bash=6/6, val_restraint_exec=3/3, median=40.3 tok/s).
3-Site Llama LoRA Probe & VRAM Profile (`nanbeige_sanity_results.json`)

| Probe Site | Tensor | Probe Size | Hot-Swap | |Δ logprob| (scale=1.0) | Decode (tok/s) | |---|---|---:|---:|---:|---:| | probe_lm_head | output.weight | 1360.34 KB | 0.65 ms | 0.000381 | 36.43 | | probe_attn_out | blk.51.attn_output.weight | 112.38 KB | 10.56 ms | 0.000996 | 37.34 | | probe_ffn_down | blk.51.ffn_down.weight | 228.38 KB | 0.65 ms | 0.000378 | 37.51 |

  • scale=0.0 drift across all 3 loaded adapters: delta_logprob = 0.000000 (parity_ok = True), 36.95 tok/s (VRAM = 11,391 MiB).

4. Non-Quantization Structural Shrinking: en90k & drop4-en90k

Because IQ2_XS already compresses weights aggressively, further quantization degrades math and tool accuracy. Instead, we combine two raw-byte, zero-requantization structural reductions (scripts/gguf_structural_utils.py):

  1. Lossless English+Code Vocabulary Pruning (en90k: 166,912 -> 90,624 tokens, -45.71%): Drops 76,288 unused CJK/non-Latin normal tokens while keeping all control/byte tokens, ASCII/Latin/Greek/Math/Box tokens, and the 69 default system-prompt template tokens (-1.094B params, -584.34 MiB on disk: output.weight 784.44 -> 425.91 MiB in GPU VRAM + token_embd.weight 490.27 -> 266.19 MiB in host memory). All 3 adapters slice identically to 5.13 MB (adapters_pruned/, -40.5%).
  2. ShortGPT 52-Layer Block Influence Scan & K=4 Depth Pruning: Streaming all 52 layers on CUDA FP16 across 16 disjoint prompts (Paris parity PASS, delta=-0.001822) identified interior blocks blk.10..13 with the lowest Block Influence (BI = 0.0053–0.0057), whereas SwiGLU FFN channels are dense (92.19% needed for 95% importance). Dropping [10, 11, 12, 13] with en90k builds drop4-en90k.gguf (48L, 8.639 GiB, -1,295.66 MiB), eliminating the -c 16384 WDDM slowdown (22.45 -> 46.93 tok/s, passing a 4,298-token needle passkey retrieval check at 41.62 tok/s).
Variant Layers / Vocab Disk Size -c 8192 VRAM Delta* -c 16384 Fit & Speed Decode (tok/s) VAL_28 Base VAL_28 WSP-Lite Holdout30 WSP Combined 155-Task WSP
Original 52L 52L / 166,912 9.904 GiB 10,943 MiB Tight / OOM ref 40.3–40.9 med 22/28 (cut=4) 24/28 (cut=0) 28/30 (cut=0) 124/155 (80.0%)
Vocab-Pruned en90k 52L / 90,624 9.333 GiB (-584.34 MiB) 10,581 MiB (-362 MiB) Fits (11736 MiB, 22.45) 42.6 med 22/28 24/28 (cut=0) 28/30 (cut=0) — (lossless VAL_28+Holdout30)
Layer-Drop K=4 ([10..13]) 48L / 166,912 9.209 GiB 10,161 MiB (-782 MiB) — 44.1 mean — — — —
Layer-Drop K=8 ([9..15,30]) 44L / 166,912 8.54 GiB 10,144 MiB loaded — 47.8 mean — — — —
Stacked drop4-en90k 48L / 90,624 8.639 GiB (-1295.66 MiB) 9805 MiB (-1,138 MiB) Fits cleanly (11180 MiB, 46.93 tok/s) 46.0 med 22/28 (cut=6) 23/28 (cut=0, zero-shot) 26/30 (cut=0) 110/155 (71.0%, +11 vs Base)

*Paired VRAM delta measured on RTX 4070 Ti 12 GB from idle.

  • en90k + adapters_pruned/ Parity (benchmarks/en90k_wsp_results.json): 3/3 Parity Gate, 24/28 on VAL_28, and 28/30 on Holdout30 (0 cutoffs) — point-for-point tie with the unmodified 166K model at 42.6 tok/s median.
  • drop4-en90k Native 48L Synthesis vs. Zero-Shot Transfer: Capturing 495 × 7168 h_final receptors natively from drop4-en90k (5/5 logit parity) and synthesizing native blk.47 rank-8 adapters (adapters_drop4_pruned/wsp_nb_drop4_manifest.json, svd_energy = 1.0, null_leak = 2.43–3.50%) scored 22/28 on VAL_28, whereas zero-shot transfer (blk.51 -> blk.47 from the 52L solution) scored 23/28 (cut=0) and was selected for full 155-task evaluation (benchmarks/nanbeige_drop4_en90k_155_results.json): 110/155 (71.0%, +11 vs Orig Base, cut=0/145) (agent100 78/100, stem45 29/45, tbench10 3/10, 46.0 tok/s median, 9807 MiB paired VRAM).

Build & Run Shrunk Variants Locally

# 1) Build lossless vocab-pruned en90k (~76s) into ./gguf/
python scripts/build_vocab_pruned_gguf.py

# 2) Build stacked drop4-en90k (48L, 90K vocab, 8.639 GiB, ~25s) into ./gguf/
python scripts/build_and_test_stacked_prune.py

# Launch lossless en90k + adapters_pruned/ (auto-loads en90k_keep_ids.json)
python run_nanbeige_lite.py --model-path ./gguf/Nanbeige_Nanbeige4.3-33B-IQ2_XS-en90k.gguf --adapter-dir ./adapters_pruned

# Launch fast 16K-context drop4-en90k + adapters_drop4_pruned/
python run_nanbeige_lite.py --model-path ./gguf/Nanbeige_Nanbeige4.3-33B-IQ2_XS-drop4-en90k.gguf --adapter-dir ./adapters_drop4_pruned --ctx 16384

5. Repository Layout

  • Root Runtime: README.md, run_nanbeige_lite.py (supports --adapter-dir adapters_pruned & adapters_drop4_pruned), nanbeige_lite_router.py, en90k_keep_ids.json, requirements.txt, chat_template.jinja, config.json, tokenizer.json, tokenizer_config.json, added_tokens.json, generation_config.json
  • adapters_lite/ (8.63 MB, 52L / 166K): wsp_nb_think_close.gguf, wsp_nb_restraint.gguf, wsp_nb_shell_action.gguf, wsp_nb_manifest.json, val28_lite_results.json
  • adapters_pruned/ (5.13 MB, 52L / 90K): remapped 3 rank-8 GGUFs + vocab_prune_map.json
  • adapters_drop4_pruned/ (5.13 MB, 48L / 90K): blk.51 -> blk.47 remapped 3 rank-8 GGUFs + wsp_nb_drop4_manifest.json, val28_drop4_native_results.json
  • scripts/ (19 scripts): Complete Phase-A/B WSP pipeline (8 scripts) + ShortGPT layer scan, vocab/stacked pruning, native 48L capture/synthesis, and verification/benchmark scripts (11 scripts)
  • benchmarks/ (15 JSON logs): Complete raw telemetry across original 155-task runs (6 JSONs) and all non-quantization shrinking benchmarks (9 JSONs)

Citation & Attribution

If you use these adapters or weight-space tools, please credit Nanbeige (Nanbeige/Nanbeige4.3-33B) and bartowski (bartowski/Nanbeige_Nanbeige4.3-33B-GGUF).

Downloads last month
317
GGUF
Model size
897k params
Architecture
llama
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jstarks/Nanbeige4.3-33B-Weight-Space-Programming

Adapter
(4)
this model