base_model:
- Jaython/Qwen4-35B-A3B-FP8-Uncensored
library_name: safetensors
license: apache-2.0
pipeline_tag: text-generation
language: - en
- zh
tags: - qwen4
- looped-transformer
- latent-reasoning
- test-time-compute
- rlvr
- gspo
- loopcd
- fp8
- uncensored
- adapter
Looped-Qwen4-35B-A3B-FP8-Uncensored-Adapter
This project draws on valuable insights from Apple LoopCD (
arXiv:2610.02185), DeepSeek Loop Transform (arXiv:2611.13378), GLM-5.4, and Qwen GSPO / DAPO, as well as open-source projectssliderforthewin/Looped-Qwen4-35B-A3B,alesha-pro/Looped-Qwen3.8-Flash-Next, and Heretic, and conducts 17 controlled benchmark experiments. Full experimental designs and stage-by-stage results can be viewed in English Detailed Experiment Report (EXPERIMENT_REPORT_EN.md) and 中文详细实验报告 (EXPERIMENT_REPORT_ZH.md).本项目借鉴了 Apple LoopCD(
arXiv:2610.02185)、DeepSeek Loop Transform(arXiv:2611.13378)、GLM-5.4、Qwen GSPO / DAPO 等论文与技术报告,以及sliderforthewin/Looped-Qwen4-35B-A3B、alesha-pro/Looped-Qwen3.8-Flash-Next、Heretic 等开源项目的宝贵经验,并设计了 17 组对照实验,详细实验流程与各阶段实验结果可在 中文详细实验报告(EXPERIMENT_REPORT_ZH.md) 或 English Detailed Experiment Report(EXPERIMENT_REPORT_EN.md) 查看。
Required Base Model: Jaython/Qwen4-35B-A3B-FP8-Uncensored (Abliterated Base) · Adapter Footprint: 23.1 MB BF16 (12.81M zero-LoRA parameters; all 40 base layers 100% frozen).
Final Results & Improvement Summary


- Surpasses Both the Abliterated Base & Official Censored FP8:
Static-Gate SFT(ckpt_best_peak,T=3 + LoopCD ref="first") reaches73.33% (110/150)overall and68.18% (75/110)on reasoning — gaining+5.33 pp(+10/-2paired, McNemarp=0.0386 < 0.05) over theT=1Abliterated Base (68.00%) and surpassing the official censoredQwen/Qwen4-35B-A3B-FP8(70.67%) by+2.66 pp(+9/-5paired). - Major Math & Code Reasoning Gains: Relative to the
T=1Abliterated Base,AIME 2025rises+13.34 pp(23.3% → 36.7%, matching Official FP8),MATH-500 Hardreaches85.0%–87.5%(+2.5 to +5.0 ppabove Official FP8), andMBPP-Test Thinkrises+10.00 pp(65.0% → 75.0%,+7.5 ppabove Official FP8). - Strictly Monotonic Depth Scaling with GSPO-RLVR:
ckpt_best_rlvrscales monotonically acrossT=1 (102/150) → T=2 (105/150) → T=3 (107/150) → T=3+LoopCD (109/150, 72.67%), eliminatingT=3truncation regressions in standardω=0deployments. 6×Smaller, Faster Prefill & Zero Uncensored Regression: Cuts adapter size from139 MB(LoRA-Loop Baseline) to23.1 MBBF16 (0-LoRA), slashesT=3TTFT by-35.3%with asymmetric prefill + QSA index reuse (106/150parity atT=2), and preserves2.0%–4.0%EN /0.0%ZH manual refusal rates with8/8harmless capability.
Checkpoints & Quickstart
ckpt_best_peak.safetensors(Strata/vLLM compatible export:ckpt_best_peak_v3.safetensors): Recommended withT=3, loop_cd_omega=0.15, loop_cd_ref="first"for peak accuracy (73.33%,110/150).ckpt_best_rlvr.safetensors(Strata/vLLM compatible export:ckpt_best_rlvr_v3.safetensors): Recommended for standardω=0engines (T=3→71.33%,107/150) orT=3 + LoopCD(72.67%,109/150).checkpoints/per_token_dynamic_gate/ckpt_0080.safetensors: GLM-5.4-style per-token dynamic gate research checkpoint (T=2, ω=0→71.33%,Think-110 = 65.45%).
import sys, torch
from transformers import AutoTokenizer
sys.path.insert(0, "code/src")
from looped_qwen_next.infer_cache import BatchedLoopedKVGenerator, load_qwen4_fp8_pipeline_2gpu
from looped_qwen_next.model import LoopedQwen4Exp
device = torch.device("cuda:0")
base_path = "Jaython/Qwen4-35B-A3B-FP8-Uncensored" # local snapshot path
tok = AutoTokenizer.from_pretrained(base_path)
base_lm = load_qwen4_fp8_pipeline_2gpu(
base_path, split_layer=40, dev0=device, dev1=device, ple_device="cpu", compute_dtype=torch.bfloat16
)
model = LoopedQwen4Exp.from_checkpoint(base_lm, "ckpt_best_peak.safetensors").eval()
gen = BatchedLoopedKVGenerator(model)
prompt = tok.apply_chat_template(
[{"role": "user", "content": "Find the remainder when 7^2025 is divided by 1000. Put your answer in \\boxed{}."}],
tokenize=False, add_generation_prompt=True, reasoning_effort="high",
)
out = gen.generate_batch(
[tok.encode(prompt, add_special_tokens=False)],
num_passes=3, prefill_passes=1, reuse_qsa_index=True,
loop_cd_omega=0.15, loop_cd_ref="first", max_new_tokens=4096, temperature=0.0,
)
print(tok.decode(out[0].token_ids, skip_special_tokens=True))