SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.06546 · NeurIPS · 2023

High-Fidelity Audio Compression with Improved RVQGAN

Prem Seetharaman, Rithesh Kumar, Alejandro Descript, Kundan Descript

arXiv · PDF · Open in the Atlas

Code that ran

27 of 38 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (10 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 3 violated it and 11 have no contract verdict; 10 failures of our instrument; 11 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2306.06546.json · badge: /api/ran/2306.06546.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
zhangxinfd/speechtokenizer community
Papers with Code archive
18 ran · 9 no recorded run
DBraun/DAC-JAX community
Papers with Code archive
9 ran · 2 no recorded run
FunctionStatusWhere it lives
EuclideanCodebook Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("88ebb93ff05f77f2")
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, EuclideanCodebook: 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
import torch.nn as nn
from einops import rearrange

torch.manual_seed(0)

ARGS = {
    'dim': 4,
    'codebook_size': 8,
    'kmeans_init': False,
    'kmeans_iters': 10,
    'decay': 0.99,
    'epsilon': 1e-05,
    'threshold_ema_dead_code': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EuclideanCodebook — 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 EuclideanCodebook 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
NormConv1d Ran
ran on a synthesized input
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("fc59f82698306aa0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import torch.nn as nn

# Minimal ConvLayerNorm stub since it's referenced but not defined
class ConvLayerNorm(nn.Module):
    def __init__(self, normalized_shape, **kwargs):
        super().__init__()
        self.norm = nn.LayerNorm(normalized_shape, **kwargs)
    
    def forward(self, x):
        # x shape: (B, C, L)
        x = x.transpose(1, 2)  # (B, L, C)
        x = self.norm(x)
        x = x.transpose(1, 2)  # (B, C, L)
        return x

INIT_ARGS = {
    'in_channels': 3,
    'out_channels': 5,
    'kernel_size': 3,
    'stride': 1,
    'padding': 1,
    'causal': False,
    'norm': 'none',
    'norm_kwargs': {},
}

ARGS = {
    'x': torch.randn(2, 3, 8),  # (batch=2, in_channels=3, length=8)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
NormConvTranspose1d Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("f0f69a2c5ff07a17")
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, NormConvTranspose1d: 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
import torch.nn as nn
from torch.nn.utils import spectral_norm, weight_norm
import typing as tp

torch.manual_seed(0)

# Stand-in for ConvLayerNorm since it's referenced but not defined
class ConvLayerNorm(nn.Module):
    def __init__(self, num_features, **kwargs):
        super().__init__()
        self.num_features = num_features
    
    def forward(self, x):
        return x

# Build arguments for NormConvTranspose1d
ARGS = {
    'in_channels': 3,
    'out_channels': 4,
    'kernel_size': 3,
    'stride': 1,
    'padding': 0,
    'causal': False,
    'norm': 'none',
    'norm_kwargs': {},
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NormConvTranspose1d — 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 NormConvTranspose1d 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
QuantizedResult Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("1317f68bf0b61f08")
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, QuantizedResult: 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
import typing as tp
from dataclasses import dataclass, field

torch.manual_seed(0)

@dataclass
class QuantizedResult:
    quantized: torch.Tensor
    codes: torch.Tensor
    bandwidth: torch.Tensor
    penalty: tp.Optional[torch.Tensor] = None
    metrics: dict = field(default_factory=dict)

ARGS = {
    "quantized": torch.randn(2, 4),
    "codes": torch.randint(0, 10, (2, 3)),
    "bandwidth": torch.tensor([0.5, 0.7]),
    "penalty": torch.tensor([0.1, 0.2]),
    "metrics": {"loss": 0.15, "entropy": 2.3}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type QuantizedResult — 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 QuantizedResult 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
QuantizedResult Ran
ran on a synthesized input · constructed an object; no result was computed
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("00d0f325d81ba7bb")
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, QuantizedResult: 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 jax.numpy as jnp
import numpy as np

ARGS = {
    "z": jnp.array(np.random.randn(2, 4).astype(np.float32)),
    "codes": jnp.array(np.array([[0, 1, 2, 3], [1, 2, 3, 0]], dtype=np.int32)),
    "bandwidth": jnp.array(np.array([0.5, 0.6], dtype=np.float32)),
    "penalty": jnp.array(np.array([0.1, 0.2], dtype=np.float32)),
    "metrics": {"loss": 0.5, "accuracy": 0.95},
    "latents": jnp.array(np.random.randn(2, 4).astype(np.float32)),
    "commitment_loss": jnp.array(np.array([0.05, 0.06], dtype=np.float32)),
    "codebook_loss": jnp.array(np.array([0.03, 0.04], dtype=np.float32)),
    "recons": jnp.array(np.random.randn(2, 4).astype(np.float32)),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type QuantizedResult — 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 QuantizedResult 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
SConv1d Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("6aee5fa73a0d5daf")
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, SConv1d: 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_channels': 4,
    'out_channels': 8,
    'kernel_size': 3,
    'stride': 1,
    'dilation': 1,
    'groups': 1,
    'bias': True,
    'causal': False,
    'norm': 'none',
    'norm_kwargs': {},
    'pad_mode': 'reflect',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SConv1d — 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 SConv1d 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
SConvTranspose1d Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("5429aefc43f5e1b4")
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, SConvTranspose1d: 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
import torch.nn as nn
import math
from torch.nn.utils import spectral_norm, weight_norm
import typing as tp

torch.manual_seed(0)

class ConvLayerNorm(nn.Module):
    """Stand-in for ConvLayerNorm used in get_norm_module"""
    def __init__(self, num_channels, **kwargs):
        super().__init__()
        self.num_channels = num_channels
    
    def forward(self, x):
        return x

CONV_NORMALIZATIONS = frozenset(['none', 'weight_norm', 'spectral_norm', 'time_layer_norm', 'layer_norm', 'time_group_norm'])

def apply_parametrization_norm(module: nn.Module, norm: str='none') -> nn.Module:
    assert norm in CONV_NORMALIZATIONS
    if norm == 'weight_norm':
        return weight_norm(module)
    elif norm == 'spectral_norm':
        return spectral_norm(module)
    else:
        return module

def get_norm_module(module: nn.Module, causal: bool=False, norm: str='none', **norm_kwargs) -> nn.Module:
    assert norm in CONV_NORMALIZATIONS
    if norm == 'layer_norm':
        assert isinstance(module, nn.modules.conv._ConvNd)
        return ConvLayerNorm(module.out_channels, **norm_kwargs)
    elif norm == 'time_group_norm':
        if causal:
            raise ValueError("GroupNorm doesn't support causal evaluation.")
        assert isinstance(module, nn.modules.conv._ConvNd)
        return nn.GroupNorm(1, module.out_channels, **norm_kwargs)
    else:
        return nn.Identity()

def unpad1d(x: torch.Tensor, paddings: tp.Tuple[int, int]):
    padding_left, padding_right = paddings
    assert padding_left >= 0 and padding_right >= 0, (padding_left, padding_right)
    assert padding_left + padding_right <= x.shape[-1]
    end = x.shape[-1] - padding_right
    return x[..., padding_left:end]

class NormConvTranspose1d(nn.Module):
    def __init__(self, *args, causal: bool=False, norm: str='none', norm_kwargs: tp.Dict[str, tp.Any]={}, **kwargs):
        super().__init__()
        self.convtr = apply_parametrization_norm(nn.ConvTranspose1d(*args, **kwargs), norm)
        self.norm = get_norm_module(self.convtr, causal, norm, **norm_kwargs)
        self.norm_type = norm

    def forward(self, x):
        x = self.convtr(x)
        x = self.norm(x)
        return x

class SConvTranspose1d(nn.Module):
    def __init__(self, in_channels: int, out_channels: int, kernel_size: int, stride: int=1, causal: bool=False, norm: str='none', trim_right_ratio: float=1.0, norm_kwargs: tp.Dict[str, tp.Any]={}):
        super().__init__()
        self.convtr = NormConvTranspose1d(in_channels, out_channels, kernel_size, stride, causal=causal, norm=norm, norm_kwargs=norm_kwargs)
        self.causal = causal
        self.trim_right_ratio = trim_right_ratio
        assert self.causal or self.trim_right_ratio == 1.0, '`trim_right_ratio` != 1.0 only makes sense for causal convolutions'
        assert self.trim_right_ratio >= 0.0 and self.trim_right_ratio <= 1.0

    def forward(self, x):
        kernel_size = self.convtr.convtr.kernel_size[0]
        stride = self.convtr.convtr.stride[0]
        padding_total = kernel_size - stride
        y = self.convtr(x)
        if self.causal:
            padding_right = math.ceil(padding_total * self.trim_right_ratio)
            padding_left = padding_total - padding_right
            y = unpad1d(y, (padding_left, padding_right))
        else:
            padding_right = padding_total // 2
            padding_left = padding_total - padding_right
            y = unpad1d(y, (padding_left, padding_right))
        return y

ARGS = {
    'in_channels': 4,
    'out_channels': 3,
    'kernel_size': 5,
    'stride': 2,
    'causal': False,
    'norm': 'none',
    'trim_right_ratio': 1.0,
    'norm_kwargs': {},
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SConvTranspose1d — 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 SConvTranspose1d 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
SLSTM Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("46e56c21d7e192a3")
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, SLSTM: 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "dimension": 4,
    "num_layers": 2,
    "skip": True,
    "bidirectional": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SLSTM — 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 SLSTM 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
Snake1d Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("27d28bc9b91d474b")
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, Snake1d: 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "channels": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Snake1d — 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 Snake1d 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
VectorQuantization Ran
ran on a synthesized input · constructed an object; no result was computed
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("1a5bd5c497f7d3f9")
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, VectorQuantization: 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
import torch.nn as nn
import typing as tp
from einops import rearrange

torch.manual_seed(0)

# Helper functions that are referenced in the class
def uniform_init(codebook_size: int, dim: int) -> torch.Tensor:
    """Initialize codebook with uniform random values."""
    return torch.randn(codebook_size, dim)

def sample_vectors(samples: torch.Tensor, num_samples: int) -> torch.Tensor:
    """Sample random vectors from samples."""
    num_samples = min(num_samples, samples.shape[0])
    indices = torch.randperm(samples.shape[0])[:num_samples]
    return samples[indices]

def kmeans(samples: torch.Tensor, num_clusters: int, num_iters: int = 10):
    """Simple k-means initialization."""
    dim = samples.shape[-1]
    means = sample_vectors(samples, num_clusters)
    for _ in range(num_iters):
        diffs = rearrange(samples, 'n d -> n () d') - rearrange(means, 'c d -> () c d')
        dists = (diffs ** 2).sum(dim=-1)
        assignments = dists.argmin(dim=-1)
        
        for i in range(num_clusters):
            mask = assignments == i
            if mask.any():
                means[i] = samples[mask].mean(dim=0)
    
    cluster_size = torch.bincount(assignments, minlength=num_clusters).float()
    return means, cluster_size

def laplace_smoothing(x: torch.Tensor, codebook_size: int, epsilon: float) -> torch.Tensor:
    """Apply Laplace smoothing."""
    return (x + epsilon) / (x.sum() + epsilon * codebook_size)

def ema_inplace(moving_avg: torch.Tensor, new: torch.Tensor, decay: float):
    """In-place exponential moving average."""
    moving_avg.data.mul_(decay).add_(new, alpha=1 - decay)

# Create arguments for EuclideanCodebook
ARGS = {
    'dim': 4,
    'codebook_size': 8,
    'kmeans_init': False,
    'kmeans_iters': 10,
    'decay': 0.99,
    'epsilon': 1e-05,
    'threshold_ema_dead_code': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VectorQuantization — 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 VectorQuantization 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
WNConv1d Ran
ran on a synthesized input · constructed an object; no result was computed
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("82529cf058f32742")
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, WNConv1d: 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 jax
import jax.numpy as jnp
import flax.linen as nn

# Create a minimal input tensor
# Shape: (batch_size=2, length=16, input_channels=3)
x = jnp.ones((2, 16, 3), dtype=jnp.float32)

ARGS = {
    'features': 8,
    'kernel_size': (3,),
    'strides': (1,),
    'padding': 'SAME',
    'input_dilation': None,
    'kernel_dilation': (1,),
    'feature_group_count': 1,
    'use_bias': True,
    'mask': None,
    'dtype': jnp.float32,
    'param_dtype': jnp.float32,
    'precision': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WNConv1d — 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 WNConv1d 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
apply_parametrization_norm Ran
ran; our contract draft was wrong, not the code
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("7e451c435923824b")
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 Conv1d. 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
import torch.nn as nn

torch.manual_seed(0)

# Create a small nn.Module that can be parametrized
# The function applies weight_norm or spectral_norm to modules,
# which typically works on Conv or Linear layers
module = nn.Conv1d(in_channels=3, out_channels=4, kernel_size=2)

# Test with different normalization types
norm_type = 'weight_norm'

ARGS = {
    'module': module,
    'norm': norm_type
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv1d — a Conv1d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv1d 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
conv_to_delay Ran
ran, honoured the contract we drafted
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("72e3782101525ae7")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math

def conv_to_delay(s, d, k, L):
    L = (L - 1) * s + d * (k - 1) + 1
    L = math.ceil(L)
    return L

ARGS = {
    "s": 2,
    "d": 3,
    "k": 5,
    "L": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
conv_to_output_length Ran
ran, honoured the contract we drafted
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("0a1da93fdea7909d")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math

def conv_to_output_length(s, d, k, L):
    L = (L - d * (k - 1) - 1) / s + 1
    L = math.floor(L)
    return L

# Construct valid arguments for conv_to_output_length
# s: stride (int)
# d: dilation (int)
# k: kernel size (int)
# L: input length (int)

ARGS = {
    "s": 1,      # stride
    "d": 1,      # dilation
    "k": 3,      # kernel size
    "L": 28      # input length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
default Ran
ran; our contract draft was wrong, not the code
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("1e8f03292b45230b")
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 str. 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 typing as tp

def default(val: tp.Any, d: tp.Any) -> tp.Any:
    return val if val is not None else d

ARGS = {
    "val": None,
    "d": "default_value"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
default_kernel_dilation Ran
ran, honoured the contract we drafted
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("2e20c64249054743")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
import numpy as np

def default_kernel_dilation(kernel_dilation):
    if kernel_dilation is None:
        return 1
    if isinstance(kernel_dilation, int):
        return kernel_dilation
    return kernel_dilation[0]

# Test case 1: None input
ARGS = {
    "kernel_dilation": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
default_kernel_size Ran
ran, violated the contract we drafted
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("c9c9105f86fbbcc1")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
import numpy as np

torch.manual_seed(0)

# The function default_kernel_size takes a kernel_size parameter
# It checks if it's None, if it's an int, or accesses kernel_size[0]
# So we need to test all three cases

# Test case 1: kernel_size is None
kernel_size_none = None

# Test case 2: kernel_size is an int
kernel_size_int = 5

# Test case 3: kernel_size is a sequence (tuple or list)
kernel_size_sequence = (3, 3)

# We'll use the sequence case as the main test
ARGS = {
    "kernel_size": kernel_size_sequence
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
default_stride Ran
ran, violated the contract we drafted
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("9e520e492c31a453")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - It takes a single parameter: strides
# - It checks if strides is None, returns 1
# - It checks if strides is an int, returns that int
# - Otherwise it treats strides as a sequence and returns strides[0]

# Create test cases for each branch
ARGS = {
    "strides": [2, 3, 4]  # A list where strides[0] is accessible
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
get_extra_padding_for_conv1d Ran
ran; our contract draft was wrong, not the code
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("5155996ee4a7f5c4")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
import math

torch.manual_seed(0)

# Create a small tensor with shape (batch, channels, length)
# The function accesses x.shape[-1], so we need a multi-dimensional tensor
x = torch.randn(2, 4, 16)  # batch=2, channels=4, length=16

kernel_size = 3
stride = 2
padding_total = 1

ARGS = {
    "x": x,
    "kernel_size": kernel_size,
    "stride": stride,
    "padding_total": padding_total,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
get_norm_module Ran
ran; our contract draft was wrong, not the code
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("6c7c136baea4aa36")
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 Identity. 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
import torch.nn as nn

torch.manual_seed(0)

# Define ConvLayerNorm since it's referenced but not provided
class ConvLayerNorm(nn.Module):
    def __init__(self, num_features, **kwargs):
        super().__init__()
        self.num_features = num_features
        self.norm = nn.LayerNorm(num_features, **kwargs)
    
    def forward(self, x):
        return self.norm(x)

# Create a small Conv2d module for testing
conv_module = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, padding=1)

ARGS = {
    'module': conv_module,
    'causal': False,
    'norm': 'none',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Identity — a Identity output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Identity 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
kmeans Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("c26e79c6acd99d8d")
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 tuple. 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 einops import rearrange, repeat

torch.manual_seed(0)

# Create small sample tensor: 2 samples, 4 dimensions
samples = torch.randn(2, 4)

# Define arguments for kmeans function
ARGS = {
    'samples': samples,
    'num_clusters': 2,
    'num_iters': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
laplace_smoothing Ran
ran, violated the contract we drafted
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("c360b5ccff704a88")
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 Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - x: needs to support .sum() method, so a tensor or array
# - n_categories: int
# - epsilon: float

# Create a small tensor for x
x = torch.tensor([1.0, 2.0, 3.0, 4.0])

# Define parameters
ARGS = {
    "x": x,
    "n_categories": 4,
    "epsilon": 1e-05
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
mse_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("dff46a2b65e582bd")
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 ArrayImpl, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 jax.numpy as jnp

# Create small test tensors
predictions = jnp.array([[1.0, 2.0, 3.0, 4.0],
                         [5.0, 6.0, 7.0, 8.0]])

targets = jnp.array([[1.1, 2.1, 3.1, 4.1],
                     [5.1, 6.1, 7.1, 8.1]])

reduction = 'mean'

ARGS = {
    'predictions': predictions,
    'targets': targets,
    'reduction': reduction
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
normalize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("e29415637b6730ed")
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 ArrayImpl, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 jax.numpy as jnp
import numpy as np

# Create test arrays with distinct dimensions
x = jnp.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=jnp.float32)

ARGS = {
    "x": x,
    "ord": 2,
    "axis": 1,
    "eps": 1e-12
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
sample_vectors Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("09f10cd96592b37d")
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 Tensor, ndim 2, dtype family float, shape (3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Create a small tensor with shape (batch_size=2, features=4)
samples = torch.randn(2, 4)

# Create the ARGS dictionary with all parameters
ARGS = {
    "samples": samples,
    "num": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (3, 4) — shape (3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
snake Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("f247e4748f379a76")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# The function takes two parameters: x (a tensor) and alpha (a scalar or tensor)
# x is reshaped, modified with sin operations, and reshaped back
# alpha is used in arithmetic operations (reciprocal, multiplication)

# Create a small tensor with shape (batch=2, channels=4, height=3, width=5)
x = torch.randn(2, 4, 3, 5)

# Create a scalar alpha parameter
alpha = torch.tensor(1.0)

ARGS = {
    "x": x,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
unpad1d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("3f2ccb02099faf04")
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 Tensor, ndim 2, dtype family float, shape (2, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
import typing as tp

torch.manual_seed(0)

# Create a small 1d tensor with some padding
# Shape: (batch=2, sequence=10) to allow for padding removal
x = torch.randn(2, 10)

# Define padding as (left, right)
# Let's remove 2 from left and 3 from right, leaving 5 elements
paddings = (2, 3)

ARGS = {
    "x": x,
    "paddings": paddings,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 5) — shape (2, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
ResidualVectorQuantization Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("a4459f091cbc21cc")
How it ran

no invocation recorded.

ResidualVectorQuantize Not yet run
unverified (harvested, no recorded run)
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("14c03dd20a30e62c")
How it ran

no invocation recorded.

ResidualVectorQuantizer Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("539769016ca08bfd")
How it ran

no invocation recorded.

SEANetDecoder Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("e27b8e6c0bf19894")
How it ran

no invocation recorded.

SEANetEncoder Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("27c322d4a4fa97a2")
How it ran

no invocation recorded.

SEANetResnetBlock Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("eb210115baa57d3b")
How it ran

no invocation recorded.

SpeechTokenizer Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("707e1121f91ae8d3")
How it ran

no invocation recorded.

VectorQuantize Not yet run
unverified (harvested, no recorded run)
DBraun/DAC-JAX/src/dac_jax/nn/quantize.py
code served (permissive licence) · get_code("eb961f73627c1425")
How it ran

no invocation recorded.

ema_inplace Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("641438f624dd1c49")
How it ran

no invocation recorded.

pad1d Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("7b7293843c2034b2")
How it ran

no invocation recorded.

uniform_init Not yet run
unverified (harvested, no recorded run)
zhangxinfd/speechtokenizer/speechtokenizer/model.py
code served (permissive licence) · get_code("d30ebe7be75adcf6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 38 samples lifted from this paper's linked repositories, 38 carry a function identity and 0 do not. Of the 38 distinct functions with an identity, 26 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 26 later) and 12 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.

FunctionAlso present inEarliest-datedOthers named
snake
brick of this paper's assembly: helper
10 other papers
10 later · 1 only as an assembly brick
2307.04686 (2023-07)
VampNet: Music Generation via Masked Acoustic Token Modeling
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2406.10056 (2024-06)
UniAudio 1.5: Large Language Model-driven Audio Codec is A Few-shot Audio Task Learner
and 7 more not named here
get_extra_padding_for_conv1d
brick of this paper's assembly: helper
9 other papers
9 later · 1 only as an assembly brick
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2310.00014 (2023-10)
Fewer-token Neural Speech Codec with Time-invariant Codes
2405.04752 (2024-05)
HILCodec: High-Fidelity and Lightweight Neural Audio Codec
and 6 more not named here
apply_parametrization_norm
brick of this paper's assembly: helper
5 other papers
5 later · 1 only as an assembly brick
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2310.00014 (2023-10)
Fewer-token Neural Speech Codec with Time-invariant Codes
2409.12121 (2024-09)
WMCodec: End-to-End Neural Speech Codec with Deep Watermarking for Authenticity Verification
and 2 more not named here
get_norm_module
brick of this paper's assembly: helper
5 other papers
5 later · 1 only as an assembly brick
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2405.04752 (2024-05)
HILCodec: High-Fidelity and Lightweight Neural Audio Codec
2409.12121 (2024-09)
WMCodec: End-to-End Neural Speech Codec with Deep Watermarking for Authenticity Verification
and 2 more not named here
laplace_smoothing
brick of this paper's assembly: helper
4 other papers
4 later · 1 only as an assembly brick
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2401.01885 (2024-01)
From Audio to Photoreal Embodiment: Synthesizing Humans in Conversations
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
and 1 more not named here
default
brick of this paper's assembly: helper
3 other papers
3 later · 1 only as an assembly brick
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
2604.22225 (2026-04)
TTS-PRISM: A Perceptual Reasoning and Interpretable Speech Model for Fine-Grained Diagnosis
pad1d
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
2502.17462 (2025-02)
The Case for Cleaner Biosignals: High-fidelity Neural Compressor Enables Transfer from Cleaner iEEG to Noisier EEG
sample_vectors
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
unpad1d
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
2502.17462 (2025-02)
The Case for Cleaner Biosignals: High-fidelity Neural Compressor Enables Transfer from Cleaner iEEG to Noisier EEG
EuclideanCodebook
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
NormConv1d
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
NormConvTranspose1d
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
QuantizedResult
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
ResidualVectorQuantization
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
ResidualVectorQuantizer
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
SConv1d
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
SConvTranspose1d
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
SEANetDecoder
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
SEANetEncoder
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization
SEANetResnetBlock
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization

Shown: the 20 functions present in the most other papers. 6 more shared functions are not listed here.

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-23.

Repositories linked to this paper

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

Abstract

Language models have been successfully used to model natural signals, such as images, speech, and music. A key component of these models is a high quality neural compression model that can compress high-dimensional natural signals into lower dimensional discrete tokens. To that end, we introduce a high-fidelity universal neural audio compression algorithm that achieves 90x compression of 44.1 KHz audio into tokens at just 8kbps bandwidth. We achieve this by combining advances in high-fidelity audio generation with better vector quantization techniques from the image domain, along with improved adversarial and reconstruction losses. We compress all domains (speech, environment, music, etc.) with a single universal model, making it widely applicable to generative modeling of all audio. We compare with competing audio compression algorithms, and find our method outperforms them significantly. We provide thorough ablations for every design choice, as well as open-source code and trained model weights. We hope our work can lay the foundation for the next generation of high-fidelity audio modeling.

For agents

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

get_harvested_code_for_paper("2306.06546")
get_code_for_paper("2306.06546")
have("2306.06546")

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

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

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

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

Connect an agent — have() is free.