SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.12993 · ACL · 2020

DeeBERT: Dynamic Early Exiting for Accelerating BERT Inference

Yaoliang Yu, Jimmy Lin, Jaejun Lee, Ji Xin, Raphael Tang

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 1 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/2004.12993.json · badge: /api/ran/2004.12993.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
JulesBelveze/bert-squeeze community
Papers with Code archive
4 ran · 1 no recorded run
castorini/deebert marked official in Papers with Code
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
BertHighway Ran
ran on a synthesized input
castorini/deebert/transformers/modeling_highway_bert.py
code served (permissive licence) · get_code("3c68e7d3c7a22462")
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
from torch import nn

class SimpleConfig:
    def __init__(self):
        self.hidden_size = 6
        self.hidden_dropout_prob = 0.1
        self.num_labels = 3

config = SimpleConfig()

INIT_ARGS = {
    'config': config
}

batch_size = 2
seq_length = 5
hidden_size = config.hidden_size

hidden_states = torch.randn(batch_size, seq_length, hidden_size)
encoder_outputs = (hidden_states,)

ARGS = {
    'encoder_outputs': encoder_outputs
}
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)
DeeBertEncoderOutput Ran
ran on a synthesized input · constructed an object; no result was computed
JulesBelveze/bert-squeeze/bert_squeeze/models/custom_transformers/deebert.py
pointer only (licence: NONE) · get_code("acec206d3de79819")
How it ran

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

OffRamp Ran
ran on a synthesized input · constructed an object; no result was computed
JulesBelveze/bert-squeeze/bert_squeeze/models/custom_transformers/deebert.py
pointer only (licence: NONE) · get_code("a05459465715ee48")
How it ran

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

RampOutput Ran
ran on a synthesized input · constructed an object; no result was computed
JulesBelveze/bert-squeeze/bert_squeeze/models/custom_transformers/deebert.py
pointer only (licence: NONE) · get_code("2e045a653a51bbdc")
How it ran

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

entropy Ran
ran, honoured the contract we drafted
JulesBelveze/bert-squeeze/bert_squeeze/models/custom_transformers/deebert.py
pointer only (licence: NONE) · get_code("76ecddd69557ac5b")
How it ran

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

DeeBertEncoder Not yet run
unverified (harvested, no recorded run)
JulesBelveze/bert-squeeze/bert_squeeze/models/custom_transformers/deebert.py
pointer only (licence: NONE) · get_code("dc1656c6e19154ad")
How it ran

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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 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-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

Large-scale pre-trained language models such as BERT have brought significant improvements to NLP applications. However, they are also notorious for being slow in inference, which makes them difficult to deploy in realtime applications. We propose a simple but effective method, DeeBERT, to accelerate BERT inference. Our approach allows samples to exit earlier without passing through the entire model. Experiments show that DeeBERT is able to save up to ∼40% inference time with minimal degradation in model quality. Further analyses show different behaviors in the BERT transformer layers and also reveal their redundancy. Our work provides new ideas to efficiently apply deep transformer-based models to downstream tasks. Code is available at https://github.com/castorini/ DeeBERT.

For agents

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

get_harvested_code_for_paper("2004.12993")
get_code_for_paper("2004.12993")
have("2004.12993")

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

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

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

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

Connect an agent — have() is free.