SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.08239 · 2022

LaMDA: Language Models for Dialog Applications

Vinodkumar Prabhakaran, Yanping Huang, James Qin, Ben Hutchinson, Adam Roberts, Yanqi Zhou, Zhifeng Chen, Noam Shazeer, Yuanzhong Xu, Dmitry Lepikhin, Maxim Krikun, Maarten Bosma, and 41 more

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 1 has no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-21; 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/2201.08239.json · badge: /api/ran/2201.08239.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
conceptofmind/lamda-rlhf-pytorch community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
conceptofmind/LaMDA-pytorch community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
LaMDA Ran
ran on a synthesized input
conceptofmind/LaMDA-pytorch/lamda_pytorch/lamda_pytorch.py
code served (permissive licence) · get_code("4b79bb3dca714e5c")
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

# INIT_ARGS for LaMDA.__init__
INIT_ARGS = {
    'num_tokens': 128,
    'dim': 32,
    'depth': 2,
    'dim_head': 16,
    'heads': 4
}

# ARGS for LaMDA.forward
# Input should be token indices with shape (batch, sequence_length)
ARGS = {
    'x': torch.randint(0, 128, (2, 12))
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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)
default Ran
ran, violated the contract we drafted
conceptofmind/lamda-rlhf-pytorch/lamda_pytorch/lora.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("60fff7c3c400d7ff")
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 ThomasMrY/VCT, 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.

exists Ran
ran, violated the contract we drafted
conceptofmind/lamda-rlhf-pytorch/lamda_pytorch/lora.py
pointer only (licence: MIT); the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
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 ThomasMrY/VCT, 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.

log Ran
ran, honoured the contract we drafted
conceptofmind/lamda-rlhf-pytorch/lamda_pytorch/utils/utils.py
code served (permissive licence) · get_code("6269424d608eba34")
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)

# The function log takes a tensor t and an optional eps parameter
# It computes torch.log(t + eps) to avoid log(0)
# We need to provide a valid tensor as argument t

t = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                   [5.0, 6.0, 7.0, 8.0]])

eps = 1e-09

ARGS = {
    't': t,
    'eps': eps
}
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
top_k Ran
ran; our contract draft was wrong, not the code
conceptofmind/lamda-rlhf-pytorch/lamda_pytorch/utils/utils.py
code served (permissive licence) · get_code("3b65d5d77510c964")
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 logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "logits": logits,
    "thres": 0.9
}
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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 4 later) and 1 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
exists 486 other papers
75 dated earlier, 2 the same month, 406 later, 1 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
default 163 other papers
36 dated earlier, 1 the same month, 125 later, 1 undated · 27 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1810.00825 (2018-10)
Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks
1907.01470 (2019-07)
Augmenting Self-attention with Persistent Memory
and 160 more not named here
top_k 6 other papers
4 dated earlier, 2 later
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
2006.15020 (2020-06)
Pre-training via Paraphrasing
2107.11906 (2021-07)
H-Transformer-1D: Fast One-Dimensional Hierarchical Attention for Sequences
and 3 more not named here
log 4 other papers
3 dated earlier, 1 later
2003.10555 (2020-03)
ELECTRA: PRE-TRAINING TEXT ENCODERS AS DISCRIMINATORS RATHER THAN GENERATORS
2006.15020 (2020-06)
Pre-training via Paraphrasing
2102.08473 (2021-02)
COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
and 1 more not named 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-21.

Repositories linked to this paper

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

Abstract

We present LaMDA: Language Models for Dialog Applications. LaMDA is a family of Transformerbased neural language models specialized for dialog, which have up to 137B parameters and are pre-trained on 1.56T words of public dialog data and web text. While model scaling alone can improve quality, it shows less improvements on safety and factual grounding. We demonstrate that fine-tuning with annotated data and enabling the model to consult external knowledge sources can lead to significant improvements towards the two key challenges of safety and factual grounding. The first challenge, safety, involves ensuring that the model's responses are consistent with a set of human values, such as preventing harmful suggestions and unfair bias. We quantify safety using a metric based on an illustrative set of human values, and we find that filtering candidate responses using a LaMDA classifier fine-tuned with a small amount of crowdworker-annotated data offers a promising approach to improving model safety. The second challenge, factual grounding, involves enabling the model to consult external knowledge sources, such as an information retrieval system, a language translator, and a calculator. We quantify factuality using a groundedness metric, and we find that our approach enables the model to generate responses grounded in known sources, rather than responses that merely sound plausible. Finally, we explore the use of LaMDA in the domains of education and content recommendations, and analyze their helpfulness and role consistency. * Work done while at Google.

For agents

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

get_harvested_code_for_paper("2201.08239")
get_code_for_paper("2201.08239")
have("2201.08239")

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

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

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

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

Connect an agent — have() is free.