SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.06846 · ICLR · 2025

Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexity

Mutian He, Philip Garner

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2410.06846.json · badge: /api/ran/2410.06846.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
idiap/linearize-distill-pretrained-transformers canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
get_audiofile Ran
ran; our contract draft was wrong, not the code
idiap/linearize-distill-pretrained-transformers/speech/dataloader.py
code served (permissive licence) · get_code("9fe691c72c114e96")
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 BufferedReader. 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 os
import tempfile
import io

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
sub_dir_name = "audio_data"
sub_dir_path = os.path.join(temp_dir, sub_dir_name)
os.makedirs(sub_dir_path, exist_ok=True)

# Create a dummy audio file
dummy_audio_filename = "speaker_001_sample.wav"
dummy_audio_path = os.path.join(sub_dir_path, dummy_audio_filename)
with open(dummy_audio_path, 'wb') as f:
    f.write(b"dummy audio data")

# Define the arguments for get_audiofile function
ARGS = {
    "datadir": temp_dir,
    "sub_dir": sub_dir_name,
    "name": "speaker_001_sample"
}
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 BufferedReader — a BufferedReader 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_audiofile_spec Ran
ran; our contract draft was wrong, not the code
idiap/linearize-distill-pretrained-transformers/speech/dataloader.py
code served (permissive licence) · get_code("360049fe861151ac")
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 BufferedReader. 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 os
import tempfile
import zipfile
import io

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create subdirectory
sub_dir_path = os.path.join(temp_dir, "audio_data")
os.makedirs(sub_dir_path, exist_ok=True)

# Create a test audio file
test_filename = "sample_001_0123456_audio.wav"
test_file_path = os.path.join(sub_dir_path, test_filename)
with open(test_file_path, 'wb') as f:
    f.write(b"fake audio data")

# Arguments for the function
ARGS = {
    "datadir": temp_dir,
    "sub_dir": "audio_data",
    "name": test_filename
}
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 BufferedReader — a BufferedReader 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_input_proto Ran
ran; our contract draft was wrong, not the code
idiap/linearize-distill-pretrained-transformers/speech/dataloader_hf.py
code served (permissive licence) · get_code("bdc61b27de6480a5")
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

torch.manual_seed(0)

class Config:
    def __init__(self, use_attention_mask=False, use_decoder=False, use_classifier=False):
        self.use_attention_mask = use_attention_mask
        self.use_decoder = use_decoder
        self.use_classifier = use_classifier

config = Config(
    use_attention_mask=True,
    use_decoder=True,
    use_classifier=True
)

ARGS = {
    'config': 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
preprocess_sqa5 Ran
ran; our contract draft was wrong, not the code
idiap/linearize-distill-pretrained-transformers/speech/dataloader_hf.py
code served (permissive licence) · get_code("207eb0e72f061701")
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 numpy as np

ARGS = {
    'x': {
        'document_audio': {
            'sampling_rate': 16000,
            'array': np.random.randn(16000 * 5).astype(np.float32)  # 5 seconds of audio
        },
        'question_audio': {
            'array': np.random.randn(16000 * 2).astype(np.float32)  # 2 seconds of audio
        },
        'normalized_document_text': 'This is a document about cats and dogs',
        'normalized_question_text': 'What is mentioned',
        'answer_spans': {
            'start_second': np.array([1.5]),
            'end_second': np.array([3.2])
        },
        'question_id': 'q_001'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
preprocess_voxceleb1 Ran
ran; our contract draft was wrong, not the code
idiap/linearize-distill-pretrained-transformers/speech/dataloader_hf.py
code served (permissive licence) · get_code("b6ea1d54052815d5")
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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - Takes parameter 'x' which is a dict
# - Accesses x['file'] - a string path
# - Accesses x['audio']['array'] - an audio array
# - Accesses x['clf_label'] - a classifier label
# - Uses os.path.sep to split the file path
# - Returns a dict with processed values

ARGS = {
    'x': {
        'file': 'id1/id1001/00001.wav',  # Simulates a file path that when split by os.path.sep gives 3+ parts
        'audio': {
            'array': np.array([0.1, 0.2, 0.3, 0.15], dtype=np.float32)  # Small audio array
        },
        'clf_label': 'speaker_001'
    }
}
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 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
get_audiofile 1 other paper
1 dated earlier
2305.09652 (2023-05)
The Interpreter Understands Your Meaning: End-to-end Spoken Language Understanding Aided by Speech Translation

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

Architectures such as Linformer and Mamba have recently emerged as competitive linear time replacements for transformers. However, corresponding large pretrained models are often unavailable, especially in non-text domains. To remedy this, we present a Cross-Architecture Layerwise Distillation (CALD) approach that jointly converts a transformer model to a linear time substitute and fine-tunes it to a target task. We also compare several means to guide the fine-tuning to optimally retain the desired inference capability from the original model. The methods differ in their use of the target model and the trajectory of the parameters. In a series of empirical studies on language processing, language modeling, and speech processing, we show that CALD can effectively recover the result of the original model, and that the guiding strategy contributes to the result. Some reasons for the variation are suggested.

For agents

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

get_harvested_code_for_paper("2410.06846")
get_code_for_paper("2410.06846")
have("2410.06846")

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

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

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

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

Connect an agent — have() is free.