SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1802.05365 · NAACL · 2018

Deep contextualized word representations

Matthew Peters, Luke Zettlemoyer, Kenton Lee, Christopher Clark, Matt Gardner, Mark Neumann

arXiv · PDF · Open in the Atlas

Code that ran

30 of 58 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (12 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 21 have no contract verdict; 7 failures of our instrument; 28 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1802.05365.json · badge: /api/ran/1802.05365.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
griff4692/LMC community
Papers with Code archive
6 ran · 1 no recorded run
UKPLab/elmo-bilstm-cnn-crf community (classifier label)
classifier basis not recorded on the link
5 ran · 5 no recorded run
HIT-SCIR/ELMoForManyLangs community
Papers with Code archive
4 ran · 3 no recorded run
kafura-kafiri/tf2-elmo community
Papers with Code archive
4 ran · 1 no recorded run
iliaschalkidis/ELMo-keras community
Papers with Code archive
4 ran · 1 no recorded run
helboukkouri/character-bert community
Papers with Code archive
3 ran · 3 no recorded run
ankurbanga/Language-Models community
Papers with Code archive
2 ran · 0 no recorded run
sarveshsparab/DeepElmoEmbedNer community
not in the paper's declared repositories
1 ran · 1 no recorded run
menajosep/AleatoricSent community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
allenai/bilm-tf community (classifier label)
classifier basis not recorded on the link
0 ran · 3 no recorded run
shaneding/bilm-tf-experimentation community
not in the paper's declared repositories
0 ran · 2 no recorded run
weixsong/bilm-tf community
not in the paper's declared repositories
0 ran · 2 no recorded run
YC-wind/embedding_study community
Papers with Code archive
0 ran · 2 no recorded run
yuanjing-zhu/elmo community
not in the paper's declared repositories
0 ran · 2 no recorded run
shelleyHLX/bilm_EMLo community
not in the paper's declared repositories
0 ran · 1 no recorded run
mingdachen/bilm-tf community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Camouflage Ran
ran on a synthesized input
kafura-kafiri/tf2-elmo/elmo/model.py
pointer only (licence: NONE) · get_code("ec674c5b8eeb7958")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kafura-kafiri/tf2-elmo 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.

Camouflage Ran
ran on a synthesized input · constructed an object; no result was computed
iliaschalkidis/ELMo-keras/elmo/model.py
pointer only (licence: NONE) · get_code("2db008c201204db6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, iliaschalkidis/ELMo-keras 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.

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

import torch
import numpy as np
from typing import Dict, List

# Call torch.manual_seed for reproducibility
torch.manual_seed(0)

# Define ARGS dict mapping every parameter of CharacterMapper.__init__ to a value
ARGS = {
    "tokens_to_add": {
        "special_token_1": 262,
        "special_token_2": 263,
        "special_token_3": 264
    }
}
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 CharacterMapper — 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 CharacterMapper 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
ELMo Ran
ran on a synthesized input · constructed an object; no result was computed
ankurbanga/Language-Models/ELMo/classes.py
pointer only (licence: NONE) · get_code("ea8c1ff4812c12cc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ankurbanga/Language-Models 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.

Highway Ran
ran on a synthesized input · constructed an object; no result was computed
helboukkouri/character-bert/modeling/character_bert.py
code served (permissive licence) · get_code("cc42189423d63e55")
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, Highway: 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.functional as F

torch.manual_seed(0)

ARGS = {
    'input_dim': 4,
    'num_layers': 2,
    'activation': torch.nn.functional.relu,
}
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 Highway — 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 Highway 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
Highway Ran
ran on a synthesized input · constructed an object; no result was computed
kafura-kafiri/tf2-elmo/elmo/model.py
pointer only (licence: NONE) · get_code("e498f306dc760a89")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kafura-kafiri/tf2-elmo 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.

Highway Ran
ran on a synthesized input · constructed an object; no result was computed
iliaschalkidis/ELMo-keras/elmo/model.py
pointer only (licence: NONE) · get_code("57cb734e9a401a27")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, iliaschalkidis/ELMo-keras 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.

LMCDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("70c6e34d2c59e6e0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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.

LMCEncoder Ran
ran on a synthesized input
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("6fdb9503aabdabb0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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.

SampledSoftmax Ran
ran on a synthesized input · constructed an object; no result was computed
kafura-kafiri/tf2-elmo/elmo/model.py
pointer only (licence: NONE) · get_code("6c53dd25c20f1f9e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kafura-kafiri/tf2-elmo 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.

SampledSoftmax Ran
ran on a synthesized input · constructed an object; no result was computed
iliaschalkidis/ELMo-keras/elmo/model.py
pointer only (licence: NONE) · get_code("e8b8fec264f99c0c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, iliaschalkidis/ELMo-keras 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.

TimestepDropout Ran
ran on a synthesized input · constructed an object; no result was computed
kafura-kafiri/tf2-elmo/elmo/model.py
pointer only (licence: NONE) · get_code("a06d5cf0563d37c9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kafura-kafiri/tf2-elmo 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.

TimestepDropout Ran
ran on a synthesized input · constructed an object; no result was computed
iliaschalkidis/ELMo-keras/elmo/model.py
pointer only (licence: NONE) · get_code("16b8442b08116955")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, iliaschalkidis/ELMo-keras 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.

_EncoderBase Ran
ran on a synthesized input
HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py
code served (permissive licence) · get_code("f4857820f24ff7ee")
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 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
import torch.nn as nn
from torch.autograd import Variable
from torch.nn.utils.rnn import PackedSequence, pad_packed_sequence, pack_padded_sequence

# Copy the helper functions and class from the provided code
RnnState = torch.Tensor | tuple[torch.Tensor, torch.Tensor]
RnnStateStorage = tuple[torch.Tensor, ...]

def get_lengths_from_binary_sequence_mask(mask: torch.Tensor):
    return mask.long().sum(-1)

def sort_batch_by_length(tensor: Variable, sequence_lengths: Variable):
    if not isinstance(tensor, Variable) or not isinstance(sequence_lengths, Variable):
        raise Exception('Both the tensor and sequence lengths must be torch.autograd.Variables.')
    sorted_sequence_lengths, permutation_index = sequence_lengths.sort(0, descending=True)
    sorted_tensor = tensor.index_select(0, permutation_index)
    index_range = sequence_lengths.data.clone().copy_(torch.arange(0, len(sequence_lengths)))
    index_range = Variable(index_range.long())
    _, reverse_mapping = permutation_index.sort(0, descending=False)
    restoration_indices = index_range.index_select(0, reverse_mapping)
    return (sorted_tensor, sorted_sequence_lengths, restoration_indices, permutation_index)

class _EncoderBase(nn.Module):
    def __init__(self, stateful: bool = False) -> None:
        super(_EncoderBase, self).__init__()
        self.stateful = stateful
        self._states: RnnStateStorage | None = None

    def sort_and_run_forward(self, module, inputs: torch.Tensor, mask: torch.Tensor, hidden_state: RnnState | None = None):
        batch_size, sequence_length, _ = inputs.size()
        lengths = get_lengths_from_binary_sequence_mask(mask)
        
        sorted_inputs, sorted_lengths, restoration_indices, permutation_index = sort_batch_by_length(
            Variable(inputs), Variable(lengths)
        )
        
        packed_inputs = pack_padded_sequence(
            sorted_inputs, sorted_lengths.data.cpu().numpy(), batch_first=True
        )
        
        module_output = module(packed_inputs, hidden_state)
        
        if isinstance(module_output, tuple):
            sorted_output, output_hidden_state = module_output
            if isinstance(sorted_output, PackedSequence):
                sorted_output, _ = pad_packed_sequence(sorted_output, batch_first=True)
        else:
            sorted_output = module_output
            output_hidden_state = None
        
        unsorted_output = sorted_output.index_select(0, restoration_indices)
        
        return unsorted_output, output_hidden_state, restoration_indices

# Create a simple mock RNN module for testing
class MockRNNModule(nn.Module):
    def __init__(self, input_size: int, hidden_size: int):
        super().__init__()
        self.rnn = nn.LSTM(input_size, hidden_size, batch_first=True)
    
    def forward(self, packed_input: PackedSequence, hidden_state=None):
        output, (h_n, c_n) = self.rnn(packed_input, hidden_state)
        return output, (h_n, c_n)

# Define INIT_ARGS for _EncoderBase
INIT_ARGS = {
    'stateful': False
}

# Define ARGS for sort_and_run_forward method
ARGS = {
    'module': MockRNNModule(input_size=4, hidden_size=3),
    'inputs': torch.randn(2, 5, 4),  # batch_size=2, seq_len=5, input_size=4
    'mask': torch.ones(2, 5, dtype=torch.bool),  # batch_size=2, seq_len=5
    'hidden_state': None
}

METHOD = 'sort_and_run_forward'

# Construct and call the class
if __name__ == '__main__':
    encoder = _EncoderBase(**INIT_ARGS)
    result = getattr(encoder, METHOD)(**ARGS)
    print("Output shape:", result[0].shape)
    print("Restoration indices shape:", result[2].shape)
    print("Test passed!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_make_bos_eos Ran
ran, honoured the contract we drafted
helboukkouri/character-bert/modeling/character_bert.py
code served (permissive licence) · get_code("348cfec97eece7e0")
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 torch

ARGS = {
    "character": 5,
    "padding_character": 0,
    "beginning_of_word_character": 1,
    "end_of_word_character": 2,
    "max_word_length": 10,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, 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
_pretrained_initializer Ran
ran on a synthesized input
sarveshsparab/DeepElmoEmbedNer/model/bilm/model.py
pointer only (licence: NONE) · get_code("c1a15b755efa2454")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sarveshsparab/DeepElmoEmbedNer 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.

biLM Ran
ran on a synthesized input · constructed an object; no result was computed
ankurbanga/Language-Models/ELMo/classes.py
pointer only (licence: NONE) · get_code("7d29ba86c14005e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ankurbanga/Language-Models 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.

compute_f1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
UKPLab/elmo-bilstm-cnn-crf/util/BIOF1Validation.py
code served (permissive licence) · get_code("a2735b43c037f7c3")
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 numpy as np

# Build arguments for compute_f1

# predictions: list of sentences, each sentence is a list of label indices
predictions = [
    [0, 1, 2, 0, 1],  # sentence 1: 5 tokens with label indices
    [1, 1, 0, 2, 2],  # sentence 2: 5 tokens with label indices
]

# correct: list of sentences, each sentence is a list of label indices (ground truth)
correct = [
    [0, 1, 1, 0, 1],  # sentence 1: correct labels
    [1, 1, 0, 2, 2],  # sentence 2: correct labels
]

# idx2Label: mapping from label index to label string in BIO format
idx2Label = {
    0: 'O',
    1: 'B-PER',
    2: 'I-PER',
}

# correctBIOErrors: how to correct BIO encoding errors ('B', 'O', or 'No')
correctBIOErrors = 'No'

# encodingScheme: the encoding scheme used ('BIO', 'IOB', or 'IOBES')
encodingScheme = 'BIO'

ARGS = {
    'predictions': predictions,
    'correct': correct,
    'idx2Label': idx2Label,
    'correctBIOErrors': correctBIOErrors,
    'encodingScheme': encodingScheme,
}
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 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
compute_kl Ran
ran; our contract draft was wrong, not the code
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("e6951eb47d3fce83")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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.

compute_precision_token_basis Ran
ran on a synthesized input
UKPLab/elmo-bilstm-cnn-crf/util/BIOF1Validation.py
code served (permissive licence) · get_code("6e5cd3fa57bb3c06")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - guessed_sentences: list of sentences, each sentence is a list of labels
# - correct_sentences: list of sentences, each sentence is a list of labels
# - O_Label: a label value to filter out (typically "O" for outside in NER)
# The function compares tokens between guessed and correct sentences,
# counting precision for non-O labels

# Create sample data
guessed_sentences = [
    ["B-PER", "I-PER", "O", "B-LOC"],
    ["O", "B-ORG", "I-ORG", "O"]
]

correct_sentences = [
    ["B-PER", "I-PER", "O", "B-LOC"],
    ["O", "B-ORG", "B-ORG", "O"]
]

O_Label = "O"

ARGS = {
    "guessed_sentences": guessed_sentences,
    "correct_sentences": correct_sentences,
    "O_Label": O_Label
}
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 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
dimensions_equal Ran
ran on a synthesized input
menajosep/AleatoricSent/Cove-BCN/model.py
code served (permissive licence) · get_code("c86e700a6dce3870")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# The function `dimensions_equal` takes two parameters: dim1 and dim2
# It zips them together and compares each pair of dimensions
# Both parameters should be iterable collections of dimension values (like tuples or lists)

# Create two dimension tuples with matching lengths but different values to test the logic
dim1 = (2, 4, 6, 8)
dim2 = (2, 4, 6, 8)

ARGS = {
    "dim1": dim1,
    "dim2": dim2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getCasing Ran
ran on a synthesized input
UKPLab/elmo-bilstm-cnn-crf/util/preprocessing.py
code served (permissive licence) · get_code("d3126a60257f6f1d")
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 = {
    'word': 'Hello123'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_dropout_mask Ran
ran; our contract draft was wrong, not the code
HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py
code served (permissive licence) · get_code("96ea7959d6f99e2d")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor for masking
# The function uses: tensor_for_masking.clone(), tensor_for_masking.size()
# So we need a torch.autograd.Variable (or modern tensor which is Variable-like)
tensor_for_masking = torch.randn(2, 4, requires_grad=True)

# dropout_probability should be a float between 0 and 1
dropout_probability = 0.5

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

import torch

torch.manual_seed(0)

# Create a small binary mask tensor of shape (batch_size=2, sequence_length=4)
# The mask should contain binary values (0s and 1s)
mask = torch.tensor([
    [1, 1, 1, 0],
    [1, 1, 0, 0]
], dtype=torch.float32)

ARGS = {
    "mask": mask
}
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 Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
kl_diag Ran
ran; our contract draft was wrong, not the code
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("c5414c47b19c5b9d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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.

kl_spher Ran
ran, honoured the contract we drafted
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("da08f69778aa9246")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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.

loadDatasetPickle Ran
ran on a synthesized input
UKPLab/elmo-bilstm-cnn-crf/util/preprocessing.py
code served (permissive licence) · get_code("1e0cc173e3f36bb5")
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 pickle as pkl
import tempfile
import os

# Create a temporary pickle file with the expected structure
temp_dir = tempfile.gettempdir()
pickle_path = os.path.join(temp_dir, "test_embeddings.pkl")

# Create mock data structure that matches what the function expects
mock_data = {
    'mappings': {
        'word2idx': {'hello': 0, 'world': 1},
        'idx2word': {0: 'hello', 1: 'world'}
    },
    'data': {
        'train': [(0, 1), (1, 0)],
        'test': [(0, 1)],
        'val': [(1, 0)]
    }
}

# Write the pickle file
with open(pickle_path, 'wb') as f:
    pkl.dump(mock_data, f)

ARGS = {
    'embeddingsPickle': pickle_path
}
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 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
mask_2D Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("951dfc35f0d874b9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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.

readCoNLL Ran
ran on a synthesized input
UKPLab/elmo-bilstm-cnn-crf/util/CoNLL.py
code served (permissive licence) · get_code("be7d0a8320f50877")
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 tempfile
import os

# Create a temporary CoNLL file for testing
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.conll")

# Write sample CoNLL data
conll_content = """1	The	DT	O
2	cat	NN	B-ANIMAL
3	sat	VBD	O

4	Dogs	NNS	B-ANIMAL
5	run	VBP	O

# This is a comment
6	Birds	NNS	B-ANIMAL
7	fly	VBP	O
"""

with open(temp_file, 'w') as f:
    f.write(conll_content)

# Define the arguments
ARGS = {
    'inputPath': temp_file,
    'cols': {0: 'id', 1: 'form', 2: 'pos', 3: 'ner_BIO'},
    'commentSymbol': '#'
}
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 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
sort_batch_by_length Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py
code served (permissive licence) · get_code("3858ae2af0c25703")
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 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
from torch.autograd import Variable

torch.manual_seed(0)

# Create a batch first tensor with shape (batch_size=2, sequence_length=4, features=3)
tensor_data = torch.randn(2, 4, 3)
tensor = Variable(tensor_data, requires_grad=True)

# Create sequence lengths for each item in the batch
sequence_lengths_data = torch.LongTensor([4, 2])
sequence_lengths = Variable(sequence_lengths_data)

ARGS = {
    "tensor": tensor,
    "sequence_lengths": sequence_lengths
}
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 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
BertCharacterEmbeddings Not yet run
unverified (harvested, no recorded run)
helboukkouri/character-bert/modeling/character_bert.py
code served (permissive licence) · get_code("bd90a33e1d9f21db")
How it ran

no invocation recorded.

BidirectionalLanguageModelGraph Not yet run
unverified (harvested, no recorded run)
shaneding/bilm-tf-experimentation/bilm/model.py
code served (permissive licence) · get_code("4054d9b3dbaf33ca")
How it ran

no invocation recorded.

BidirectionalLanguageModelGraph Not yet run
unverified (harvested, no recorded run)
shelleyHLX/bilm_EMLo/bilm_model/model.py
code served (permissive licence) · get_code("103b3a72b5b4b48b")
How it ran

no invocation recorded.

BidirectionalLanguageModelGraph Not yet run
unverified (harvested, no recorded run)
weixsong/bilm-tf/bilm/model.py
code served (permissive licence) · get_code("578b19fe4c168fa3")
How it ran

no invocation recorded.

BidirectionalLanguageModelGraph Not yet run
unverified (harvested, no recorded run)
sarveshsparab/DeepElmoEmbedNer/model/bilm/model.py
pointer only (licence: NONE) · get_code("c0a935408017d8e6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sarveshsparab/DeepElmoEmbedNer 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. No invocation recorded.

CharCNNEmbedding Not yet run
unverified (harvested, no recorded run)
YC-wind/embedding_study/ELMO/models/elmo.py
pointer only (licence: NONE) · get_code("cb17b856cfa85229")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, YC-wind/embedding_study 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. No invocation recorded.

CharacterBertModel Not yet run
unverified (harvested, no recorded run)
helboukkouri/character-bert/modeling/character_bert.py
code served (permissive licence) · get_code("a6db9151ad861684")
How it ran

no invocation recorded.

CharacterCNN Not yet run
unverified (harvested, no recorded run)
helboukkouri/character-bert/modeling/character_bert.py
code served (permissive licence) · get_code("95c7c1548e5263c4")
How it ran

no invocation recorded.

ELMO Not yet run
unverified (harvested, no recorded run)
yuanjing-zhu/elmo/Models/eLMO.py
pointer only (licence: NONE) · get_code("9cc83b5b233b4295")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yuanjing-zhu/elmo 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. No invocation recorded.

ELMO Not yet run
unverified (harvested, no recorded run)
YC-wind/embedding_study/ELMO/models/elmo.py
pointer only (licence: NONE) · get_code("6c990d1c4cc7d791")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, YC-wind/embedding_study 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. No invocation recorded.

ELMo Not yet run
unverified (harvested, no recorded run)
kafura-kafiri/tf2-elmo/elmo/model.py
pointer only (licence: NONE) · get_code("c0aa2bc72c66ae0c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kafura-kafiri/tf2-elmo 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. No invocation recorded.

ELMo Not yet run
unverified (harvested, no recorded run)
iliaschalkidis/ELMo-keras/elmo/model.py
pointer only (licence: NONE) · get_code("5a6bde73a5e69f0d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, iliaschalkidis/ELMo-keras 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. No invocation recorded.

ElmobiLm Not yet run
unverified (harvested, no recorded run)
HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py
code served (permissive licence) · get_code("8deb52d79571d50a")
How it ran

no invocation recorded.

InvalidNumberOfCharacters Not yet run
unverified (harvested, no recorded run)
weixsong/bilm-tf/bilm/model.py
code served (permissive licence) · get_code("13e6f293af47814a")
How it ran

no invocation recorded.

LMC Not yet run
unverified (harvested, no recorded run)
griff4692/LMC/modules/lmc/lmc_model.py
pointer only (licence: NONE) · get_code("26c29c99ec231df8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, griff4692/LMC 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. No invocation recorded.

LstmCellWithProjection Not yet run
unverified (harvested, no recorded run)
HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py
code served (permissive licence) · get_code("6558e478056b71fa")
How it ran

no invocation recorded.

_pretrained_initializer Not yet run
unverified (harvested, no recorded run)
shaneding/bilm-tf-experimentation/bilm/model.py
code served (permissive licence) · get_code("0a6a6b9c70afd92f")
How it ran

no invocation recorded.

average_gradients Not yet run
unverified (harvested, no recorded run)
allenai/bilm-tf/bilm/training.py
code served (permissive licence) · get_code("821ed0b50fc8c75a")
How it ran

no invocation recorded.

block_orthogonal Not yet run
unverified (harvested, no recorded run)
HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py
code served (permissive licence) · get_code("e5d0679ff3b7299a")
How it ran

no invocation recorded.

clip_by_global_norm_summary Not yet run
unverified (harvested, no recorded run)
allenai/bilm-tf/bilm/training.py
code served (permissive licence) · get_code("4fd105ebfe01259d")
How it ran

no invocation recorded.

compute_f1_token_basis Not yet run
unverified (harvested, no recorded run)
UKPLab/elmo-bilstm-cnn-crf/util/BIOF1Validation.py
code served (permissive licence) · get_code("1b66320c71babcd2")
How it ran

no invocation recorded.

loss Not yet run
unverified (harvested, no recorded run)
yuanjing-zhu/elmo/Models/eLMO.py
pointer only (licence: NONE) · get_code("893138168f6ab89b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yuanjing-zhu/elmo 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. No invocation recorded.

path_energy Not yet run
unverified (harvested, no recorded run)
UKPLab/elmo-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py
code served (permissive licence) · get_code("6f5b259e1a881655")
How it ran

no invocation recorded.

path_energy0 Not yet run
unverified (harvested, no recorded run)
UKPLab/elmo-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py
code served (permissive licence) · get_code("e13517b914ec8cfe")
How it ran

no invocation recorded.

perpareDataset Not yet run
unverified (harvested, no recorded run)
UKPLab/elmo-bilstm-cnn-crf/util/preprocessing.py
code served (permissive licence) · get_code("f6ef407ec5c308ae")
How it ran

no invocation recorded.

sparse_chain_crf_loss Not yet run
unverified (harvested, no recorded run)
UKPLab/elmo-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py
code served (permissive licence) · get_code("29092b6b1ee0e8b7")
How it ran

no invocation recorded.

summary_gradient_updates Not yet run
unverified (harvested, no recorded run)
allenai/bilm-tf/bilm/training.py
code served (permissive licence) · get_code("805b441d558f95ba")
How it ran

no invocation recorded.

weight_layers Not yet run
unverified (harvested, no recorded run)
mingdachen/bilm-tf/bilm/elmo.py
code served (permissive licence) · get_code("4fedf7f6b4d9dbba")
How it ran

no invocation recorded.

Also present in other papers' code

Of 58 samples lifted from this paper's linked repositories, 58 carry a function identity and 0 do not. Of the 57 distinct functions with an identity, 7 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 6 later) and 50 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
path_energy 2 other papers
1 dated earlier, 1 later
1603.01360 (2016-03)
Neural Architectures for Named Entity Recognition
1803.09578 (2018-03)
Why Comparing Single Performance Scores Does Not Allow to Draw Conclusions About Machine Learning Approaches
path_energy0 2 other papers
1 dated earlier, 1 later
1603.01360 (2016-03)
Neural Architectures for Named Entity Recognition
1803.09578 (2018-03)
Why Comparing Single Performance Scores Does Not Allow to Draw Conclusions About Machine Learning Approaches
sparse_chain_crf_loss 2 other papers
1 dated earlier, 1 later
1603.01360 (2016-03)
Neural Architectures for Named Entity Recognition
1803.09578 (2018-03)
Why Comparing Single Performance Scores Does Not Allow to Draw Conclusions About Machine Learning Approaches
SampledSoftmax
brick of this paper's assembly: loss
1 other paper
1 dated earlier · 1 only as an assembly brick
1609.07843 (2016-09)
Pointer Sentinel Mixture Models
compute_f1 1 other paper
1 later
1803.09578 (2018-03)
Why Comparing Single Performance Scores Does Not Allow to Draw Conclusions About Machine Learning Approaches
compute_f1_token_basis 1 other paper
1 later
1803.09578 (2018-03)
Why Comparing Single Performance Scores Does Not Allow to Draw Conclusions About Machine Learning Approaches
compute_precision_token_basis 1 other paper
1 later
1803.09578 (2018-03)
Why Comparing Single Performance Scores Does Not Allow to Draw Conclusions About Machine Learning Approaches

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

Repositories linked to this paper

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

We introduce a new type of deep contextualized word representation that models both (1) complex characteristics of word use (e.g., syntax and semantics), and (2) how these uses vary across linguistic contexts (i.e., to model polysemy). Our word vectors are learned functions of the internal states of a deep bidirectional language model (biLM), which is pretrained on a large text corpus. We show that these representations can be easily added to existing models and significantly improve the state of the art across six challenging NLP problems, including question answering, textual entailment and sentiment analysis. We also present an analysis showing that exposing the deep internals of the pre-trained network is crucial, allowing downstream models to mix different types of semi-supervision signals.

For agents

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

get_harvested_code_for_paper("1802.05365")
get_code_for_paper("1802.05365")
have("1802.05365")

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

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

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

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

Connect an agent — have() is free.