← Back to Leaderboard
Ljasontitus

jasontitus/loopedqwen

Recurrent Qwen3.8-27B inference that trades extra layer passes for shorter answers

View on GitHub ↗
Engineering Health (Methodology)
A+ · 89/100
Maintenance Activity
● Updated today
Latest Release
v3.1.2
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption14/25
Release Cadence20/20
License Clarity20/20
Local AIGPU
Total Stars
★ 233
24h Growth
+33
7d Growth
+232
Forks
30

GitHub Star History

Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.

jasontitus/loopedqwen Star History (2026-11-27 - 2026-12-04) DAILY STAR HISTORY (8-DAY D1 TELEMETRY) +232 in 7d · avg +33/day 246 123 0 2026-11-27: ★ 12026-11-28: ★ 92026-11-29: ★ 812026-11-30: ★ 1462026-12-01: ★ 1782026-12-02: ★ 1962026-12-03: ★ 2002026-12-04: ★ 233 ★ 233 11-27 11-30 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Looped Qwen reuses the Qwen3.8-27B checkpoint and applies a gated workspace adapter to rerun layers 24–39, a 16-block span that combines GatedDeltaNet and gated attention. The 62.85M-parameter adapter occupies about 240 MB and lets successive passes refine the 5,120-dimensional hidden state before output. T=1 is the non-looped reference; higher T values repeat the core. LoopCD-Hidden is optional guidance, distinct from the MTP head used for speculative decoding.

The Python MLX path starts at scripts/run_mlx.py; requirements.txt selects mlx>=0.32.0 and mlx-lm>=0.31.0 on Darwin arm64 and includes Hugging Face Hub, SafeTensors, Transformers and NumPy. The mlx-serve integration uses a native Zig plugin under plugins/looped_qwen38/. The CUDA integration under vllm_looped_qwen38/ registers through vllm.general_plugins and uses a custom model architecture. Training entrypoints, train_loop.py and train_drafter.py, sit alongside serving code and standalone invariant tests.

Key Capabilities & Differentiators

At the same 80k token cap, unguided T=3 scored 78.9% on 175 LiveCodeBench v6 tasks versus 72.6% for T=1, while token use fell from 31,566 to 15,117. That gain is not uniform: on HumanEvalFix, T=3 with LoopCD scored 97.0% versus 98.8% for T=1, though it used 223 versus 2,289 tokens. The separate 85.0% LiveCodeBench result used 60 tasks and a 64k cap, so it should not be read as a direct improvement over the full 175-task run.

The Apple Silicon path covers 8-bit, 4-bit and 1.76-bit ternary Bonsai weights. With plugin v0.3.5, a 24 GB M4 Pro Mac mini ran Bonsai at 32k context with MTP in 12.5 GB peak unified memory; the Bonsai fix delivered 71.8%–79.3% draft acceptance and a 41% decode speedup in the reported configuration. A separate six-stream result used 16k context, 8-bit KV quantization and MTP disabled. Those two measurements are not interchangeable capacity targets.

Trade-offs & Limitations

Compared with stock Qwen3.8-27B on a standard runtime, this design puts more compute into each generated token in the hope of generating fewer tokens overall. On the M2 Max Hard-18 set at 8-bit, unguided T=2 reduced throughput from 12.73 to 10.96 tok/s but cut time per question from 278.3s to 185.8s. With LoopCD, T=4 scored 12/18 versus 11/18 for T=2, yet took 221.7s versus 148.6s per question. Depth is a quality–latency control, not a universal upgrade; the curated 18-task set is useful for tuning, not for predicting production performance.

The custom plugin and matched artifacts add upgrade and capacity-planning work relative to an unmodified checkpoint. The current vLLM plugin requires TP=1, and CUDA-graph MTP integration is listed as future work, so do not budget for Mac MTP speedups on NVIDIA. The repository code is MIT-licensed; review terms for the base weights, adapters, sidecar and third-party quantizations separately before redistribution.

Hardware & Deployment Guide

On Apple Silicon, choose the mlx-serve installer or DMG for browser chat and a local API, or use the Python/MLX runner. The Mac installer can reuse cached base weights, and the OpenAI-compatible endpoint is http://127.0.0.1:11234/v1 by default. On Linux/NVIDIA, use the CUDA installer, install the vLLM plugin into an existing environment, or build docker/vllm_looped/Dockerfile. The documented single-GPU targets are 48 GB for FP8 and 80 GB or more for BF16; context and concurrency still determine usable headroom.

The vLLM path fetches the adapter from Hugging Face on first launch unless it is already staged. For an offline deployment, prepare the runtime dependencies and model artifacts in advance; the miniature invariant suites can run without the 27B download. Release v3.1.2 added overlap and stale-symlink safeguards to MLX pack exports, atomic two-phase adapter reload, TP=1 validation and packed thinking-mask isolation for LoopCD-Hidden.

Recurrent core: A roughly 240 MB adapter reruns layers 24–39 without replacing the base checkpoint.
Inference controls: Recurrence depth, LoopCD-Hidden guidance and MTP drafting address different parts of the quality–latency tradeoff.
Benchmark evidence: At 80k, unguided T=3 reached 78.9% on 175 LiveCodeBench v6 tasks versus 72.6% for T=1, using 15,117 versus 31,566 tokens.
Low-memory path: The mlx-serve plugin supports 1.76-bit Bonsai; v0.3.5 restored MTP acceptance to 71.8%–79.3% in the reported Mac runs.
Serving boundary: MLX and mlx-serve cover Apple Silicon, while the CUDA vLLM plugin currently requires TP=1.
Reproduction: Miniature MLX and vLLM invariant suites exercise loop behavior without downloading the 27B checkpoint.
Best For

Local coding and math evaluation on Apple Silicon or a single large NVIDIA GPU, where you can tune depth and quantization against task accuracy, latency and memory.

Skip If

You need multi-GPU tensor parallelism, a stock-checkpoint serving path, or predictable speedups without validating your own workload.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIGPU
curl -fsSL https://raw.githubusercontent.com/jasontitus/loopedqwen/main/install_mac.sh | bash

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
loopedqwen ★233+232PythonMITRecurrent Qwen3.8-27B inference that trades extra layer passes for shorter answe
minimind75.4k+3.1kPythonApache-2.0Native PyTorch dense and MoE models for end-to-end LLM training on local GPUs
autoresearch101k+342Python—Single-GPU nanochat harness for agent-led, five-minute training experiments
LlamaFactory76.4k+86PythonApache-2.0A unified Python framework for LLM and VLM fine-tuning with pluggable inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/jasontitus/loopedqwen.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

jasontitus/loopedqwen Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about loopedqwen

Can I add the adapter to an unchanged Qwen serving stack?

The roughly 240 MB adapter requires a loop-aware runtime. On Apple Silicon, use the MLX Python runner or the mlx-serve plugin; on NVIDIA, the vLLM plugin registers via vllm.general_plugins and the launch example selects the custom LoopedQwen3_5ForCausalLM architecture. An OpenAI-compatible client can call the server without implementing recurrence itself.

How much memory should I budget?

On a 24 GB M4 Pro Mac mini, 1.76-bit Bonsai peaked at 12.5 GB with 32k context and MTP enabled. In the same desktop environment, the 4-bit pack failed a preflight check that required 18.0 GB free. For CUDA, the documented starting points are a single 48 GB GPU for FP8 and 80 GB or more for BF16, with TP=1. Verify headroom at your actual context length and concurrency.

Does MIT cover commercial self-hosting and redistribution of the full model bundle?

The repository code is MIT-licensed; preserve the required notices when redistributing it. Review the applicable terms for the base weights, adapter, MTP sidecar and third-party quantizations separately. Self-hosting gives you control over where inference runs, but installers and first launches can fetch external artifacts. Stage those artifacts in advance for offline or restricted environments.

How should I choose between this and stock Qwen3.8-27B?

Test both at the same quantization, context limit, sampling settings and request load. Compare accuracy, generated tokens, peak memory and end-to-end latency rather than tokens per second alone. Stock Qwen is the simpler default when you need standard runtime support or when looped inference does not improve your task-level results.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining jasontitus/loopedqwen? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature jasontitus/loopedqwen on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare