SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12208 · 2024

Language-Codec: Bridging Discrete Codec Representations and Speech Language Models

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2402.12208.json · badge: /api/ran/2402.12208.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
jishengpeng/languagecodec canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
gradient_norm Ran
ran, honoured the contract we drafted
jishengpeng/languagecodec/languagecodec_decoder/helpers.py
code served (permissive licence) · get_code("e4db9b5f77eb31d1")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters that have gradients
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the model
model = SimpleModel()

# Create dummy input and compute forward/backward to populate gradients
x = torch.randn(2, 4)
y = torch.randn(2, 2)
output = model(x)
loss = torch.nn.functional.mse_loss(output, y)
loss.backward()

# Define arguments
ARGS = {
    "model": model,
    "norm_type": 2.0
}
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 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
safe_log Ran
ran; our contract draft was wrong, not the code
jishengpeng/languagecodec/languagecodec_decoder/modules.py
code served (permissive licence) · get_code("5923f41e711c0b69")
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, 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 values that need clipping
x = torch.tensor([[0.5, 1e-8, 0.1, 2.0],
                   [0.3, 0.7, 1e-9, 0.05]], dtype=torch.float32)

# Define arguments dictionary
ARGS = {
    "x": x,
    "clip_val": 1e-07
}
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, 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
symexp Ran
ran; our contract draft was wrong, not the code
jishengpeng/languagecodec/languagecodec_decoder/modules.py
code served (permissive licence) · get_code("f1abe87534e9b4b5")
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, 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)

# The function symexp takes a single tensor argument and applies:
# torch.sign(x) * (torch.exp(x.abs()) - 1)
# It needs a tensor input

x = torch.randn(2, 4)

ARGS = {
    "x": x,
}
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, 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
symlog Ran
ran; our contract draft was wrong, not the code
jishengpeng/languagecodec/languagecodec_decoder/modules.py
code served (permissive licence) · get_code("3acb919a94ac1a19")
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, 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)

# The symlog function takes a single tensor argument and applies
# element-wise symmetric logarithm: sign(x) * log1p(|x|)
# We need to provide a small tensor to test this.

x = torch.randn(2, 4)

ARGS = {
    "x": x,
}
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, 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
instantiate_class Not yet run
unverified (harvested, no recorded run)
jishengpeng/languagecodec/languagecodec_decoder/pretrained_model.py
code served (permissive licence) · get_code("705b857d58937815")
How it ran

no invocation recorded.

plot_spectrogram_to_numpy Not yet run
unverified (harvested, no recorded run)
jishengpeng/languagecodec/languagecodec_decoder/helpers.py
code served (permissive licence) · get_code("e9b4eebcade00ef9")
How it ran

no invocation recorded.

save_figure_to_numpy Not yet run
unverified (harvested, no recorded run)
jishengpeng/languagecodec/languagecodec_decoder/helpers.py
code served (permissive licence) · get_code("4ad86e574a34c6ea")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 4 later) and 0 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
safe_log 5 other papers
1 dated earlier, 4 later
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
2405.11273 (2024-05)
Uni-MoE: Scaling Unified Multimodal LLMs with Mixture of Experts
2407.05361 (2024-07)
Emilia: An Extensive, Multilingual, and Diverse Speech Dataset for Large-Scale Speech Generation
and 2 more not named here
symexp 5 other papers
1 dated earlier, 4 later
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
2405.11273 (2024-05)
Uni-MoE: Scaling Unified Multimodal LLMs with Mixture of Experts
2407.05361 (2024-07)
Emilia: An Extensive, Multilingual, and Diverse Speech Dataset for Large-Scale Speech Generation
and 2 more not named here
symlog 5 other papers
1 dated earlier, 4 later
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
2405.11273 (2024-05)
Uni-MoE: Scaling Unified Multimodal LLMs with Mixture of Experts
2407.05361 (2024-07)
Emilia: An Extensive, Multilingual, and Diverse Speech Dataset for Large-Scale Speech Generation
and 2 more not named here
instantiate_class 3 other papers
1 dated earlier, 2 later
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
2408.16532 (2024-08)
WavTokenizer: an Efficient Acoustic Discrete Codec Tokenizer for Audio Language Modeling
2410.16928 (2024-10)
xLSTM-Mixer: Multivariate Time Series Forecasting by Mixing via Scalar Memories
gradient_norm 1 other paper
1 dated earlier
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
plot_spectrogram_to_numpy 1 other paper
1 dated earlier
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
save_figure_to_numpy 1 other paper
1 dated earlier
2306.00814 (2023-06)
Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis

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

Repositories linked to this paper

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

Abstract

In recent years, large language models have achieved significant success in generative tasks related to speech, audio, music, and other signal domains. A crucial element of these models is the discrete acoustic codecs, which serve as an intermediate representation replacing the mel-spectrogram. However, there exist several gaps between discrete codecs and downstream speech language models. Specifically, 1) Due to the reconstruction paradigm of the Codec model and the structure of residual vector quantization, the initial channel of the codebooks contains excessive information, making it challenging to directly generate acoustic tokens from weakly supervised signals such as text in downstream tasks. 2) numerous codebooks increases the burden on downstream speech language models. Consequently, leveraging the characteristics of speech language models, we propose Language-Codec. In the Language-Codec, we introduce a Masked Channel Residual Vector Quantization (MCRVQ) mechanism along with improved fourier transform structures and attention blocks, refined discriminator design to address the aforementioned gaps. We compare our method with competing audio compression algorithms and observe significant outperformance across extensive evaluations. Furthermore, we also validate the efficiency of the Language-Codec on downstream speech language models. The source code and pre-trained models can be accessed at https://github.com/jishengpeng/languagecodec .

For agents

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

get_harvested_code_for_paper("2402.12208")
get_code_for_paper("2402.12208")
have("2402.12208")

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

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

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

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

Connect an agent — have() is free.