SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.17173 · ICML · 2024

Non-Vacuous Generalization Bounds for Large Language Models

Micah Goldblum, Marc Finzi, Andrew Wilson, Tim Rudner, Sanae Lotfi, Andrew Gordon, Yilun Kuang

arXiv · PDF · Open in the Atlas

Code that ran

13 of 38 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 7 have no contract verdict; 3 failures of our instrument; 25 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/2312.17173.json · badge: /api/ran/2312.17173.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
sanaelotfi/sublora-bounds-for-llms marked official in Papers with Code
Papers with Code archive
13 ran · 25 no recorded run
FunctionStatusWhere it lives
FixedNumpySeed Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("42854ae0f684da62")
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, FixedNumpySeed: 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 numpy as np
import random

class FixedNumpySeed(object):

    def __init__(self, seed):
        self.seed = seed

    def __enter__(self):
        self.np_rng_state = np.random.get_state()
        np.random.seed(self.seed)
        self.rand_rng_state = random.getstate()
        random.seed(self.seed)

    def __exit__(self, *args):
        np.random.set_state(self.np_rng_state)
        random.setstate(self.rand_rng_state)


ARGS = {
    "seed": 42
}
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 FixedNumpySeed — 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 FixedNumpySeed 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
FixedPytorchSeed Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("8e279895b6069a86")
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, FixedPytorchSeed: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

ARGS = {
    "seed": 42
}
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 FixedPytorchSeed — 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 FixedPytorchSeed 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
IDModule Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("7358581cd466c4e1")
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, IDModule: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 import Tensor

torch.manual_seed(0)

# Create a minimal network that the IDModule will wrap
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
        self.config = type('Config', (), {'block_size': 10})()
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x, None

net = SimpleNet()

# Create a minimal projector function that returns a LinearOperator-like object
class SimpleProjector:
    def __init__(self, D, d, trainable_initparams, names):
        self.D = D
        self.d = d
        self.matrix = torch.randn(D, d)
    
    def __matmul__(self, other):
        # other is subspace_params (shape: [d])
        # return flattened params (shape: [D])
        return self.matrix @ other

def projector_fn(D, d, trainable_initparams, names):
    return SimpleProjector(D, d, trainable_initparams, names)

# Define ARGS dictionary with all parameters for IDModule.__init__
ARGS = {
    'net': net,
    'projector': projector_fn,
    'dimension': 100
}
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 IDModule — 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 IDModule 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
RandomMultiply Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("b066b14f9c37e272")
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, RandomMultiply: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Parameters for RandomMultiply.forward and backward
v = torch.randn(3, dtype=torch.float32)  # d=3, small dimension
D = 4  # D dimension, distinct from d
d = 3  # d dimension, distinct from D
seed = 42  # fixed seed for reproducibility

ARGS = {
    'v': v,
    'D': D,
    'd': d,
    'seed': seed
}
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 RandomMultiply — 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 RandomMultiply 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
_AdjointLinearOperator Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("481607e48039c489")
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, _AdjointLinearOperator: 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 numpy as np

def isshape(shape):
    """Check if shape is a valid 2-tuple."""
    try:
        if len(shape) != 2:
            return False
        return all(isinstance(s, (int, np.integer)) and s > 0 for s in shape)
    except TypeError:
        return False

class LinearOperator(object):
    """Simplified LinearOperator for testing."""
    ndim = 2

    def __init__(self, dtype, shape):
        if dtype is not None:
            dtype = np.dtype(dtype)
        shape = tuple(shape)
        if not isshape(shape):
            raise ValueError('invalid shape %r (must be 2-d)' % (shape,))
        self.dtype = np.dtype('float32') if dtype is None else dtype
        self.shape = shape

    def _matvec(self, x):
        raise NotImplementedError

    def _matmat(self, X):
        raise NotImplementedError

    def matvec(self, x):
        return self._matvec(x)

    def matmat(self, X):
        return self._matmat(X)

    @property
    def T(self):
        return _AdjointLinearOperator(self)

    def __mul__(self, x):
        if isinstance(x, np.ndarray):
            if x.ndim == 1:
                return self.matvec(x)
            else:
                return self.matmat(x)
        return NotImplemented

class _AdjointLinearOperator(LinearOperator):
    """Adjoint of a LinearOperator."""

    def __init__(self, A):
        self.A = A
        shape = (A.shape[1], A.shape[0])
        dtype = A.dtype
        super(_AdjointLinearOperator, self).__init__(dtype, shape)

    def _matvec(self, x):
        if x.ndim == 1:
            return self.A._rmatvec(x)
        else:
            return self.A._rmatvec(x)

    def _matmat(self, X):
        return self.A._rmatmat(X)

    def _rmatvec(self, x):
        if x.ndim == 1:
            return self.A._matvec(x)
        else:
            return self.A._matvec(x)

    def _rmatmat(self, X):
        return self.A._matmat(X)

    @property
    def T(self):
        return self.A

class SimpleLinearOperator(LinearOperator):
    """A simple concrete LinearOperator for testing."""

    def __init__(self, matrix):
        self.matrix = matrix
        dtype = np.dtype(matrix.dtype) if hasattr(matrix, 'dtype') else np.dtype('float32')
        shape = matrix.shape
        super(SimpleLinearOperator, self).__init__(dtype, shape)

    def _matvec(self, x):
        if x.ndim == 1:
            x = x.reshape(-1, 1)
        result = self.matrix @ x
        return result.ravel() if result.shape[1] == 1 else result

    def _matmat(self, X):
        return self.matrix @ X

    def _rmatvec(self, x):
        if x.ndim == 1:
            x = x.reshape(-1, 1)
        result = self.matrix.T @ x
        return result.ravel() if result.shape[1] == 1 else result

    def _rmatmat(self, X):
        return self.matrix.T @ X

torch.manual_seed(0)
np.random.seed(0)

# Create a simple test matrix (4x3)
test_matrix = np.random.randn(4, 3).astype(np.float32)
base_operator = SimpleLinearOperator(test_matrix)

# Create the adjoint operator
adjoint_operator = _AdjointLinearOperator(base_operator)

# Test vectors and matrices
test_vector = np.random.randn(4).astype(np.float32)
test_matrix_small = np.random.randn(4, 2).astype(np.float32)

ARGS = {
    "A": base_operator,
}
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 _AdjointLinearOperator — 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 _AdjointLinearOperator 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
_CustomLinearOperator Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("2defed82b8724ef8")
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, _CustomLinearOperator: 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 numpy as np

torch.manual_seed(0)

def isshape(shape):
    """Check if shape is a valid 2-d shape tuple."""
    if not isinstance(shape, tuple) or len(shape) != 2:
        return False
    return all(isinstance(s, (int, np.integer)) and s > 0 for s in shape)

class _CustomLinearOperator:
    """Concrete LinearOperator subclass for testing."""
    
    def __init__(self, shape, matvec=None, rmatvec=None, matmat=None, dtype=None, rmatmat=None):
        self.shape = shape
        self.dtype = dtype if dtype is not None else np.dtype('float32')
        self._matvec_func = matvec
        self._rmatvec_func = rmatvec
        self._matmat_func = matmat
        self._rmatmat_func = rmatmat
    
    def _matvec(self, x):
        """Matrix-vector multiplication."""
        if self._matvec_func is not None:
            return self._matvec_func(x)
        return np.zeros(self.shape[0])
    
    def _matmat(self, X):
        """Matrix-matrix multiplication."""
        if self._matmat_func is not None:
            return self._matmat_func(X)
        return np.zeros((self.shape[0], X.shape[1]))
    
    def _rmatvec(self, x):
        """Adjoint matrix-vector multiplication."""
        if self._rmatvec_func is not None:
            return self._rmatvec_func(x)
        return np.zeros(self.shape[1])
    
    def _rmatmat(self, X):
        """Adjoint matrix-matrix multiplication."""
        if self._rmatmat_func is not None:
            return self._rmatmat_func(X)
        return np.zeros((self.shape[1], X.shape[1]))
    
    def matvec(self, v):
        """Public interface for matrix-vector product."""
        return self._matvec(v)
    
    def matmat(self, V):
        """Public interface for matrix-matrix product."""
        return self._matmat(V)
    
    def rmatvec(self, v):
        """Public interface for adjoint matrix-vector product."""
        return self._rmatvec(v)
    
    def rmatmat(self, V):
        """Public interface for adjoint matrix-matrix product."""
        return self._rmatmat(V)

# Create simple test functions
def matvec_func(v):
    """Simple matvec: multiply by 2."""
    return 2.0 * v

def rmatvec_func(v):
    """Simple rmatvec: multiply by 3."""
    return 3.0 * v

def matmat_func(V):
    """Simple matmat: multiply by 2."""
    return 2.0 * V

def rmatmat_func(V):
    """Simple rmatmat: multiply by 3."""
    return 3.0 * V

# Define shape and dtype
shape = (4, 3)
dtype = np.float32

ARGS = {
    'shape': shape,
    'matvec': matvec_func,
    'rmatvec': rmatvec_func,
    'matmat': matmat_func,
    'dtype': dtype,
    'rmatmat': rmatmat_func,
}
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 _CustomLinearOperator — 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 _CustomLinearOperator 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
_TransposedLinearOperator Ran
ran on a synthesized input · constructed an object; no result was computed
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("b8df645779d22d40")
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, _TransposedLinearOperator: 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 numpy as np

def isshape(shape):
    """Check if shape is a valid 2-d shape tuple."""
    if isinstance(shape, tuple) and len(shape) == 2:
        return all(isinstance(s, (int, np.integer)) and s > 0 for s in shape)
    return False

class _CustomLinearOperator:
    """A simple custom linear operator for testing."""
    def __init__(self, dtype, shape, matvec=None, rmatvec=None, matmat=None, rmatmat=None):
        self.dtype = np.dtype(dtype) if dtype is not None else np.dtype('float32')
        self.shape = tuple(shape)
        self._matvec_impl = matvec
        self._rmatvec_impl = rmatvec
        self._matmat_impl = matmat
        self._rmatmat_impl = rmatmat
    
    def matvec(self, x):
        if self._matvec_impl is not None:
            return self._matvec_impl(x)
        return np.zeros(self.shape[0])
    
    def rmatvec(self, x):
        if self._rmatvec_impl is not None:
            return self._rmatvec_impl(x)
        return np.zeros(self.shape[1])
    
    def matmat(self, X):
        if self._matmat_impl is not None:
            return self._matmat_impl(X)
        return np.zeros((self.shape[0], X.shape[1]))
    
    def rmatmat(self, X):
        if self._rmatmat_impl is not None:
            return self._rmatmat_impl(X)
        return np.zeros((self.shape[1], X.shape[0]))

class _TransposedLinearOperator:
    """Represents the transpose of a LinearOperator."""
    def __init__(self, A):
        self.A = A
        self.shape = (A.shape[1], A.shape[0])
        self.dtype = A.dtype
    
    def matvec(self, x):
        return self.A.rmatvec(x)
    
    def rmatvec(self, x):
        return self.A.matvec(x)
    
    def matmat(self, X):
        return self.A.rmatmat(X)
    
    def rmatmat(self, X):
        return self.A.matmat(X)

torch.manual_seed(0)
np.random.seed(0)

def simple_matvec(v):
    """Simple matvec: multiply by 2."""
    return 2.0 * v

def simple_rmatvec(v):
    """Simple rmatvec: multiply by 3."""
    return 3.0 * v

def simple_matmat(V):
    """Simple matmat: multiply by 2."""
    return 2.0 * V

def simple_rmatmat(V):
    """Simple rmatmat: multiply by 3."""
    return 3.0 * V

A = _CustomLinearOperator(
    dtype='float64',
    shape=(4, 3),
    matvec=simple_matvec,
    rmatvec=simple_rmatvec,
    matmat=simple_matmat,
    rmatmat=simple_rmatmat
)

ARGS = {
    'A': A
}
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 _TransposedLinearOperator — 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 _TransposedLinearOperator 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_dtype Ran
ran; our contract draft was wrong, not the code
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("b2835d9d07c679de")
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 dtype. 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 objects with dtype attribute
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(3, 5)

# Create a simple nn.Module with dtype attribute
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    @property
    def dtype(self):
        return self.linear.weight.dtype

module = SimpleModule()

# Test case 1: operators list with tensors and None values
operators_with_tensors = [None, tensor1, tensor2]

# Test case 2: operators list with module
operators_with_module = [module, None]

ARGS = {
    "operators": operators_with_tensors,
    "dtypes": 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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
find_locations_from_condition Ran
ran, honoured the contract we drafted
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("5b9d2e9ed76b6318")
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 ndarray, ndim 1, dtype family int, shape (20,) 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
import numpy as np

torch.manual_seed(0)

# Create sample parameter names and mock parameters with numel() method
names = ['weight_1', 'bias_1', 'weight_2', 'bias_2']

# Create mock parameter objects with numel() method
class MockParam:
    def __init__(self, size):
        self.size = size
    
    def numel(self):
        return self.size

params = [
    MockParam(12),  # weight_1: 12 elements
    MockParam(4),   # bias_1: 4 elements
    MockParam(8),   # weight_2: 8 elements
    MockParam(3),   # bias_2: 3 elements
]

# Define a condition function that selects parameters containing 'weight'
def condition_fn(name):
    return 'weight' in name

ARGS = {
    'names': names,
    'params': params,
    'condition_fn': condition_fn,
}
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 ndarray, ndim 1, dtype family int, shape (20,) — shape (20,) 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
isintlike Ran
ran, violated the contract we drafted
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("0a7da0d18ce0c2fc")
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 numpy as np

torch.manual_seed(0)

# The function isintlike(x) checks if x is an instance of int
# We need to provide a valid argument for parameter x

# Test with an actual integer
x = 42

ARGS = {
    "x": x
}
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 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
isshape Ran
ran, violated the contract we drafted
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("73c2f05a719caea9")
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

torch.manual_seed(0)

# Test cases for isshape function
# The function checks if x is a valid 2-tuple of integers
# It unpacks x into M, N and validates they are both integers
# If nonneg=True, it also checks they are non-negative

ARGS = {
    "x": (4, 3),  # Valid 2-tuple of integers
    "nonneg": 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 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
lazy_direct_matmat Ran
ran; our contract draft was wrong, not the code
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("0a857f86a88fb98e")
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 (7, 2) 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)

# Analyze the function:
# - v: tensor with shape (n, k) or (n,), used as v[i:i_end] slicing and .T transpose
# - Ms: list of tensors, each M has .shape[-1] (last dim) and .shape[0] (first dim)
#   M @ v_slice performs matrix multiplication
# - mults: list of integers (multiplicity values)

# The function slices v into chunks based on multiplicity * M.shape[-1]
# For each M and multiplicity pair, it does matrix ops

# Let's create small distinct-sized tensors:
# v: shape (n, k) where n is total input size
# Ms: list of matrices with different sizes
# mults: multiplicities for each matrix

# Example construction:
# M1: (3, 5) matrix
# M2: (2, 4) matrix
# mults: [1, 2]
# 
# For M1: chunks v[0:5] (1 * 5 elements)
# For M2: chunks v[5:13] (2 * 4 elements)
# Total v needs at least 13 rows

M1 = torch.randn(3, 5)  # shape (3, 5): 3 output dims, 5 input dims
M2 = torch.randn(2, 4)  # shape (2, 4): 2 output dims, 4 input dims

mults = [1, 2]

# Total input dimension needed: 1*5 + 2*4 = 5 + 8 = 13
# Create v with shape (13, 2) for batch of 2
v = torch.randn(13, 2)

Ms = [M1, M2]

ARGS = {
    'v': v,
    'Ms': Ms,
    'mults': mults
}
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 (7, 2) — shape (7, 2) 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
unflatten_like Ran
ran; our contract draft was wrong, not the code
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("6d8daee3396e21d5")
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 list. 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 flattened vector
vector = torch.randn(15)

# Create a list of tensors with different shapes to unflatten like
likeTensorList = [
    torch.randn(2, 3),      # 6 elements
    torch.randn(4, 2),      # 8 elements
    torch.randn(1),         # 1 element
]

ARGS = {
    "vector": vector,
    "likeTensorList": likeTensorList,
}
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 list — a list 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
CombinedRDKronFiLM Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("efb07aa0e63ef262")
How it ran

no invocation recorded.

CombinedRDKronQRFiLM Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("51125dd47186c8c0")
How it ran

no invocation recorded.

ConcatLazy Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("52a62393f3317699")
How it ran

no invocation recorded.

FastfoodOperator Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("84ad10dc772efc21")
How it ran

no invocation recorded.

FiLMLazyRandom Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("612604e0a472123c")
How it ran

no invocation recorded.

FilterLazyRandom Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("5a5b19e77dff59f3")
How it ran

no invocation recorded.

Lazy Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("03f63f2c2e1eb7bf")
How it ran

no invocation recorded.

LazyDirectSum Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("d032cccffcb09566")
How it ran

no invocation recorded.

LazyKron Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("6d76cc862148b017")
How it ran

no invocation recorded.

LazyOneSidedKron Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("0a1f5eeb87655050")
How it ran

no invocation recorded.

LazyPerm Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("2da9befbc32d12d6")
How it ran

no invocation recorded.

LazyRandom Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("cbbd3e437d786806")
How it ran

no invocation recorded.

LazyRandomQR Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("39aba651b25adab7")
How it ran

no invocation recorded.

LazySTFiLMRDKronQR Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("0df6eef43ed7804a")
How it ran

no invocation recorded.

RoundedDoubleKron Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("03dfe475ed6ca9b6")
How it ran

no invocation recorded.

RoundedDoubleKronQR Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("ef5b20cc2c4467b6")
How it ran

no invocation recorded.

RoundedKron Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("5d5797a72d977dae")
How it ran

no invocation recorded.

SparseOperator Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("c55ed0bc145c418e")
How it ran

no invocation recorded.

_PowerLinearOperator Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("37d7ee47abf3dfc2")
How it ran

no invocation recorded.

_ProductLinearOperator Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("5bba23ce771d6766")
How it ran

no invocation recorded.

_ScaledLinearOperator Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("2c0692af09e2ca02")
How it ran

no invocation recorded.

_SumLinearOperator Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("84b3ddf47d348630")
How it ran

no invocation recorded.

_delchainattr Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("cd1b260fe7f1ec38")
How it ran

no invocation recorded.

_setchainattr Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("d4ac8e1ac6ef5038")
How it ran

no invocation recorded.

create_intrinsic_model Not yet run
unverified (harvested, no recorded run)
sanaelotfi/sublora-bounds-for-llms/sublora/nn/projectors.py
code served (permissive licence) · get_code("d63815907fd184b0")
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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 36 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
unflatten_like
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
2106.15739 (2021-06)
On the Periodic Behavior of Neural Network Training with Batch Normalization and Weight Decay
2209.03695 (2022-09)
Training Scale-Invariant Neural Networks on the Sphere Can Happen in Three Regimes
2410.22113 (2024-10)
Where Do Large Learning Rates Lead Us?
isintlike
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2106.06610 (2021-06)
Scalars are universal: Equivariant machine learning, structured like classical physics
2204.00887 (2022-04)
Dimensionless machine learning: Imposing exact units equivariance

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

Modern language models can contain billions of parameters, raising the question of whether they can generalize beyond the training data or simply parrot their training corpora. We provide the first non-vacuous generalization bounds for pretrained large language models (LLMs), indicating that language models are capable of discovering regularities that generalize to unseen data. In particular, we derive a compression bound that is valid for the unbounded log-likelihood loss using prediction smoothing, and we extend the bound to handle subsampling, accelerating bound computation by orders of magnitude on massive datasets. To achieve the extreme level of compression required for non-vacuous bounds, we devise SubLoRA, a simple low-dimensional nonlinear parameterization that leads to non-vacuous generalization bounds for models with nearly a billion parameters. Finally, we use our bounds to understand LLM generalization and find that larger models have better generalization bounds and are more compressible than smaller models.

For agents

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

get_harvested_code_for_paper("2312.17173")
get_code_for_paper("2312.17173")
have("2312.17173")

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

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

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

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

Connect an agent — have() is free.