SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.03688 · 2019

ConveRT: Efficient and Accurate Conversational Representations from Transformers

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/1911.03688.json · badge: /api/ran/1911.03688.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
phamnam-mta/ConveRT-PolyAI-Vietnamese community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
jordiclive/Convert-PolyAI-Torch community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
koujm/convert-tf community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
FunctionStatusWhere it lives
batching_input_features Ran
ran on a synthesized input
phamnam-mta/ConveRT-PolyAI-Vietnamese/convert/dataset.py
code served (permissive licence) · get_code("3543ec8352987ea8")
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 EncoderInputFeature. 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 dataclasses import dataclass

torch.manual_seed(0)

@dataclass
class EncoderInputFeature:
    input_ids: torch.Tensor
    attention_mask: torch.Tensor
    position_ids: torch.Tensor
    input_lengths: torch.Tensor
    pretrain_embed: torch.Tensor

    def pad_sequence(self, seq_len: int):
        from torch.nn.functional import pad
        self.input_ids = pad(self.input_ids, [0, seq_len - self.input_ids.size(0)], 'constant', 0)
        self.attention_mask = pad(self.attention_mask, [0, seq_len - self.attention_mask.size(0)], 'constant', 0)
        self.position_ids = pad(self.position_ids, [0, seq_len - self.position_ids.size(0)], 'constant', 0)
        self.pretrain_embed = pad(self.pretrain_embed, [0, 0, 0, seq_len - self.pretrain_embed.size(0)], 'constant', 0)

    def to(self, device: torch.device) -> 'EncoderInputFeature':
        return EncoderInputFeature(
            input_ids=self.input_ids.to(device),
            attention_mask=self.attention_mask.to(device),
            position_ids=self.position_ids.to(device),
            input_lengths=self.input_lengths.to(device),
            pretrain_embed=self.pretrain_embed.to(device)
        )

# Create sample EncoderInputFeature instances with different sequence lengths
encoder_input_1 = EncoderInputFeature(
    input_ids=torch.randint(0, 100, (3,)),
    attention_mask=torch.ones(3),
    position_ids=torch.arange(3),
    input_lengths=torch.tensor(3),
    pretrain_embed=torch.randn(3, 4)
)

encoder_input_2 = EncoderInputFeature(
    input_ids=torch.randint(0, 100, (5,)),
    attention_mask=torch.ones(5),
    position_ids=torch.arange(5),
    input_lengths=torch.tensor(5),
    pretrain_embed=torch.randn(5, 4)
)

ARGS = {
    'encoder_inputs': [encoder_input_1, encoder_input_2]
}
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 EncoderInputFeature — a EncoderInputFeature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EncoderInputFeature 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
circulant_mask Ran
ran on a synthesized input
jordiclive/Convert-PolyAI-Torch/src/model_components.py
code served (permissive licence) · get_code("b7b42b8d99ce0ee6")
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, 8) 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)

ARGS = {
    "n": 8,
    "window": 3,
}
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, 8) — shape (8, 8) 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_collate_fn Ran
ran on a synthesized input
phamnam-mta/ConveRT-PolyAI-Vietnamese/convert/dataset.py
code served (permissive licence) · get_code("608d3bca79de9430")
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 ContextReplyFeaturePair. 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 dataclasses import dataclass

torch.manual_seed(0)

# First, create individual EncoderInputFeature instances
def create_encoder_input_feature(seq_len: int, embed_dim: int = 8):
    return {
        'input_ids': torch.randint(0, 100, (seq_len,)),
        'attention_mask': torch.ones(seq_len),
        'position_ids': torch.arange(seq_len),
        'input_lengths': torch.tensor(seq_len),
        'pretrain_embed': torch.randn(seq_len, embed_dim)
    }

@dataclass
class EncoderInputFeature:
    input_ids: torch.Tensor
    attention_mask: torch.Tensor
    position_ids: torch.Tensor
    input_lengths: torch.Tensor
    pretrain_embed: torch.Tensor

    def pad_sequence(self, seq_len: int):
        self.input_ids = torch.nn.functional.pad(self.input_ids, [0, seq_len - self.input_ids.size(0)], 'constant', 0)
        self.attention_mask = torch.nn.functional.pad(self.attention_mask, [0, seq_len - self.attention_mask.size(0)], 'constant', 0)
        self.position_ids = torch.nn.functional.pad(self.position_ids, [0, seq_len - self.position_ids.size(0)], 'constant', 0)
        self.pretrain_embed = torch.nn.functional.pad(self.pretrain_embed, [0, 0, 0, seq_len - self.pretrain_embed.size(0)], 'constant', 0)

    def to(self, device: torch.device) -> 'EncoderInputFeature':
        return EncoderInputFeature(input_ids=self.input_ids.to(device), attention_mask=self.attention_mask.to(device), position_ids=self.position_ids.to(device), input_lengths=self.input_lengths.to(device), pretrain_embed=self.pretrain_embed.to(device))

@dataclass
class ContextReplyFeaturePair:
    context: EncoderInputFeature
    reply: EncoderInputFeature

    def to(self, device: torch.device) -> 'ContextReplyFeaturePair':
        return ContextReplyFeaturePair(context=self.context.to(device), reply=self.reply.to(device))

# Create sample encoder input features with different lengths
feature1_context_dict = create_encoder_input_feature(seq_len=3, embed_dim=8)
feature1_context = EncoderInputFeature(**feature1_context_dict)

feature1_reply_dict = create_encoder_input_feature(seq_len=2, embed_dim=8)
feature1_reply = EncoderInputFeature(**feature1_reply_dict)

feature2_context_dict = create_encoder_input_feature(seq_len=4, embed_dim=8)
feature2_context = EncoderInputFeature(**feature2_context_dict)

feature2_reply_dict = create_encoder_input_feature(seq_len=3, embed_dim=8)
feature2_reply = EncoderInputFeature(**feature2_reply_dict)

# Create ContextReplyFeaturePair instances
pair1 = ContextReplyFeaturePair(context=feature1_context, reply=feature1_reply)
pair2 = ContextReplyFeaturePair(context=feature2_context, reply=feature2_reply)

# Create the features list for the function
features_list = [pair1, pair2]

ARGS = {
    'features': features_list
}
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 ContextReplyFeaturePair — a ContextReplyFeaturePair output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ContextReplyFeaturePair 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
fast_gelu Ran
ran on a synthesized input
koujm/convert-tf/model/activations.py
code served (permissive licence) · get_code("94cdcdc1b088a048")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small test tensor
# The function takes an input tensor x and applies fast GELU activation
# We'll create a small 2D tensor with shape (2, 4) for testing
x = tf.constant([[1.0, 2.0, 0.5, -1.0],
                  [-0.5, 1.5, -2.0, 0.0]], 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 EagerTensor, 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
find_subword_params Ran
ran on a synthesized input
jordiclive/Convert-PolyAI-Torch/src/model.py
code served (permissive licence) · get_code("9ad1ec9772c32d18")
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
import torch.nn as nn

torch.manual_seed(0)

class SubwordEmbedding(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(10, 4)
    
    def forward(self, x):
        return self.embedding(x)

class TransformerLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.subword_embedding = SubwordEmbedding()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        x = self.subword_embedding(x)
        return self.linear(x)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.transformer_layers = nn.ModuleDict({
            'layer_0': TransformerLayer(),
            'layer_1': TransformerLayer(),
        })
        self.output_layer = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.transformer_layers['layer_0'](x)
        x = self.transformer_layers['layer_1'](x)
        return self.output_layer(x)

model = SimpleModel()

ARGS = {
    'model': model,
}
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
get Ran
ran on a synthesized input
koujm/convert-tf/model/activations.py
code served (permissive licence) · get_code("dc1b23db6eb4a793")
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 as tf

# The function `get` takes one parameter: identifier
# It checks if identifier == 'fast_gelu' and returns the fast_gelu function
# Otherwise it delegates to tf.keras.activations.get(identifier)
# We'll test with 'fast_gelu' identifier to exercise the main branch

ARGS = {
    'identifier': 'fast_gelu'
}
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
load_instances_from_reddit_dataset Ran
ran on a synthesized input
phamnam-mta/ConveRT-PolyAI-Vietnamese/convert/dataset.py
code served (permissive licence) · get_code("8752d74d06d9de7f")
How it ran

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

import json
import tempfile
import os
from typing import List, NamedTuple

class DatasetInstance(NamedTuple):
    context: List[str]
    response: str

def load_instances_from_reddit_dataset(dataset_path: str) -> List[DatasetInstance]:
    instances: List[DatasetInstance] = []
    with open(dataset_path, 'r') as dataset_file:
        data = json.load(dataset_file)
        for d in data:
            thread_name = d.get('thread_name')
            quotes = d.get('quotes')
            replies = d.get('replies')
            instance = DatasetInstance(context=quotes, response=replies)
            instances.append(instance)
    return instances

# Create a temporary JSON file with sample Reddit dataset
sample_data = [
    {
        "thread_name": "thread_1",
        "quotes": ["hello", "how are you"],
        "replies": "I'm doing great!"
    },
    {
        "thread_name": "thread_2",
        "quotes": ["what's up", "anything new"],
        "replies": "Not much, just chillin"
    }
]

with tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False) as f:
    json.dump(sample_data, f)
    temp_dataset_path = f.name

ARGS = {
    "dataset_path": temp_dataset_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 list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_instances_from_reddit_json Ran
ran on a synthesized input
jordiclive/Convert-PolyAI-Torch/src/dataset.py
code served (permissive licence) · get_code("72ea33f217cd57bd")
How it ran

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

import json
import tempfile
import os
from typing import List, NamedTuple

class DatasetInstance(NamedTuple):
    context: List[str]
    response: str

def load_instances_from_reddit_json(dataset_path: str) -> List[DatasetInstance]:
    instances: List[DatasetInstance] = []
    with open(dataset_path) as f:
        for line in f:
            x = json.loads(line)
            context_keys = sorted([key for key in x.keys() if 'context' in key])
            instance = DatasetInstance(context=[x[key] for key in context_keys], response=x['response'])
            instances.append(instance)
    return instances

# Create a temporary file with sample JSONL data
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.jsonl', delete=False)

# Write sample data matching the expected format
sample_data = [
    json.dumps({"context_1": "first message", "context_2": "second message", "response": "reply one"}),
    json.dumps({"context_1": "another first", "context_2": "another second", "response": "reply two"}),
]

for line in sample_data:
    temp_file.write(line + '\n')

temp_file.close()

ARGS = {
    "dataset_path": temp_file.name
}
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 — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_query_reply_matching_loss Not yet run
unverified (harvested, no recorded run)
phamnam-mta/ConveRT-PolyAI-Vietnamese/convert/criterion.py
code served (permissive licence) · get_code("8dc9be760b88bb4e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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-24.

Repositories linked to this paper

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

Abstract

General-purpose pretrained sentence encoders such as BERT are not ideal for real-world conversational AI applications; they are computationally heavy, slow, and expensive to train. We propose ConveRT (Conversational Representations from Transformers), a pretraining framework for conversational tasks satisfying all the following requirements: it is effective, affordable, and quick to train. We pretrain using a retrieval-based response selection task, effectively leveraging quantization and subword-level parameterization in the dual encoder to build a lightweight memory- and energy-efficient model. We show that ConveRT achieves state-of-the-art performance across widely established response selection tasks. We also demonstrate that the use of extended dialog history as context yields further performance gains. Finally, we show that pretrained representations from the proposed encoder can be transferred to the intent classification task, yielding strong results across three diverse data sets. ConveRT trains substantially faster than standard sentence encoders or previous state-of-the-art dual encoders. With its reduced size and superior performance, we believe this model promises wider portability and scalability for Conversational AI applications.

For agents

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

get_harvested_code_for_paper("1911.03688")
get_code_for_paper("1911.03688")
have("1911.03688")

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

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

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

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

Connect an agent — have() is free.