Instructions to use sliderforthewin/Looped-DeepSeek-V4.1-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use sliderforthewin/Looped-DeepSeek-V4.1-Flash with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download sliderforthewin/Looped-DeepSeek-V4.1-Flash --local-dir Looped-DeepSeek-V4.1-Flash
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
- Looped DeepSeek-V4.1-Flash (
R5-ARecurrent-Depth Adapter +LoopCD-HiddenforvLLM& Apple Siliconsushi)
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.
- Write-Up & Architecture Deep Dive: Looped DeepSeek-V4.1 Blog Post
- 1-Command Mac & CUDA Installers + Reproducible Eval Kit:
jasontitus/dsv41-loop-eval - Recurrent Trainer & Zero-Fork
vLLMPlugin (vllm_loop):jasontitus/mlx-stq-trainer - Apple Silicon
sushiRecurrent Decoder Integration:beamivalice/sushi#280
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)
| 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β23run once as a frozen encoder + prelude producing a4-stream HyperConnection anchor; recurrent core layers24β35runTpasses through a zero-initialized gated workspace entry (entry.safetensors) +core/LoRA (rank=16on attention & shared experts across passesp >= 1) with isolated per-pass128-token sliding-window KV caches; coda layers36β39(coda/LoRA) read out to the frozen LM head. Pass0withT=1is bit-for-bit identical to stockDeepSeek-V4.1-Flash-1017. - Credits: Trainer evolved from
UnstableLlama/exl3-qloraand Turboderp'sExLlamaV3; Apple Silicon inference powered bybeamivalice/sushi(beamsterSTQ packs) and Apple's LoopCD (arXiv:2610.02185); CUDA Full-Precision inference powered byvLLM.
Quantized
Model tree for sliderforthewin/Looped-DeepSeek-V4.1-Flash
Base model
deepseek-ai/DeepSeek-V4.1-Flash-1017
