CoolFace
Modelpublic

ZhishanQ/qwen3-embedding-redundancy-detector-0.6B

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes196downloads
Model Card

Qwen3-Embedding Redundancy Detector (0.6B) — PUMA

This is the Redundancy Detector (RD) used in the paper ["Stop When Reasoning Converges: Semantic-Preserving Early Exit for Reasoning Models"](https://arxiv.org/abs/2605.17672), which proposes PUMA (Progress-aware Unified Monitoring framework for Adaptive early exit), a plug-and-play framework for efficient reasoning.

It is a fine-tuned `Qwen/Qwen3-Embedding-0.6B` that scores semantic redundancy between reasoning steps of a Large Reasoning Model (LRM). PUMA uses it to track when a reasoning trajectory has converged — i.e., when successive steps no longer add novel progress and instead revisit established conclusions — so that generation can stop early without sacrificing final-answer accuracy or the coherence of the retained reasoning chain.

  • —📄 Paper: https://arxiv.org/abs/2605.17672
  • —💻 Code: https://github.com/giovanni-vaccarino/PUMA

What it does

During reasoning, PUMA splits the model's chain of thought into steps r₁, …, rₜ and embeds each step with this model. A step is flagged as a candidate exit point when it is semantically redundant with a recent step, measured by the maximum cosine similarity to the previous k steps:

$$ st^{(k)} = \max{t-k \le j < t} \cos\big(f(rj),\, f(rt)\big) $$

where f(·) is this embedding model. PUMA flags a step when its redundancy score exceeds a threshold τ_sim. The paper's default operating point is τ_sim = 0.35 with a local window k = 1 (compare against the immediately preceding step). A flagged step is then passed to PUMA's answer-level verification before generation is actually stopped.

Training

  • —Base model: Qwen3-Embedding-0.6B
  • —Objective: a contrastive objective, training the model to distinguish reasoning steps that introduce new logical or semantic progress from those that merely restate, re-derive, or loop over prior content (rather than generic textual similarity).
The training pipeline and the contrastive dataset construction are released in the PUMA repository.

Usage

python
from sentence_transformers import SentenceTransformer
import numpy as np

model = SentenceTransformer("ZhishanQ/qwen3-embedding-redundancy-detector-0.6B")

# Reasoning steps from an LRM's chain of thought
steps = [
    "Let's set up the equation for the triangle inequality.",
    "So we need 1 + x > y, 1 + y > x, and x + y > 1.",
    "Restating: the three inequalities above must all hold.",  # redundant
]

emb = model.encode(steps, normalize_embeddings=True)

# Redundancy score of the last step vs. the previous one (k = 1)
tau_sim = 0.35
sim = float(emb[-1] @ emb[-2])
print(f"similarity = {sim:.3f}  ->  {'REDUNDANT (candidate exit)' if sim > tau_sim else 'novel'}")

With vLLM (as used in the PUMA pipeline)

PUMA embeds reasoning steps with vLLM's pooling runner:

python
import numpy as np
from vllm import LLM

llm = LLM(
    model="ZhishanQ/qwen3-embedding-redundancy-detector-0.6B",
    runner="pooling",
    trust_remote_code=True,
    gpu_memory_utilization=0.3,
)

steps = [
    "Let's set up the equation for the triangle inequality.",
    "So we need 1 + x > y, 1 + y > x, and x + y > 1.",
    "Restating: the three inequalities above must all hold.",  # redundant
]

outputs = llm.embed(steps)
emb = np.array([o.outputs.embedding for o in outputs])
emb /= np.maximum(np.linalg.norm(emb, axis=1, keepdims=True), 1e-12)  # L2 normalize

tau_sim = 0.35
sim = float(emb[-1] @ emb[-2])  # cosine (already normalized), window k = 1
print(f"similarity = {sim:.3f}  ->  {'REDUNDANT (candidate exit)' if sim > tau_sim else 'novel'}")

In the full PUMA pipeline this RD signal is combined with answer-level verification (trial-answer confidence + consistency) before an early exit is committed; see the paper and code for details.

Evaluation

In the paper, PUMA (using this RD) is evaluated on 5 reasoning models (DeepSeek-R1-Distill-Qwen-7B/14B/32B, Llama-3.1-Nemotron-Nano-8B, Qwen3-30B-A3B-Thinking) across 5 benchmarks (MATH-500, AIME24, AIME25, OlympiadBench, GPQA-Diamond), achieving 26.2% average token reduction while preserving final-answer accuracy and the quality of the retained reasoning chain.

Citation

bibtex
@article{min2026stop,
  title={Stop When Reasoning Converges: Semantic-Preserving Early Exit for Reasoning Models},
  author={Min, Dehai and Vaccarino, Giovanni and Chen, Huiyi and Wu, Yongliang and Yona, Gal and Cheng, Lu},
  journal={arXiv preprint arXiv:2605.17672},
  year={2026}
}

License

Released under Apache 2.0, following the license of the base model `Qwen/Qwen3-Embedding-0.6B`.