Looped DeepSeek-V4.1-Flash (R5-A Recurrent-Depth Adapter + LoopCD-Hidden for vLLM & Apple Silicon sushi)

A tiny 35.4M-parameter (~135 MiB FP32 / ~71 MB BF16, 0.0064% of 552B) drop-in recurrent loop adapter over 12 middle decoder layers (L24–35, coda L36–39) of frozen DeepSeek-V4.1-Flash-1017 β€” boosting Full-Precision LiveCodeBench coding accuracy from 75.8% β†’ 84.8% (+23.1 pts on the 13 hardest problems), cutting <think> tokens 27% (~5% fewer layer-passes per answer), and lifting 1.75-bit local Apple Silicon Mac inference +18.2 pts (57.6% β†’ 75.8%) to match Cloud Full Precision.

Benchmark Overview


Included Checkpoints

The repo root (loop.json, entry.safetensors, core/, coda/) points directly to r5a-000300 so you can pass a cloned/downloaded directory straight to sushi --loop <dir> or DSV41_LOOP_DIR=<dir>. Individual checkpoints are also organized under checkpoints/:

Path Trained Base Recommended Target & Settings Highlight Score (LiveCodeBench v6, 32,768 tok cap)
Repo Root / checkpoints/r5a-000300/ Official MXFP4 (300 steps) Full-Precision vLLM (loop=2, Ο‰=0.0) & general Mac serving 84.8% (28/33, +9.1 pts) overall; 84.6% (11/13, +23.1 pts) on Hard R13; -27% tokens
checkpoints/r5a-000250/ Official MXFP4 (250 steps) Apple Silicon 1.75-bpw STQ (sushi) (loop=2 + LoopCD Ο‰=0.3) 75.8% (25/33, +18.2 pts) β€” exact parity with Stock Cloud Full Precision (25/33); 100% (4/4) on 20k+-token proofs
checkpoints/r5a-000225/ Official MXFP4 (225 steps) Apple Silicon 1.75-bpw STQ (loop=2, Ο‰=0.0 or Ο‰=0.3) 100% (4/4) on smoke4 long-chain proofs even without LoopCD
checkpoints/r4bp-000200/ 1.75-bpw STQ (200 steps) Apple Silicon 1.75-bpw STQ (loop=2, Ο‰=0.0) 66.7% (22/33 strict / 69.7% lenient), 3/4 strict (4/4 lenient) on smoke4

Quickstart 1: Apple Silicon Mac (sushi STQ-1.75bpw / STQ-2.7bpw, macOS 26.2+)

Option A β€” Turnkey 1-Line Installer (48 GB to 512 GB Macs; 0 GB re-downloaded if cached)

curl -fsSL https://raw.githubusercontent.com/jasontitus/dsv41-loop-eval/main/install_mac.sh | bash

Option B β€” Download Adapter Direct from Hugging Face & Run with sushi

hf download sliderforthewin/Looped-DeepSeek-V4.1-Flash --local-dir ./Looped-DeepSeek-V4.1-Flash

# Serve 1.75-bit STQ with R5-A@250 + LoopCD (omega=0.3):
sushi --serve   --model ~/.sushi/models/beamster/DeepSeek-V4.1-Flash-1017-Sushi-STQ-1.75bpw   --port 11434   --ctx-size 36864   --loop ./Looped-DeepSeek-V4.1-Flash/checkpoints/r5a-000250   --loop-depth 2   --loopcd-omega 0.3   --loopcd-ref prev

Quickstart 2: NVIDIA CUDA Full Precision (vLLM + dsv41_loop)

Supports 4Γ— >=94 GB GPUs (4Γ— RTX PRO 6000 Blackwell 96GB, 4Γ— H100 NVL 94GB, 4Γ— H200 141GB, 4Γ— B200), 8Γ— 80 GB H100 (TP=8), or 4Γ—/8Γ— Merged DGX Sparks (200 GbE + Ray) on vLLM >= 0.34.1rc1 nightly:

Option A β€” Turnkey 1-Line CUDA Installer

curl -fsSL https://raw.githubusercontent.com/jasontitus/dsv41-loop-eval/main/install_cuda.sh | bash

Option B β€” Download Direct from Hugging Face & Run vllm serve

hf download sliderforthewin/Looped-DeepSeek-V4.1-Flash --local-dir ./Looped-DeepSeek-V4.1-Flash
pip install --no-build-isolation --no-deps -e ./Looped-DeepSeek-V4.1-Flash/vllm_loop

DSV41_LOOP_DIR=./Looped-DeepSeek-V4.1-Flash DSV41_LOOP_DEPTH=2 DSV41_LOOP_CD_OMEGA=0.0 vllm serve deepseek-ai/DeepSeek-V4.1-Flash-1017   --tensor-parallel-size 4   --language-model-only   --tokenizer-mode deepseek_v41   --reasoning-parser deepseek_v41   --kv-cache-dtype fp8_ds_mla   --engram-config '{"cpu_offload":true}'   --max-model-len 36864   --enforce-eager   --no-swa-bounded-replay   --trust-remote-code

LiveCodeBench v6 Benchmark Summary (--effort high, 32,768 Token Limit)

Shorter Thinking Chains Pay for the Extra Loop Pass

Test Split Stock 1.75-Bit Mac (1p) Looped 1.75-Bit Mac (2p+CD, r5a-000250) Stock Full Precision (1p) Looped FP (2p, r5a-000300) Looped FP (2p+CD, r5a-000300) Looped FP (3p, r5a-000300)
All 33 Medium + Hard 57.6% (19/33) 75.8% (25/33) 75.8% (25/33) 84.8% (28/33) 81.8% (27/33) 81.8% (27/33)
13 Hardest (R13) 30.8% (4/13) 53.8% (7/13) 61.5% (8/13) 84.6% (11/13) 69.2% (9/13) 69.2% (9/13)
20-Problem Stratified 75.0% (15/20) 75.0% (15/20) 75.0% (15/20) 80.0% (16/20) 80.0% (16/20) 80.0% (16/20)
4 Long-Chain Hard 25.0% (1/4) 100.0% (4/4) 100.0% (4/4) 100.0% (4/4) 100.0% (4/4) 100.0% (4/4)
Mean Tokens (All 33) ~20,500 17,324 (-15%) 16,979 12,436 (-27%) 11,953 (-30%) 13,997 (-18%)

Architecture & Credits

  • Causal Encoder-Decoder Recurrent Wiring: Layers 0–23 run once as a frozen encoder + prelude producing a 4-stream HyperConnection anchor; recurrent core layers 24–35 run T passes through a zero-initialized gated workspace entry (entry.safetensors) + core/ LoRA (rank=16 on attention & shared experts across passes p >= 1) with isolated per-pass 128-token sliding-window KV caches; coda layers 36–39 (coda/ LoRA) read out to the frozen LM head. Pass 0 with T=1 is bit-for-bit identical to stock DeepSeek-V4.1-Flash-1017.
  • Credits: Trainer evolved from UnstableLlama/exl3-qlora and Turboderp's ExLlamaV3; Apple Silicon inference powered by beamivalice/sushi (beamster STQ packs) and Apple's LoopCD (arXiv:2610.02185); CUDA Full-Precision inference powered by vLLM.
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for sliderforthewin/Looped-DeepSeek-V4.1-Flash

Paper for sliderforthewin/Looped-DeepSeek-V4.1-Flash