Run this model with HF Jobs

Run netprojects/Looped-Qwen4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/netprojects/Looped-Qwen4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/netprojects/Looped-Qwen4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Looped-Qwen4

The loop is Jason Titus's work. He designed and trained the looped (recurrent-depth) adapter for Qwen4-35B-A3B and released it under MIT: sliderforthewin/Looped-Qwen4-35B-A3B (write-up, code: jasontitus/loopedqwen). We did not train anything here. We packaged his loop weights so they run on MLX and on GGUF / llama.cpp (Mac, Windows, Linux) with one flag.

Loop files for the Qwen4 series: run a model's middle ("core") layers 2 or 3 times for better reasoning from the same weights. The base model is unchanged; these small files add the mixing layers between passes. One folder per model.

Model Folder Core layers Loop weights
Qwen4-35B-A3B Qwen4-35B-A3B/ 12-27 (16 of 40) Jason Titus, Open-Channel v4 (sliderforthewin/Looped-Qwen4-35B-A3B @ 7b08957d), MIT

Files in Qwen4-35B-A3B/:

File Size For
looped-qwen4-loop.gguf 94 MB (F32) llama.cpp, GGUF builds (Mac, Windows, Linux)
mlx/default_t2/ 24 MB MLX, 2 passes
mlx/default_t3/ 25 MB MLX, 3 passes

You don't need to download these by hand: the tool fetches the right folder for the model you run.

Run it

Tool, llama.cpp patch and prebuilt llama-server zips (Metal, CUDA, Vulkan, CPU): github.com/internet-projects/looped-qwen4 (see its Releases page for the zips).

GGUF (any Qwen4-35B-A3B GGUF, unchanged), with the patched llama-server from the zip:

llama-server -hf netprojects/Qwen4-35B-A3B-GGUF:Q4_K_XL --loop-file looped-qwen4-loop.gguf --loop 2 --jinja -ngl 99

MLX (any Qwen4-35B-A3B MLX build; ours by default):

pip install "looped-qwen4-mlx[mlx] @ git+https://github.com/internet-projects/looped-qwen4"
looped-qwen4 chat --passes 2
Flag Meaning
--loop 1 / --passes 1 plain model
--loop 2 / --passes 2 recommended (LoopCD 0.20)
--loop 3 / --passes 3 deepest (LoopCD 0.15)

Our builds: LayerFit MLX 3-bit, 4-bit, 5-bit, GGUF.

Results

Quality is Jason Titus's own scorecard (vLLM, FP8, n=30-60 per suite), not yet measured on our quants: macro score 75.4 plain, 76.5 at 2 passes, 78.5 at 2 passes with LoopCD 0.20 (our default), 81.1 at 3 passes, 80.9 at 3 passes with LoopCD 0.15 (our default).

Speed and memory, measured here on an M5 Max, decode at 1 / 2 / 3 passes:

Build tok/s Peak memory
Qwen4-35B-A3B-LayerFit-MLX-4bit (MLX) 90 / 68 / 54 20.8 / 20.9 / 21.0 GB
Qwen4-35B-A3B-GGUF Q4_K_XL (llama.cpp Metal) 88 / 64 / 50 23.9 / 24.4 / 24.9 GB

So 2 passes run at about 75% of plain speed and 3 passes at about 60%, for well under 1 GB extra memory. At 1 pass the output matches the plain model exactly: same tokens and top-5 on our Q4_K_XL in llama.cpp (Metal), and on our LayerFit 4-bit in MLX.

Limits

  • Tested on text only (no image input checked with the loop yet).
  • MTP (built-in drafting) is off while looping, so you lose MTP speed-ups.
  • Needs our tool (MLX) or our patched llama.cpp (GGUF). LM Studio, Ollama and stock llama.cpp load the same model files but run them plain, without the loop.
  • Loop files exist for 2 and 3 passes only (the ones Jason trained).

Credits and licence

The Qwen4-35B-A3B loop weights are Jason Titus's work, released under the MIT licence; the files here are the same weights (MLX copies unchanged; the GGUF file is a format conversion). See LICENSE. The base model is Qwen's. Not affiliated with Qwen or the loop's author.

Background: recurrent depth (Geiping et al., 2025, "Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach", arXiv:2502.05171). LoopCD-Hidden is described in Jason Titus's write-up.

Downloads last month
-
MLX
Hardware compatibility
Log In to add your hardware

Quantized

GGUF
Model size
23.4M params
Architecture
qwen4exp
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 netprojects/Looped-Qwen4

Adapter
(24)
this model

Collections including netprojects/Looped-Qwen4

Paper for netprojects/Looped-Qwen4