SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.11942 · 2019

ALBERT: A Lite BERT for Self-supervised Learning of Language Representations

Zhenzhong Lan, Sebastian Goodman, Radu Soricut, Mingda Chen, Kevin Gimpel, Piyush Sharma

arXiv · PDF · Open in the Atlas

Code that ran

81 of 126 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (17 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 1 violated it and 41 have no contract verdict; 35 failures of our instrument; 45 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/1909.11942.json · badge: /api/ran/1909.11942.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
google-research/ALBERT canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
lucidrains/sinkhorn-transformer community
not in the paper's declared repositories
11 ran · 3 no recorded run
cypressd1999/FYP_2021 community (classifier label)
classifier basis not recorded on the link
9 ran · 8 no recorded run
Soikonomou/albert_final community (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
kpe/bert-for-tf2 community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
graykode/ALBERT-Pytorch community
Papers with Code archive
7 ran · 0 no recorded run
kamalkraj/ALBERT-TF2.0 community
not in the paper's declared repositories
5 ran · 6 no recorded run
Soikonomou/bert_new community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
vvvm23/albert community
not in the paper's declared repositories
4 ran · 3 no recorded run
lonePatient/albert_pytorch community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
brightmart/albert_zh community
Papers with Code archive
3 ran · 11 no recorded run
jpablou/Matching-The-Blanks-Ths community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
lyqcom/albert community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
xinyooo/ALBERT4Rec community
not in the paper's declared repositories
2 ran · 4 no recorded run
Sanyuan-Chen/RecAdam community
Papers with Code archive
2 ran · 0 no recorded run
epfml/collaborative-attention community
Papers with Code archive
1 ran · 1 no recorded run
benywon/Chinese-GPT-2 community
Papers with Code archive
1 ran · 0 no recorded run
codegram/calbert community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
whitespace_tokenize Ran
ran; our contract draft was wrong, not the code
Soikonomou/bert_new/src/model/BERT/tokenization_bert.py
code served (permissive licence) · get_code("cf9ffa02a42184af")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:55:57Z). If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def whitespace_tokenize(text):
    """Runs basic whitespace cleaning and splitting on a piece of text."""
    text = text.strip()
    if not text:
        return []
    tokens = text.split()
    return tokens

# Setup code
torch.manual_seed(0)

# The function takes a single parameter: text (a string)
# It performs basic whitespace cleaning and splitting
# We need to provide a valid string argument

ARGS = {
    "text": "  hello world  this is a test  "
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
AlbertConfig Ran
ran on a synthesized input · constructed an object; no result was computed
kamalkraj/ALBERT-TF2.0/albert.py
code served (permissive licence) · get_code("35df638989183cf3")
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, AlbertConfig: 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 copy
import json
import six

ARGS = {
    'vocab_size': 30522,
    'embedding_size': 128,
    'hidden_size': 4096,
    'num_hidden_layers': 12,
    'num_hidden_groups': 1,
    'num_attention_heads': 64,
    'intermediate_size': 16384,
    'inner_group_num': 1,
    'down_scale_factor': 1,
    'hidden_act': 'gelu',
    'hidden_dropout_prob': 0.0,
    'attention_probs_dropout_prob': 0.0,
    'max_position_embeddings': 512,
    'type_vocab_size': 2,
    'initializer_range': 0.02,
    'backward_compatible': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AlbertConfig — 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 AlbertConfig 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
AttentionSortNet Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("d143b86f7eb37e1d")
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, AttentionSortNet: 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "heads": 2,
    "bucket_size": 4,
    "kv_bucket_size": 4,
    "dim": 8,
    "non_permutative": False,
    "temperature": 0.7,
    "sinkhorn_iter": 8,
    "n_sortcut": 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 AttentionSortNet — 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 AttentionSortNet 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
Dense3D Ran
ran on a synthesized input · constructed an object; no result was computed
kamalkraj/ALBERT-TF2.0/albert.py
code served (permissive licence) · get_code("215c14713864147c")
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, Dense3D: 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 tensorflow as tf

# Set random seed for reproducibility
tf.random.set_seed(0)

# Create arguments for Dense3D
ARGS = {
    'num_attention_heads': 4,
    'size_per_head': 8,
    'kernel_initializer': tf.keras.initializers.GlorotUniform(),
    'bias_initializer': 'zeros',
    'activation': None,
    'use_bias': True,
    'output_projection': False,
    'backward_compatible': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dense3D — 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 Dense3D 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
EmbeddingLookup Ran
ran on a synthesized input · constructed an object; no result was computed
kamalkraj/ALBERT-TF2.0/albert.py
code served (permissive licence) · get_code("6cbf6bc0afb44768")
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, EmbeddingLookup: 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 tensorflow as tf
import numpy as np

# Mock tf_utils since it's imported in the function
class tf_utils:
    @staticmethod
    def get_shape_list(tensor):
        """Get shape of tensor as a list."""
        shape = tf.shape(tensor)
        static_shape = tensor.shape.as_list()
        # Return static shape if available, otherwise dynamic
        result = []
        for i, s in enumerate(static_shape):
            if s is None:
                result.append(shape[i])
            else:
                result.append(s)
        return result

# Patch the module so EmbeddingLookup can find tf_utils
import sys
current_module = sys.modules[__name__]
sys.modules[__name__].tf_utils = tf_utils

# Create test inputs - small tensor with token indices
vocab_size = 10
embedding_size = 8
batch_size = 2
seq_length = 4

# Create input tensor with valid token indices
input_ids = tf.constant([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=tf.int32)

ARGS = {
    'vocab_size': vocab_size,
    'embedding_size': embedding_size,
    'initializer_range': 0.02,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EmbeddingLookup — 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 EmbeddingLookup 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
EmbeddingPostprocessor Ran
ran on a synthesized input · constructed an object; no result was computed
kamalkraj/ALBERT-TF2.0/albert.py
code served (permissive licence) · get_code("bc41b5cdd27882da")
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, EmbeddingPostprocessor: 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Define a small stand-in for tf_utils.pack_inputs if needed
class tf_utils:
    @staticmethod
    def pack_inputs(inputs):
        return inputs

# Create small tensor inputs
batch_size = 2
seq_length = 4
hidden_size = 8
token_type_vocab_size = 2
max_position_embeddings = 16

# word_embeddings: shape [batch, seq_length, hidden_size]
word_embeddings = tf.random.normal([batch_size, seq_length, hidden_size], dtype=tf.float32)

# token_type_ids: shape [batch, seq_length]
token_type_ids = tf.constant([[0, 0, 1, 1], [1, 0, 0, 1]], dtype=tf.int32)

ARGS = {
    'use_type_embeddings': True,
    'token_type_vocab_size': token_type_vocab_size,
    'use_position_embeddings': True,
    'max_position_embeddings': max_position_embeddings,
    'hidden_size': hidden_size,
    'dropout_prob': 0.1,
    'initializer_range': 0.02,
    'initializer': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EmbeddingPostprocessor — 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 EmbeddingPostprocessor 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
Embeddings Ran
ran on a synthesized input · constructed an object; no result was computed
graykode/ALBERT-Pytorch/models.py
code served (permissive licence) · get_code("00437373da100756")
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, Embeddings: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal config class with all required attributes
class Config:
    def __init__(self):
        self.vocab_size = 100
        self.embedding = 8
        self.hidden = 16
        self.max_len = 32
        self.n_segments = 2

cfg = Config()

# Create input tensors
batch_size = 2
seq_len = 4
x = torch.randint(0, cfg.vocab_size, (batch_size, seq_len), dtype=torch.long)
seg = torch.randint(0, cfg.n_segments, (batch_size, seq_len), dtype=torch.long)

ARGS = {
    'cfg': cfg,
}
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 Embeddings — 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 Embeddings 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
FactorizedEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
vvvm23/albert/albert/model.py
code served (permissive licence) · get_code("9850e836a8bb97ce")
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, FactorizedEmbedding: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "vocab_size": 100,
    "embedding_dim": 8,
    "hidden_size": 16,
    "max_len": 5000,
}
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 FactorizedEmbedding — 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 FactorizedEmbedding 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
LayerNorm Ran
ran on a synthesized input
xinyooo/ALBERT4Rec/models/albert_modules/albert.py
pointer only (licence: NONE) · get_code("3f504ebe7af3ba40")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, xinyooo/ALBERT4Rec when it was checked. 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.

LayerNorm Ran
ran on a synthesized input · constructed an object; no result was computed
graykode/ALBERT-Pytorch/models.py
code served (permissive licence) · get_code("31b6e6cb2bf23d35")
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, LayerNorm: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal config class with the required 'hidden' attribute
class MinimalConfig:
    def __init__(self, hidden_size):
        self.hidden = hidden_size

# Set up arguments
cfg = MinimalConfig(hidden_size=4)
variance_epsilon = 1e-12

ARGS = {
    "cfg": cfg,
    "variance_epsilon": variance_epsilon
}
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 LayerNorm — 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 LayerNorm 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
MultiHeadBlockSelf Ran
ran on a synthesized input · constructed an object; no result was computed
benywon/Chinese-GPT-2/modules.py
pointer only (licence: NONE) · get_code("0afbeb40a45a72b6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, benywon/Chinese-GPT-2 when it was checked. 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.

MultiHeadedSelfAttention Ran
ran on a synthesized input · constructed an object; no result was computed
graykode/ALBERT-Pytorch/models.py
code served (permissive licence) · get_code("8734ddba5f76437a")
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, MultiHeadedSelfAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

class Config:
    def __init__(self, hidden, n_heads):
        self.hidden = hidden
        self.n_heads = n_heads

cfg = Config(hidden=4, n_heads=2)

batch_size = 2
seq_len = 3
hidden_dim = 4

x = torch.randn(batch_size, seq_len, hidden_dim)
mask = torch.ones(batch_size, seq_len)

ARGS = {
    'cfg': cfg
}
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 MultiHeadedSelfAttention — 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 MultiHeadedSelfAttention 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
NystromAttention Ran
ran on a synthesized input · constructed an object; no result was computed
vvvm23/albert/albert/model.py
code served (permissive licence) · get_code("a0dff78471b54854")
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, NystromAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal NystromAttention instance to understand parameter requirements
# by examining the build method signature

ARGS = {
    'dim': 64,                           # input dimension
    'dim_head': 16,                      # dimension per head
    'heads': 4,                          # number of attention heads
    'num_landmarks': 32,                 # number of landmark tokens
    'pinv_iterations': 6,                # iterations for pseudo-inverse
    'residual': True,                    # whether to use residual connection
    'residual_conv_kernel': 33,          # kernel size for residual conv
    'eps': 1e-8,                         # epsilon for numerical stability
    'dropout': 0.1,                      # dropout rate
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NystromAttention — 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 NystromAttention 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
PositionWiseFeedForward Ran
ran on a synthesized input · constructed an object; no result was computed
graykode/ALBERT-Pytorch/models.py
code served (permissive licence) · get_code("e952b1d84bed0af6")
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, PositionWiseFeedForward: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

class Config:
    def __init__(self, hidden, hidden_ff):
        self.hidden = hidden
        self.hidden_ff = hidden_ff

cfg = Config(hidden=4, hidden_ff=8)

ARGS = {
    'cfg': cfg
}
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 PositionWiseFeedForward — 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 PositionWiseFeedForward 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
PositionalEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
vvvm23/albert/albert/model.py
code served (permissive licence) · get_code("d6e09a6ed82fe99e")
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, PositionalEmbedding: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# PositionalEmbedding takes the following parameters:
# - nb_in: int (embedding dimension)
# - dropout: float (dropout probability, default 0.0)
# - max_length: int (maximum sequence length, default 5000)

# For testing, we'll use small values
nb_in = 4
dropout = 0.1
max_length = 10

ARGS = {
    'nb_in': nb_in,
    'dropout': dropout,
    'max_length': max_length
}
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 PositionalEmbedding — 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 PositionalEmbedding 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
RecAdam Ran
ran on a synthesized input · constructed an object; no result was computed
Sanyuan-Chen/RecAdam/RecAdam.py
code served (permissive licence) · get_code("350a1a7ab2f301c8")
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, RecAdam: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torch.optim import Optimizer

torch.manual_seed(0)

# Create a simple model with parameters
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 pretrained model (copy of initial parameters)
pretrained_model = SimpleModel()
pretrained_model.load_state_dict(model.state_dict())

# Get model parameters
params = list(model.parameters())

# Get pretrained parameters
pretrain_params = list(pretrained_model.parameters())

# Create gradients for the parameters so step() can work
for p in params:
    p.grad = torch.randn_like(p)

ARGS = {
    'params': params,
    'lr': 0.001,
    'betas': (0.9, 0.999),
    'eps': 1e-6,
    'weight_decay': 0.0,
    'correct_bias': True,
    'anneal_fun': 'sigmoid',
    'anneal_k': 0.1,
    'anneal_t0': 1000,
    'anneal_w': 1.0,
    'pretrain_cof': 5000.0,
    'pretrain_params': pretrain_params
}
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 RecAdam — 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 RecAdam 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
SimpleSortNet Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("04cc0c0e9fb1cf4c")
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, SimpleSortNet: 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "heads": 2,
    "bucket_size": 4,
    "max_buckets": 3,
    "dim": 8,
    "non_permutative": True,
    "temperature": 0.7,
    "sinkhorn_iter": 8,
}
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 SimpleSortNet — 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 SimpleSortNet 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
SoftmaxAttention Ran
ran on a synthesized input · constructed an object; no result was computed
vvvm23/albert/albert/model.py
code served (permissive licence) · get_code("979c42dd40b4b6bb")
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, SoftmaxAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for SoftmaxAttention
nb_in = 16  # input feature dimension
dim_head = 8  # dimension per head
heads = 2  # number of attention heads
dropout = 0.1  # dropout rate

ARGS = {
    "nb_in": nb_in,
    "dim_head": dim_head,
    "heads": heads,
    "dropout": dropout,
}
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 SoftmaxAttention — 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 SoftmaxAttention 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
TokenEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
xinyooo/ALBERT4Rec/models/albert_modules/albert.py
pointer only (licence: NONE) · get_code("80bf93fd89246988")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, xinyooo/ALBERT4Rec when it was checked. 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.

Transformer Ran
ran on a synthesized input
graykode/ALBERT-Pytorch/models.py
code served (permissive licence) · get_code("b11322b4f500cef1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

class Config:
    def __init__(self):
        self.vocab_size = 100
        self.embedding = 8
        self.hidden = 12
        self.max_len = 16
        self.n_segments = 2
        self.n_heads = 3
        self.hidden_ff = 24
        self.n_layers = 2

cfg = Config()

INIT_ARGS = {
    'cfg': cfg
}

batch_size = 2
seq_len = 5

x = torch.randint(0, cfg.vocab_size, (batch_size, seq_len))
seg = torch.randint(0, cfg.n_segments, (batch_size, seq_len))
mask = torch.ones(batch_size, seq_len)

ARGS = {
    'x': x,
    'seg': seg,
    'mask': mask
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
albert_layers Ran
ran; our contract draft was wrong, not the code
epfml/collaborative-attention/src/collaborative_attention/adapter_albert.py
code served (permissive licence) · get_code("b2116e6e872a2a35")
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) and returned ModuleList. 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)

class AlbertLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.dense = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.dense(x)

class AlbertLayerGroup(nn.Module):
    def __init__(self):
        super().__init__()
        self.albert_layers = nn.ModuleList([
            AlbertLayer(),
            AlbertLayer()
        ])
    
    def forward(self, x):
        for layer in self.albert_layers:
            x = layer(x)
        return x

class AlbertEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.albert_layer_groups = nn.ModuleList([
            AlbertLayerGroup()
        ])
    
    def forward(self, x):
        for group in self.albert_layer_groups:
            x = group(x)
        return x

class AlbertModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.albert = nn.Module()
        self.albert.encoder = AlbertEncoder()
    
    def forward(self, x):
        return self.albert.encoder(x)

model = AlbertModel()

ARGS = {
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 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
anneal_function Ran
ran, honoured the contract we drafted
Sanyuan-Chen/RecAdam/RecAdam.py
code served (permissive licence) · get_code("b8301a2a061e30a2")
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 float, 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 numpy as np

ARGS = {
    'function': 'sigmoid',
    'step': 10,
    'k': 0.5,
    't0': 5,
    'weight': 2.0
}
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 float, 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
batched_index_select Ran
ran; our contract draft was wrong, not the code
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("8429e6520e353d4d")
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 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct arguments for batched_index_select
# The function expects:
# - values: a tensor with shape (batch, seq_len, features)
# - indices: a tensor with shape (batch, num_indices) containing indices to select from seq_len dimension

batch_size = 2
seq_len = 5
feature_dim = 4
num_indices = 3

# values tensor: shape (batch_size, seq_len, feature_dim)
values = torch.randn(batch_size, seq_len, feature_dim)

# indices tensor: shape (batch_size, num_indices) with valid indices in range [0, seq_len)
indices = torch.tensor([[0, 2, 4], [1, 3, 2]], dtype=torch.long)

ARGS = {
    "values": values,
    "indices": indices,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bucket Ran
ran; our contract draft was wrong, not the code
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("048663070f64ac68")
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 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor to reshape
# Using distinct dimensions: batch=2, features=4, sequence=3
t = torch.randn(2, 12)

# buckets parameter: number of buckets to reshape into
buckets = 3

# dim parameter: dimension along which to reshape
dim = 1

ARGS = {
    "buckets": buckets,
    "t": t,
    "dim": dim,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_to_unicode Ran
ran; our contract draft was wrong, not the code
kpe/bert-for-tf2/bert/tokenization/bert_tokenization.py
pointer only (licence: MIT); the stored copy get_code serves, from huawei-noah/Pretrained-Language-Model, is pointer only (licence: NONE) · get_code("1923fc05163d207d")
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 huawei-noah/Pretrained-Language-Model, and GitHub detected no licence in that repository when it was checked. 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.

create_float_feature Ran
ran; our contract draft was wrong, not the code
google-research/ALBERT/create_pretraining_data.py
code served (permissive licence) · get_code("5b0793599d029a67")
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 Feature. 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 tensorflow.compat.v1 as tf

# The function create_float_feature takes a 'values' parameter
# It expects an iterable of numeric values that can be converted to a list
# and passed to tf.train.FloatList

# Create a simple list of float values
values = [1.0, 2.5, 3.7, 4.2]

ARGS = {
    "values": values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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
create_int_feature Ran
ran; our contract draft was wrong, not the code
google-research/ALBERT/create_pretraining_data.py
code served (permissive licence) · get_code("b03d45af664a39e3")
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 Feature. 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 tensorflow.compat.v1 as tf

# The function takes 'values' parameter and converts it to a list
# which is then passed to tf.train.Int64List(value=list(values))
# So values needs to be something iterable that can be converted to a list of integers

values = [1, 2, 3, 4, 5]

ARGS = {
    "values": values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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
differentiable_topk Ran
ran; our contract draft was wrong, not the code
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("9477e59f3a606128")
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 3, dtype family float, shape (2, 6, 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)

# Construct a small input tensor
# Shape: (batch=2, sequence=3, dim=4)
# The function uses x with shape (*_, n, dim) where n is the sequence length
x = torch.randn(2, 3, 4)

# k parameter: number of top elements to extract
k = 2

# temperature parameter for softmax scaling
temperature = 1.0

ARGS = {
    'x': x,
    'k': k,
    'temperature': temperature,
}
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 3, dtype family float, shape (2, 6, 4) — shape (2, 6, 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
dropout Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
brightmart/albert_zh/modeling_google.py
pointer only (licence: NONE) · get_code("2bf900d0da165894")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brightmart/albert_zh when it was checked. 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.

encode_ids Ran
ran on a synthesized input
lonePatient/albert_pytorch/model/tokenization_albert.py
code served (permissive licence) · get_code("9c4914e087369deb")
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, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import six

class MockSentencePieceModel:
    """Mock SentencePiece model for testing encode_ids."""
    
    def __init__(self):
        # Create a simple vocabulary
        self.vocab = {
            'hello': 1,
            'world': 2,
            '▁world': 3,
            'test': 4,
            '▁test': 5,
            'ing': 6,
            ',': 7,
            '▁': 8,
        }
        self.id_vocab = {v: k for k, v in self.vocab.items()}
    
    def EncodeAsPieces(self, text):
        """Encode text as pieces."""
        # Simple mock implementation
        if not text:
            return []
        # Return some mock pieces based on input
        if 'hello' in text.lower():
            return ['hello', '▁world']
        elif 'test' in text.lower():
            return ['▁test', 'ing']
        else:
            return ['▁' + text.lower()]
    
    def SampleEncodeAsPieces(self, text, nbest_size, alpha):
        """Sample encode as pieces."""
        return self.EncodeAsPieces(text)
    
    def PieceToId(self, piece):
        """Convert piece to ID."""
        return self.vocab.get(piece, 0)

# Create mock sp_model
sp_model = MockSentencePieceModel()

# Create text input
text = "Hello world test"

ARGS = {
    'sp_model': sp_model,
    'text': text,
    'sample': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
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
encode_pieces Ran
ran on a synthesized input
kpe/bert-for-tf2/bert/tokenization/albert_tokenization.py
code served (permissive licence) · get_code("6e2a0964af8411ad")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import six

class MockSentencePiece:
    """Mock sentencepiece model for testing."""
    
    def EncodeAsPieces(self, text):
        """Encode text as pieces."""
        if isinstance(text, bytes):
            text = text.decode('utf-8', 'ignore')
        # Return mock pieces
        return [b'hello', b'world']
    
    def SampleEncodeAsPieces(self, text, n, alpha):
        """Sample encode text as pieces."""
        if isinstance(text, bytes):
            text = text.decode('utf-8', 'ignore')
        return [b'hello', b'world']


sp_model = MockSentencePiece()
text = "hello world"
return_unicode = True
sample = False

ARGS = {
    'sp_model': sp_model,
    'text': text,
    'return_unicode': return_unicode,
    'sample': sample
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
encode_pieces Ran
ran on a synthesized input
lonePatient/albert_pytorch/model/tokenization_albert.py
code served (permissive licence) · get_code("306ef06ed54230e4")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import unicodedata
import six

class MockSentencePieceModel:
    """Mock SentencePiece model that implements required methods."""
    
    def EncodeAsPieces(self, text):
        """Mock implementation of EncodeAsPieces."""
        # Return some mock pieces for testing
        if not text:
            return []
        # Simple mock: split by spaces and add underscores
        words = text.split()
        pieces = []
        for i, word in enumerate(words):
            if i == 0:
                pieces.append(word)
            else:
                pieces.append('▁' + word)
        return pieces
    
    def SampleEncodeAsPieces(self, text, nbest_size, alpha):
        """Mock implementation of SampleEncodeAsPieces."""
        # Return same as EncodeAsPieces for consistency
        return self.EncodeAsPieces(text)

# Create mock sp_model
sp_model = MockSentencePieceModel()

# Create test text input
text = "Hello world, this is a test."

# Build ARGS dict with all parameters for encode_pieces
ARGS = {
    "sp_model": sp_model,
    "text": text,
    "return_unicode": True,
    "sample": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
evaluate_ Ran
ran on a synthesized input
cypressd1999/FYP_2021/src/train_funcs.py
code served (permissive licence) · get_code("e1935088b1c311cc")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a simple tokenizer stand-in that has a decode method
class SimpleTokenizer:
    def decode(self, token_ids):
        # Convert numpy array or list to string representation
        if hasattr(token_ids, 'tolist'):
            token_ids = token_ids.tolist()
        return f"tokens: {token_ids}"

# Create tensors with distinct sizes
batch_size = 2
vocab_size = 4
sequence_length = 3

# lm_logits: batch_size x vocab_size
lm_logits = torch.randn(batch_size, vocab_size)

# blanks_logits: batch_size x sequence_length (used in MSE calculation)
blanks_logits = torch.randn(batch_size, sequence_length)

# masked_for_pred: batch_size (target labels for masked tokens)
masked_for_pred = torch.randint(0, vocab_size, (batch_size,))

# blank_labels: batch_size x sequence_length (target values for blanks)
blank_labels = torch.randn(batch_size, sequence_length)

# tokenizer with decode method
tokenizer = SimpleTokenizer()

# print_ flag
print_ = True

ARGS = {
    'lm_logits': lm_logits,
    'blanks_logits': blanks_logits,
    'masked_for_pred': masked_for_pred,
    'blank_labels': blank_labels,
    'tokenizer': tokenizer,
    'print_': print_
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
evaluate_ Ran
ran on a synthesized input
cypressd1999/FYP_2021/src/tasks/train_funcs.py
code served (permissive licence) · get_code("ee14d5932438dd30")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct arguments for evaluate_ function
# output: logits tensor with shape (batch_size, num_classes)
# labels: label tensor with shape (batch_size, 1) or (batch_size,)
# ignore_idx: integer index to ignore

output = torch.randn(2, 4)  # batch_size=2, num_classes=4
labels = torch.tensor([[1], [2]])  # batch_size=2, shape (2,1)
ignore_idx = -1  # index to ignore (not present in labels)

ARGS = {
    "output": output,
    "labels": labels,
    "ignore_idx": ignore_idx,
}
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 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
evaluate_ Ran
ran on a synthesized input
jpablou/Matching-The-Blanks-Ths/src/tasks/train_funcs.py
code served (permissive licence) · get_code("f92f017fe0d849f2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for the function
# output: logits with shape (batch_size, num_classes)
# labels: class indices with shape (batch_size, 1) or (batch_size,)
# ignore_idx: integer value to ignore

batch_size = 2
num_classes = 4

output = torch.randn(batch_size, num_classes)
labels = torch.tensor([[1], [2]], dtype=torch.long)
ignore_idx = -1

ARGS = {
    "output": output,
    "labels": labels,
    "ignore_idx": ignore_idx
}
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 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
expand_batch_and_merge_head Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("e5d5e9b3569db056")
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 (8, 3) 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:
# expand_batch_and_merge_head(b, t) takes:
# - b: an integer (used to expand dimension 0)
# - t: a tensor (squeezed, expanded, and reshaped)

# The function:
# 1. Squeezes dimension 0 of t
# 2. Expands t along dimension 0 by factor b
# 3. Reshapes the result

# Let's create a valid tensor t with shape (1, 4, 3)
# After squeeze(0), it becomes (4, 3)
# We expand it to (b, 4, 3) where b is an integer
# Then reshape to (4*b, 3)

b = 2
t = torch.randn(1, 4, 3)

ARGS = {
    "b": b,
    "t": t
}
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 (8, 3) — shape (8, 3) 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
file_based_input_fn_builder Ran
ran on a synthesized input
google-research/ALBERT/classifier_utils.py
code served (permissive licence) · get_code("ff6bac8bf3944cbe")
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 function. 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 tensorflow.compat.v1 as tf
import tempfile
import os

# Create a minimal TFRecord file with sample data
def create_tfrecord_file():
    output_file = tempfile.NamedTemporaryFile(delete=False, suffix='.tfrecord')
    writer = tf.python_io.TFRecordWriter(output_file.name)
    
    # Create sample records
    seq_length = 8
    multiple = 1
    for i in range(4):
        feature = {
            'input_ids': tf.train.Feature(int64_list=tf.train.Int64List(value=[1] * (seq_length * multiple))),
            'input_mask': tf.train.Feature(int64_list=tf.train.Int64List(value=[1] * (seq_length * multiple))),
            'segment_ids': tf.train.Feature(int64_list=tf.train.Int64List(value=[0] * (seq_length * multiple))),
            'label_ids': tf.train.Feature(int64_list=tf.train.Int64List(value=[0])),
            'is_real_example': tf.train.Feature(int64_list=tf.train.Int64List(value=[1])),
        }
        example = tf.train.Example(features=tf.train.Features(feature=feature))
        writer.write(example.SerializeToString())
    
    writer.close()
    return output_file.name

# Create the TFRecord file
tfrecord_path = create_tfrecord_file()

ARGS = {
    'input_file': [tfrecord_path],
    'seq_length': 8,
    'is_training': True,
    'drop_remainder': False,
    'task_name': 'mrpc',
    'use_tpu': False,
    'bsz': 2,
    'multiple': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
gelu Ran
ran, honoured the contract we drafted
Soikonomou/albert_final/src/model/ALBERT/modeling_bert.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lonePatient/BERT-SDA, is pointer only (licence: NONE) · get_code("211753ba29188d4e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lonePatient/BERT-SDA, and GitHub detected no licence in that repository when it was checked. 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.

gelu Ran
ran, honoured the contract we drafted
brightmart/albert_zh/modeling_google.py
pointer only (licence: NONE) · get_code("cb61421413d30b87")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brightmart/albert_zh when it was checked. 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.

gelu Ran
ran; our contract draft was wrong, not the code
google-research/ALBERT/modeling.py
code served (permissive licence) · get_code("51d3bc0cfa6415a3")
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 SymbolicTensor. 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 tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

# Create a small float32 tensor for x
x = tf.constant([[0.5, -0.3, 1.2, -0.8],
                  [0.1, 0.2, -0.5, 0.9]], dtype=tf.float32)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
gelu_new Ran
ran, honoured the contract we drafted
Soikonomou/albert_final/src/model/ALBERT/modeling_bert.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lonePatient/BERT-SDA, is pointer only (licence: NONE) · get_code("77601724cad03f95")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lonePatient/BERT-SDA, and GitHub detected no licence in that repository when it was checked. 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_activation Ran
ran; our contract draft was wrong, not the code
brightmart/albert_zh/modeling_google.py
pointer only (licence: NONE) · get_code("ae9ebb2661d2ddd4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brightmart/albert_zh when it was checked. 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_activation Ran
ran; our contract draft was wrong, not the code
google-research/ALBERT/modeling.py
code served (permissive licence) · get_code("217fe96a5945a42d")
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 function. 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 six
import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

ARGS = {
    'activation_string': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_assignment_map_from_checkpoint Ran
ran on a synthesized input
google-research/ALBERT/modeling.py
code served (permissive licence) · get_code("6bf234f32ff01978")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import collections
import re
import six
import tensorflow.compat.v1 as tf
import tempfile
import os

# Disable TF v2 behavior and logging
tf.disable_v2_behavior()
tf.logging.set_verbosity(tf.logging.ERROR)

# Create a temporary checkpoint file with some variables
def create_dummy_checkpoint():
    """Create a minimal TensorFlow checkpoint for testing."""
    with tf.Session() as sess:
        # Create some variables that will be saved
        var1 = tf.Variable(tf.ones([2, 3]), name='encoder/layer_0/weight')
        var2 = tf.Variable(tf.ones([4]), name='encoder/layer_0/bias')
        var3 = tf.Variable(tf.ones([3, 2]), name='decoder/layer_1/weight')
        var4 = tf.Variable(tf.ones([5]), name='group_0/ffn_1/dense')
        var5 = tf.Variable(tf.ones([2]), name='attention_1/query')
        
        sess.run(tf.global_variables_initializer())
        
        # Save checkpoint
        checkpoint_dir = tempfile.mkdtemp()
        checkpoint_path = os.path.join(checkpoint_dir, 'model.ckpt')
        saver = tf.train.Saver()
        saver.save(sess, checkpoint_path)
        
        return checkpoint_path, checkpoint_dir

checkpoint_path, checkpoint_dir = create_dummy_checkpoint()

# Create TensorFlow variables to be assigned
with tf.Session() as sess:
    # Create variables with names that should match checkpoint variables
    tvars = [
        tf.Variable(tf.zeros([2, 3]), name='encoder/layer_0/weight'),
        tf.Variable(tf.zeros([4]), name='encoder/layer_0/bias'),
        tf.Variable(tf.zeros([3, 2]), name='decoder/layer_1/weight'),
        tf.Variable(tf.zeros([5]), name='group_1/ffn_1/dense'),
        tf.Variable(tf.zeros([5]), name='group_2/ffn_2/dense'),
        tf.Variable(tf.zeros([2]), name='attention_2/query'),
    ]
    
    sess.run(tf.global_variables_initializer())

ARGS = {
    'tvars': tvars,
    'init_checkpoint': checkpoint_path,
    'num_of_group': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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_e1e2_start Ran
ran on a synthesized input
cypressd1999/FYP_2021/src/tasks/preprocessing_funcs.py
code served (permissive licence) · get_code("a1a367cc1b634bfd")
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, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes:
# - x: a sequence that is iterable and supports enumeration and equality comparison
# - e1_id: a value to search for in x
# - e2_id: another value to search for in x
# The function finds the index of the first occurrence of e1_id and e2_id in x

# x should be a list of integers (token IDs)
x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

# e1_id and e2_id should be integers that exist in x
e1_id = 2
e2_id = 7

ARGS = {
    "x": x,
    "e1_id": e1_id,
    "e2_id": e2_id
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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_e1e2_start Ran
ran on a synthesized input
jpablou/Matching-The-Blanks-Ths/src/tasks/preprocessing_funcs.py
code served (permissive licence) · get_code("ee0c581972df0258")
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, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes:
# x: a sequence that can be enumerated (list, tuple, tensor, etc.)
# e1_id: an id to search for in x
# e2_id: an id to search for in x
# The function finds the first index of e1_id and e2_id in x

# Create a simple list with some token IDs
x = [101, 2054, 2003, 103, 2054, 103, 102]  # example token sequence with e1_id=103 and e2_id=103

e1_id = 103  # first entity marker
e2_id = 103  # second entity marker

ARGS = {
    "x": x,
    "e1_id": e1_id,
    "e2_id": e2_id,
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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_initializer Ran
ran; our contract draft was wrong, not the code
kamalkraj/ALBERT-TF2.0/albert.py
code served (permissive licence) · get_code("591598c6e9e9294a")
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 TruncatedNormal. 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 tensorflow as tf

# The function get_initializer takes one parameter: initializer_range
# It's a float that specifies the standard deviation for the TruncatedNormal initializer
# The function simply returns a tf.keras.initializers.TruncatedNormal with the given stddev

ARGS = {
    "initializer_range": 0.02
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TruncatedNormal — a TruncatedNormal output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TruncatedNormal 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_subject_objects Ran
ran on a synthesized input
cypressd1999/FYP_2021/src/misc.py
code served (permissive licence) · get_code("540b1fdc61fb8b88")
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, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
from itertools import permutations
from unittest.mock import MagicMock

# Create a mock token/span object that mimics spaCy Token behavior
class MockToken:
    def __init__(self, text, dep_, children=None):
        self.text = text
        self.dep_ = dep_
        self.children = children if children is not None else []
        self._subtree = [self]
    
    @property
    def subtree(self):
        return self._subtree
    
    def __repr__(self):
        return f"MockToken({self.text})"

# Create a mock span object
class MockSpan:
    def __init__(self, text, dep_, children=None):
        self.text = text
        self.dep_ = dep_
        self.children = children if children is not None else []
        self._subtree = [MockToken(token, dep_) for token in text.split()]
    
    @property
    def subtree(self):
        return self._subtree
    
    def __repr__(self):
        return f"MockSpan({self.text})"

# Create a mock sentence with root and proper dependency structure
class MockSentence:
    def __init__(self):
        # Create tokens
        subject_token = MockToken("dog", "nsubj", [])
        subject_token._subtree = [subject_token]
        
        obj_token = MockToken("ball", "dobj", [])
        obj_token._subtree = [obj_token]
        
        attr_token = MockToken("happy", "attr", [])
        attr_token._subtree = [attr_token]
        
        # Create root with children
        self.root = MockToken("chased", "ROOT", [subject_token, obj_token, attr_token])
        self.root._subtree = [self.root]

sent = MockSentence()

ARGS = {
    "sent_": sent
}
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 list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
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
gumbel_sinkhorn Ran
ran; our contract draft was wrong, not the code
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("75494c9e9243dc8c")
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 3, dtype family float, shape (2, 4, 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)

# Construct a small valid tensor for 'r'
# The function expects r to have shape (batch, n, n) based on usage in sinkhorn_sorting_operator
# which indexes r with dim=1 and dim=2
batch_size = 2
n = 4
r = torch.rand(batch_size, n, n, dtype=torch.float32)

ARGS = {
    "r": r,
    "n_iters": 8,
    "temperature": 0.7,
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 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
hf_bucket_url Ran
ran; our contract draft was wrong, not the code
Soikonomou/albert_final/src/model/ALBERT/file_utils.py
code served (permissive licence) · get_code("b2be6c932ce41084")
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

ARGS = {
    'identifier': 'bert-base-uncased',
    'postfix': 'pytorch_model.bin',
    'cdn': 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 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
is_remote_url Ran
ran, violated the contract we drafted
Soikonomou/albert_final/src/model/ALBERT/file_utils.py
code served (permissive licence) · get_code("4381d1f588a7f42a")
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
from urllib.parse import urlparse

ARGS = {
    'url_or_filename': 'https://example.com/model.pth'
}
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
load_pickle Ran
ran; our contract draft was wrong, not the code
cypressd1999/FYP_2021/src/tasks/infer.py
code served (permissive licence) · get_code("bb4b4b5ebab73228")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 pickle
import os
import tempfile

# Create a temporary directory and file to simulate the data directory structure
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create a sample pickle file
test_filename = 'test_data.pkl'
test_data = {'key1': 'value1', 'key2': [1, 2, 3], 'key3': {'nested': 'dict'}}
complete_path = os.path.join(data_dir, test_filename)

with open(complete_path, 'wb') as f:
    pickle.dump(test_data, f)

# Change the working directory temporarily or modify the function's expected path
# Since the function looks for './data/', we need to set up the directory structure
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'filename': test_filename
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 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
load_pickle Ran
ran; our contract draft was wrong, not the code
cypressd1999/FYP_2021/src/misc.py
code served (permissive licence) · get_code("67bc2e6f6f0fb28d")
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 os
import pickle
import tempfile
import shutil

# Create a temporary directory to serve as './data/'
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create a sample pickle file
sample_data = {'key': 'value', 'number': 42, 'list': [1, 2, 3]}
pickle_filename = 'sample.pkl'
pickle_path = os.path.join(data_dir, pickle_filename)
with open(pickle_path, 'wb') as f:
    pickle.dump(sample_data, f)

# Change to the temporary directory so './data/' is accessible
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'filename': 'sample.pkl'
}
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 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
load_state Ran
ran on a synthesized input
cypressd1999/FYP_2021/src/train_funcs.py
code served (permissive licence) · get_code("203cc08d9f87f46e")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a minimal nn.Module that has load_state_dict method
class MinimalNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal optimizer
net = MinimalNet()
optimizer = torch.optim.SGD(net.parameters(), lr=0.01)

# Create a minimal scheduler
scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=1)

# Create args object with model_no attribute
class Args:
    def __init__(self):
        self.model_no = 42

args = Args()

# Define ARGS dictionary with all parameters
ARGS = {
    'net': net,
    'optimizer': optimizer,
    'scheduler': scheduler,
    'args': args,
    'load_best': 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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
load_state Ran
ran on a synthesized input
cypressd1999/FYP_2021/src/tasks/train_funcs.py
code served (permissive licence) · get_code("87f6efb51cc0c000")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import StepLR

torch.manual_seed(0)

# Create a minimal neural network
class MinimalNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model, optimizer, and scheduler
net = MinimalNet()
optimizer = optim.SGD(net.parameters(), lr=0.01)
scheduler = StepLR(optimizer, step_size=1)

# Create args object with model_no attribute
class Args:
    def __init__(self):
        self.model_no = 42

args = Args()

ARGS = {
    'net': net,
    'optimizer': optimizer,
    'scheduler': scheduler,
    'args': args,
    'load_best': 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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
load_tf_weights_in_bert Ran
ran; our contract draft was wrong, not the code
Soikonomou/bert_new/src/model/BERT/modeling_bert.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from tanmay1618/text_to_sql_bert, is pointer only (licence: NONE) · get_code("0c145728a35789fa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from tanmay1618/text_to_sql_bert, and GitHub detected no licence in that repository when it was checked. 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.

load_vocab Ran
ran on a synthesized input
kpe/bert-for-tf2/bert/tokenization/bert_tokenization.py
code served (permissive licence) · get_code("30b05f2a415dd132")
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 OrderedDict. 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 collections
import six
import tempfile
import os

# Create a temporary vocabulary file
temp_dir = tempfile.mkdtemp()
vocab_file = os.path.join(temp_dir, "vocab.txt")

# Write a small vocabulary file
vocab_content = "hello\nworld\n[CLS]\n[SEP]\n[UNK]\n"
with open(vocab_file, 'w') as f:
    f.write(vocab_content)

ARGS = {
    'vocab_file': vocab_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
load_vocab Ran
ran; our contract draft was wrong, not the code
Soikonomou/bert_new/src/model/BERT/tokenization_bert.py
code served (permissive licence) · get_code("659f3761c1dc81fa")
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 OrderedDict. 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 collections
import tempfile
import os

# Create a temporary vocab file
temp_dir = tempfile.mkdtemp()
vocab_file = os.path.join(temp_dir, "vocab.txt")

# Write sample vocab entries to the file
with open(vocab_file, 'w', encoding='utf-8') as f:
    f.write("[PAD]\n")
    f.write("[UNK]\n")
    f.write("[CLS]\n")
    f.write("[SEP]\n")
    f.write("the\n")
    f.write("quick\n")
    f.write("brown\n")

ARGS = {
    "vocab_file": vocab_file
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
map_from_stock_variale_name Ran
ran on a synthesized input
kpe/bert-for-tf2/bert/loader.py
code served (permissive licence) · get_code("8a6e1a7c602e8104")
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

torch.manual_seed(0)

ARGS = {
    'name': 'bert/encoder/layer_0/attention/self/query:0',
    'prefix': 'bert'
}
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
map_to_stock_variable_name Ran
ran on a synthesized input
kpe/bert-for-tf2/bert/loader.py
code served (permissive licence) · get_code("d05c370def845f01")
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

# Analyze the function: map_to_stock_variable_name(name, prefix='bert')
# The function takes:
# - name: a string that gets split by ':' and '/'
# - prefix: a string (default 'bert') that gets split by '/'
# 
# The function performs string operations: split, comparison, join
# No complex objects are needed, just strings

# Test case 1: A valid embeddings path that should return a mapped name
name_1 = "bert/embeddings/word_embeddings/values:0"
prefix_1 = "bert"

# Test case 2: Another valid encoder path
name_2 = "bert/encoder/layer/0/intermediate/dense/kernel:0"
prefix_2 = "bert"

# Let's use one of these test cases for ARGS
ARGS = {
    "name": "bert/embeddings/word_embeddings/values:0",
    "prefix": "bert"
}
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

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("1909.11942").

Also present in other papers' code

Of 126 samples lifted from this paper's linked repositories, 126 carry a function identity and 0 do not. Of the 119 distinct functions with an identity, 37 are also present in other papers whose code we hold (28 with at least one paper dated earlier, 10 the same month, 33 later) and 82 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
gelu
brick of this paper's assembly: helper
198 other papers
18 dated earlier, 7 the same month, 173 later · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
url_to_filename 48 other papers
9 dated earlier, 1 the same month, 38 later · 8 only as an assembly brick
1610.02424 (2016-10)
Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 45 more not named here
whitespace_tokenize 43 other papers
3 dated earlier, 40 later
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
and 40 more not named here
convert_to_unicode 36 other papers
10 dated earlier, 26 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 33 more not named here
printable_text 33 other papers
10 dated earlier, 23 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 30 more not named here
get_activation
brick of this paper's assembly: helper
32 other papers
11 dated earlier, 2 the same month, 19 later · 1 only as an assembly brick
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 29 more not named here
load_vocab 29 other papers
1 dated earlier, 28 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
2006.04884 (2020-06)
On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines
and 26 more not named here
prune_linear_layer 29 other papers
3 dated earlier, 1 the same month, 25 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.08230 (2019-06)
Evaluating Protein Transfer Learning with TAPE
1906.08237 (2019-06)
XLNet: Generalized Autoregressive Pretraining for Language Understanding
and 26 more not named here
merge 28 other papers
15 dated earlier, 13 later
1406.1078 (2014-06)
Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation
1409.3215 (2014-09)
Sequence to Sequence Learning with Neural Networks
1512.00567 (2015-12)
Rethinking the Inception Architecture for Computer Vision
and 25 more not named here
gelu
brick of this paper's assembly: helper
26 other papers
8 dated earlier, 2 the same month, 16 later · 4 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 23 more not named here
gelu_new 23 other papers
1 dated earlier, 22 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1911.03631 (2019-11)
Hierarchical Graph Network for Multi-hop Question Answering
2002.10345 (2020-02)
Improving BERT Fine-Tuning via Self-Ensemble and Self-Distillation
and 20 more not named here
top_k_top_p_filtering 21 other papers
21 later
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
2009.06367 (2020-09)
GeDi: Generative Discriminator Guided Sequence Generation
2104.04039 (2021-04)
Plug-and-Blend: A Framework for Controllable Story Generation with Blended Control Codes
and 18 more not named here
load_tf_weights_in_bert 19 other papers
2 dated earlier, 17 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1902.01069 (2019-02)
A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization
2002.01808 (2020-02)
K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapters
and 16 more not named here
prune_conv1d_layer 16 other papers
1 dated earlier, 1 the same month, 14 later
1906.08237 (2019-06)
XLNet: Generalized Autoregressive Pretraining for Language Understanding
1909.05311 (2019-09)
Graph-Based Reasoning over Heterogeneous External Knowledge for Commonsense Question Answering
1911.00720 (2019-11)
ZEN: Pre-training Chinese Text Encoder Enhanced by N-gram Representations
and 13 more not named here
create_int_feature 13 other papers
3 dated earlier, 1 the same month, 9 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.05474 (2019-06)
Transfer Learning in Biomedical Natural Language Processing: An Evaluation of BERT and ELMo on Ten Benchmarking Datasets
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
and 10 more not named here
url_to_filename 12 other papers
12 later
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
2009.06978 (2020-09)
Dialogue Response Ranking Training with Large-Scale Human Feedback Data
and 9 more not named here
moore_penrose_iter_pinv
brick of this paper's assembly: helper
11 other papers
11 later · 2 only as an assembly brick
2102.03902 (2021-02)
Nyströmformer: A Nyström-Based Algorithm for Approximating Self-Attention
2306.08330 (2023-06)
Multimodal Optimal Transport-based Co-Attention Transformer with Global Structure Consistency for Survival Prediction
2307.15254 (2023-07)
Multiple Instance Learning Framework with Masked Hard Instance Mining for Whole Slide Image Classification
and 8 more not named here
create_float_feature 9 other papers
2 dated earlier, 1 the same month, 6 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
1909.06356 (2019-09)
Addressing Semantic Drift in Question Generation for Semi-Supervised Question Answering
and 6 more not named here
LayerNorm
brick of this paper's assembly: helper
8 other papers
2 dated earlier, 6 later · 6 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2103.04256 (2021-03)
Robust Point Cloud Registration Framework Based on Deep Graph Matching
and 5 more not named here
hf_bucket_url 8 other papers
8 later
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
2009.12719 (2020-09)
Stylized Dialogue Response Generation Using Stylized Unpaired Texts
and 5 more not named here

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

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

More are linked than shown here.

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

Abstract

Increasing model size when pretraining natural language representations often results in improved performance on downstream tasks. However, at some point further model increases become harder due to GPU/TPU memory limitations and longer training times. To address these problems, we present two parameterreduction techniques to lower memory consumption and increase the training speed of BERT (Devlin et al., 2019). Comprehensive empirical evidence shows that our proposed methods lead to models that scale much better compared to the original BERT. We also use a self-supervised loss that focuses on modeling inter-sentence coherence, and show it consistently helps downstream tasks with multi-sentence inputs. As a result, our best model establishes new state-of-the-art results on the GLUE, RACE, and SQuAD benchmarks while having fewer parameters compared to BERT-large. The code and the pretrained models are available at https://github.com/google-research/ALBERT. * Work done as an intern at Google Research, driving data processing and downstream task evaluations.

For agents

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

get_harvested_code_for_paper("1909.11942")
get_code_for_paper("1909.11942")
have("1909.11942")

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

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

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

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

Connect an agent — have() is free.