Multilingual-Multimodal-NLP/LoopCoder-V2 · Hugging Face

Reddit r/LocalLLaMA Models

Summary

LoopCoder-V2 is a 7B instruction-tuned code model built on the Parallel Loop Transformer (PLT), demonstrating non-monotonic test-time scaling with two loops providing the best gain-cost trade-off and significant improvements over baselines on code generation and reasoning benchmarks.

No content available
Original Article
View Cached Full Text

Cached at: 06/17/26, 07:19 PM

Multilingual-Multimodal-NLP/LoopCoder-V2 · Hugging Face

Source: https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#loopcoder-v2LoopCoder-V2

LoopCoder-v2 is a 7B instruction-tuned code model based on the Parallel Loop Transformer (PLT). The model studies test-time computation scaling through repeated application of shared Transformer blocks while keeping the parameter count fixed.

The released checkpoint is the two-loop PLT variant (plt\_num\_loops=2). In the accompanying paper, this setting gives the best gain-cost trade-off: the second loop provides most of the useful latent refinement, while additional loops show diminishing or unstable updates.

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#highlightsHighlights

  • 7B dense PLT coder trained from scratch on 18T tokens of mixed text and code data.
  • Instruction-tuned with a matched supervised fine-tuning recipe.
  • Uses cross-loop position offsets and shared-KV gated sliding-window attention.
  • Targets code generation, multilingual code, code reasoning, agentic software engineering, and tool-use workflows.
  • Strongest loop-count setting in the paper: two loops, not more.

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#model-detailsModel Details

ItemValueArchitectureIQuestPLTCoderForCausalLMParametersApproximately 7BHidden size5120Layers14 shared layersAttention heads40KV heads8Head dimension128Intermediate size27648ActivationSwiGLUNormalizationRMSNorm, epsilon 1e-5Position embeddingRoPE, theta 500000Vocabulary size76800Max position embeddings131072Precisionbfloat16PLT loops2PLT window size64

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#evaluation-summaryEvaluation Summary

Selected results from the paper are shown below. All LoopCoder-v2 variants use the same 7B shared-parameter setup and matched training, tuning, and evaluation protocols.

ModelHumanEval+MultiPL-EBigCodeBenchLiveCodeBenchSWE-bench VerifiedMulti-SWETerminal-BenchTerminal-Bench 2.0Mind2WebBFCL V3Avg.Baseline, 1 loop81.169.540.127.443.014.026.311.235.332.238.0LoopCoder-v2, 2 loops84.173.946.135.464.431.034.221.034.540.146.5LoopCoder-v2, 3 loops75.069.843.328.627.611.030.012.235.136.336.9LoopCoder-v2, 4 loops76.867.340.824.522.49.326.39.041.439.534.3 The paper’s main finding is that PLT loop-count scaling is non-monotonic. The two-loop model improves broadly over the one-loop baseline, including SWE-bench Verified from 43.0 to 64.4 and Multi-SWE from 14.0 to 31.0, while three or more loops regress on many tasks.

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#usageUsage

This checkpoint uses a custom PLT model architecture. Load it in an environment that provides support forIQuestPLTCoderForCausalLMand the custom tokenizer/configuration files in this repository.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo_id = "Multilingual-Multimodal-NLP/LoopCoder-V2"

tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    repo_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)

messages = [
    {"role": "user", "content": "Write a Python function that checks whether a string is a palindrome."}
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
).to(model.device)

outputs = model.generate(
    inputs,
    max_new_tokens=512,
    do_sample=True,
    temperature=0.6,
    top_p=0.95,
    top_k=20,
)

print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#training-dataTraining Data

LoopCoder-v2 was trained from scratch on an internal deduplicated mixture of text and code totaling 18T tokens, balanced at a 1:1 text-to-code token ratio. The code portion spans more than 100 programming languages. The largest language shares reported in the paper include Java, Python, JavaScript, Markdown, TypeScript, C, C++, PHP, C#, and HTML.

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#intended-useIntended Use

LoopCoder-v2 is intended for code generation, code reasoning, repository-level software engineering assistance, and tool-use research. It is especially useful for studying how looped latent computation changes model behavior under fixed parameter count.

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#limitationsLimitations

LoopCoder-v2 can produce incorrect, insecure, or incomplete code and should not be used without review in production systems. The released model is optimized for coding and tool-use workloads; performance on unrelated open-domain tasks may vary. The paper also shows that increasing PLT loops beyond the two-loop setting can hurt performance, so this checkpoint should be treated as the recommended loop-count configuration rather than evidence that more loops are always better.

https://huggingface.co/Multilingual-Multimodal-NLP/LoopCoder-V2#citationCitation

@misc{loopcoder_v2_2026,
  title = {LoopCoder-v2: Only Loop Once for Efficient Test-Time Computation Scaling},
  author = {Yang, Jian and Guo, Shawn and Zhang, Wei and Zheng, Tianyu and Du, Yaxin and Li, Haau-Sing and Wu, Jiajun and Song, Yue and Xing, Yan and Cai, Qingsong and Huang, Zelong and Hao, Chuan and Tao, Ran and Liu, Xianglong and Zhao, Wayne Xin and Tang, Mingjie and Lv, Weifeng and Zhou, Ming and Dai, Bryan},
  year = {2026}
}

Similar Articles