SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.03143 · 2022

AudioLM: a Language Modeling Approach to Audio Generation

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 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; 0 honoured the contract we drafted, 2 violated it and 8 have no contract verdict; 2 failures of our instrument; 3 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/2209.03143.json · badge: /api/ran/2209.03143.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
fixie-ai/ultravox community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
RoganInglis/AudioLM community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
always Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from jam-ing/DALLE-pytorch
pointer only · get_code("fe5dd5258046898c")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

default Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from ThomasMrY/VCT
pointer only; the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("60fff7c3c400d7ff")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

exists Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from ThomasMrY/VCT
pointer only; the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_artifact Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/wandb_utils.py
code served (permissive licence) · get_code("4db619fa023a6d7f")
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 Mock. 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 wandb
from unittest.mock import Mock, MagicMock

# Create a mock wandb.Api and artifact
mock_api = Mock(spec=wandb.Api)
mock_artifact = Mock(spec=wandb.Artifact)
mock_artifact.name = "test-artifact"
mock_api.artifact.return_value = mock_artifact

# Patch wandb.Api to return our mock
wandb.Api = Mock(return_value=mock_api)

# Define the argument
ARGS = {
    "model_url": "wandb://user/project/artifact:version"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
wandb — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Mock — a Mock output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Mock 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
get_audio_token_id Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/ultravox_tokenizer.py
code served (permissive licence) · get_code("31f39389a04a28ff")
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 transformers
import torch

class MockTokenizer(transformers.PreTrainedTokenizerBase):
    """Minimal tokenizer that encodes the audio token as a single token."""
    
    def __init__(self):
        # Initialize minimal required attributes
        self.model_max_length = 512
        self.padding_side = "right"
        self.truncation_side = "right"
    
    def encode(self, text, add_special_tokens=False):
        """Return token IDs for the given text."""
        if text == '<|audio|>':
            # Return a single token ID for the audio token
            return [50257]
        return []
    
    def decode(self, token_ids, skip_special_tokens=False):
        """Minimal decode implementation."""
        return ""
    
    def convert_tokens_to_ids(self, tokens):
        """Minimal implementation."""
        return []
    
    def convert_ids_to_tokens(self, ids):
        """Minimal implementation."""
        return []

tokenizer = MockTokenizer()

ARGS = {
    "tokenizer": tokenizer
}
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 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_checkpoint_files Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/ultravox_model.py
code served (permissive licence) · get_code("ac337726126bc790")
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 transformers
from unittest.mock import Mock, patch, MagicMock
import tempfile
import os

# Create a minimal valid model_id string
# The function will try to fetch files from HuggingFace, so we need to mock that behavior

ARGS = {
    "model_id": "gpt2"
}

# We need to mock the transformers utilities to avoid actual network calls
# Since we can't modify the function itself, we'll set up the mocking in the environment

# Create mock return values for the transformers utility functions
mock_state_dict = {
    "transformer.h.0.attn.c_attn.weight": None,
    "transformer.h.0.attn.c_attn.bias": None,
    "lm_head.weight": None,
}

mock_sharded_metadata = {
    "all_checkpoint_keys": [
        "transformer.h.0.attn.c_attn.weight",
        "transformer.h.0.attn.c_attn.bias",
        "lm_head.weight",
    ]
}

# Patch the transformers functions before the function might be called
original_cached_file = transformers.utils.cached_file
original_load_state_dict = transformers.modeling_utils.load_state_dict
original_get_checkpoint_shard_files = transformers.modeling_utils.get_checkpoint_shard_files

def mock_cached_file(model_id, filename, _raise_exceptions_for_missing_entries=True):
    if filename == transformers.utils.SAFE_WEIGHTS_NAME:
        return "/fake/model.safetensors"
    elif filename == transformers.utils.SAFE_WEIGHTS_INDEX_NAME:
        return "/fake/model.safetensors.index.json"
    return None

def mock_load_state_dict(path):
    return mock_state_dict

def mock_get_checkpoint_shard_files(model_id, index_file):
    return (["/fake/model-00001-of-00002.safetensors", "/fake/model-00002-of-00002.safetensors"], mock_sharded_metadata)

transformers.utils.cached_file = mock_cached_file
transformers.modeling_utils.load_state_dict = mock_load_state_dict
transformers.modeling_utils.get_checkpoint_shard_files = mock_get_checkpoint_shard_files
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
transformers — 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
get_hf_model_id Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/hf_hub_utils.py
code served (permissive licence) · get_code("f6763b312827f28c")
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 torch
import torch.nn as nn

ARGS = {
    "model_id": "hf://meta-llama/Llama-2-7b"
}
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 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
get_pylogger Ran
ran; our contract draft was wrong, not the code
RoganInglis/AudioLM/src/utils/pylogger.py
pointer only (licence: MIT); the stored copy get_code serves, from humansensinglab/Hamba, is pointer only (licence: NOASSERTION) · get_code("aebb727eed75bd10")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from humansensinglab/Hamba, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_cache_empty Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/ultravox_model.py
code served (permissive licence) · get_code("5d515c356c24aefa")
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 bool, 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 transformers.cache_utils

torch.manual_seed(0)

# Test case 1: None past_key_values
ARGS = {
    "past_key_values": None
}

# Alternative test cases can be constructed as follows:

# Test case 2: Empty tuple of caches
# ARGS = {
#     "past_key_values": ()
# }

# Test case 3: Tuple with empty tensors
# ARGS = {
#     "past_key_values": (torch.tensor([]), torch.tensor([]))
# }

# Test case 4: Mock Cache object with get_seq_length method
class MockCache:
    def __init__(self, seq_length=0):
        self._seq_length = seq_length
    
    def get_seq_length(self):
        return self._seq_length

# ARGS = {
#     "past_key_values": MockCache(seq_length=0)
# }

# Using the simplest case (None)
ARGS = {
    "past_key_values": None
}
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 bool, 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
is_hf_model Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/hf_hub_utils.py
code served (permissive licence) · get_code("c8f279e78f17a2dc")
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 bool, 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

ARGS = {
    "model_id": "hf://meta-llama/Llama-2-7b"
}
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 bool, 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
is_wandb_url Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/model/wandb_utils.py
code served (permissive licence) · get_code("6071008854e0bbee")
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 bool, 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

ARGS = {
    'model_path': 'wandb://model_name'
}
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 bool, 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
rename_state_dict_for_lora Ran
ran on a synthesized input
fixie-ai/ultravox/ultravox/training/model_types.py
code served (permissive licence) · get_code("c1454628160a1ce9")
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 dict. 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 logging

torch.manual_seed(0)

# Create a minimal state dict with LoRA-compatible structure
state_dict = {
    'audio_tower.linear1.weight': torch.randn(4, 3),
    'audio_tower.linear1.bias': torch.randn(4),
    'audio_tower.attention.weight': torch.randn(5, 4),
    'audio_tower.other_module.weight': torch.randn(3, 2),
}

# Define the parameter prefix
param_prefix = 'audio_tower'

# Define a LoRA configuration
lora_config = {
    'r': 8,  # LoRA rank > 0 enables LoRA
    'target_modules': ['linear1', 'attention'],  # Modules to apply LoRA to
    'lora_alpha': 16,
    'lora_dropout': 0.1,
}

ARGS = {
    'state_dict': state_dict,
    'param_prefix': param_prefix,
    'lora_config': lora_config,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_lora Not yet run
unverified (harvested, no recorded run)
fixie-ai/ultravox/ultravox/model/ultravox_model.py
code served (permissive licence) · get_code("9f5e9393b5863f5c")
How it ran

no invocation recorded.

download_file_from_wandb Not yet run
unverified (harvested, no recorded run)
fixie-ai/ultravox/ultravox/model/wandb_utils.py
code served (permissive licence) · get_code("bc6eef90dd03c9ab")
How it ran

no invocation recorded.

download_hf_model Not yet run
unverified (harvested, no recorded run)
fixie-ai/ultravox/ultravox/model/hf_hub_utils.py
code served (permissive licence) · get_code("b913d51ad8556db7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 4 later) and 11 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
exists 486 other papers
112 dated earlier, 3 the same month, 368 later, 1 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
default 163 other papers
58 dated earlier, 2 the same month, 102 later, 1 undated · 27 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1810.00825 (2018-10)
Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks
1907.01470 (2019-07)
Augmenting Self-attention with Persistent Memory
and 160 more not named here
always 56 other papers
5 dated earlier, 51 later
2102.12092 (2021-02)
Zero-Shot Text-to-Image Generation
2107.03312 (2021-07)
SoundStream: An End-to-End Neural Audio Codec
2206.00100 (2022-06)
VALHALLA: Visual Hallucination for Machine Translation
and 53 more not named here
get_pylogger 14 other papers
14 later · 1 only as an assembly brick
2305.14930 (2023-05)
In-Context Impersonation Reveals Large Language Models' Strengths and Biases
2305.20091 (2023-05)
Humans in 4D: Reconstructing and Tracking Humans with Transformers
2310.01146 (2023-10)
NewsRecLib: A PyTorch-Lightning Library for Neural News Recommendation
and 11 more not named 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

We introduce AudioLM, a framework for high-quality audio generation with long-term consistency. AudioLM maps the input audio to a sequence of discrete tokens and casts audio generation as a language modeling task in this representation space. We show how existing audio tokenizers provide different trade-offs between reconstruction quality and long-term structure, and we propose a hybrid tokenization scheme to achieve both objectives. Namely, we leverage the discretized activations of a masked language model pre-trained on audio to capture long-term structure and the discrete codes produced by a neural audio codec to achieve high-quality synthesis. By training on large corpora of raw audio waveforms, AudioLM learns to generate natural and coherent continuations given short prompts. When trained on speech, and without any transcript or annotation, AudioLM generates syntactically and semantically plausible speech continuations while also maintaining speaker identity and prosody for unseen speakers. Furthermore, we demonstrate how our approach extends beyond speech by generating coherent piano music continuations, despite being trained without any symbolic representation of music.

For agents

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

get_harvested_code_for_paper("2209.03143")
get_code_for_paper("2209.03143")
have("2209.03143")

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

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

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

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

Connect an agent — have() is free.