SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.10878 · 2026

X2-Turn: Frame-Synchronous Dual-Head Modeling for Joint Streaming ASR and Turn State Prediction

Hao Wang, Qian Wang, Rime Wen, Shawn Qin, Roy Gan, Kaiqi Fu, Altman Lin

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2608.10878.json · badge: /api/ran/2608.10878.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
X-Square-Robot/X2-Turn community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
VoxtralMTP Ran
ran on a synthesized input · constructed an object; no result was computed
X-Square-Robot/X2-Turn/voxtral-realtime/src/voxtral_realtime/transformers/modeling.py
code served (permissive licence) · get_code("9a688e712d662cda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, VoxtralMTP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn
from dataclasses import dataclass
from typing import Any

torch.manual_seed(0)

# Build a minimal stand-in base_model that satisfies VoxtralMTP's usage
class TextConfig:
    vocab_size = 50000
    hidden_size = 256

class BaseModelConfig:
    def __init__(self):
        self.text_config = TextConfig()

class MinimalLMHead(nn.Module):
    def __init__(self, hidden_size, vocab_size):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(vocab_size, hidden_size))
    
    def forward(self, hidden_states):
        return torch.nn.functional.linear(hidden_states, self.weight)

class MinimalTransformerOutput:
    def __init__(self, last_hidden_state):
        self.last_hidden_state = last_hidden_state

class MinimalTransformer(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, *args, **kwargs):
        # Extract input_ids or input_embeds to determine batch/seq length
        input_ids = kwargs.get('input_ids', None)
        if input_ids is not None:
            batch_size, seq_len = input_ids.shape
        else:
            # Fallback: assume reasonable shape
            batch_size, seq_len = 2, 10
        last_hidden_state = torch.randn(batch_size, seq_len, self.hidden_size)
        return MinimalTransformerOutput(last_hidden_state)

class MinimalBaseModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = BaseModelConfig()
        hidden_size = self.config.text_config.hidden_size
        vocab_size = self.config.text_config.vocab_size
        self.model = MinimalTransformer(hidden_size)
        self.lm_head = MinimalLMHead(hidden_size, vocab_size)
    
    def loss_function(self, logits, labels, vocab_size):
        # Simple cross-entropy loss computation
        batch_size, seq_len, _ = logits.shape
        logits_flat = logits.view(-1, vocab_size)
        labels_flat = labels.view(-1)
        # Only compute loss for non-ignored labels
        mask = labels_flat != -100
        if mask.any():
            loss = torch.nn.functional.cross_entropy(
                logits_flat[mask],
                labels_flat[mask],
                reduction='mean'
            )
        else:
            loss = torch.tensor(0.0)
        return loss
    
    @property
    def dtype(self):
        return torch.float32

# Construct arguments for VoxtralMTP.__init__
base_model = MinimalBaseModel()

ARGS = {
    'base_model': base_model,
    'vad_loss_weight': 0.1,
    'train_vad_head_only': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VoxtralMTP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VoxtralMTP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
VoxtralMTPOutput Ran
ran on a synthesized input · constructed an object; no result was computed
X-Square-Robot/X2-Turn/voxtral-realtime/src/voxtral_realtime/transformers/modeling.py
code served (permissive licence) · get_code("069f2f9bb24b3c74")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, VoxtralMTPOutput: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from dataclasses import dataclass
from transformers.utils import ModelOutput

torch.manual_seed(0)

@dataclass
class VoxtralMTPOutput(ModelOutput):
    """Losses and logits produced by the shared-backbone dual-head wrapper."""
    loss: torch.Tensor | None = None
    asr_loss: torch.Tensor | None = None
    logits: torch.Tensor | None = None
    vad_logits: torch.Tensor | None = None
    vad_loss: torch.Tensor | None = None

ARGS = {
    "loss": torch.tensor([[0.5, 0.3], [0.2, 0.4]]),
    "asr_loss": torch.tensor([[0.1, 0.2], [0.3, 0.4]]),
    "logits": torch.tensor([[0.9, 0.1, 0.5, 0.6], [0.2, 0.8, 0.3, 0.7]]),
    "vad_logits": torch.tensor([[0.7, 0.3], [0.4, 0.6]]),
    "vad_loss": torch.tensor([[0.15, 0.25], [0.35, 0.45]]),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VoxtralMTPOutput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VoxtralMTPOutput output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Accurate and responsive turn-taking is essential for spoken dialogue systems, which must distinguish in real time between user interruptions, backchannels that should be ignored, and the completion of an utterance. Prior modular approaches typically optimize turn state prediction at the utterance or fixed-chunk level, creating a mismatch with the continuous turn state estimate, and often depend on an auxiliary ASR model, which limits responsiveness and increases overall system complexity. Therefore, we present X2-Turn, a frame-synchronous turn state prediction method via delayed-stream modeling. Specifically, building on the pretrained Voxtral Realtime model, we introduce a frame-synchronous turn state head that operates in parallel with the ASR head on shared streaming representations, jointly predicting ASR tokens and fine-grained turn states at the frame level. We evaluate our method on the bilingual Chinese-English Easy-Turn test sets, and the results demonstrate its effectiveness in achieving accurate turn-taking detection while maintaining low latency. Code and models are available at https://github.com/X-Square-Robot/X2-Turn.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2608.10878")
get_code_for_paper("2608.10878")
have("2608.10878")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2608.10878.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2608.10878.svg)](https://syntology.ai/paper/2608.10878)

Connect an agent — have() is free.