Papers › Tensor2Tensor for Neural Machine Translation

Tensor2Tensor for Neural Machine Translation

16 Mar 2018WS 2018 3arXiv:1803.07416archive 2025-07-28

Ashish Vaswani, Samy Bengio, Eugene Brevdo, Francois Chollet, Aidan N. Gomez, Stephan Gouws, Llion Jones, Łukasz Kaiser, Nal Kalchbrenner, Niki Parmar, Ryan Sepassi, Noam Shazeer, Jakob Uszkoreit

Tensor2Tensor is a library for deep learning models that is well-suited for neural machine translation and includes the reference implementation of the state-of-the-art Transformer model.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 48 code samples harvested from 12 repositories linked to this paper: 30 ran (of which 0 constructed an object rather than computing a result; 29 with no instrument failure: 0 honoured, 0 violated, 29 with no contract checked; 1 where Syntology's instrument failed) · 18 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 1 sample from 1 repository, 1 ran (0 with no instrument failure; 1 where Syntology's instrument failed); community (archive-listed): 47 samples from 11 repositories, 29 ran (29 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

15 repositories listed; official and paper-mentioned ones first.

tensorflow/tensor2tensor officialmentioned in papermentioned on GitHubtfSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
1iyc/T2T-Analysis mentioned on GitHubtfApache-2.0Syntology: 8 samples, 7 ran (0 instrument-failed) · 1 unverified report
Eamin-sust/tensor2tensor mentioned on GitHubtfApache-2.0Syntology: 11 samples, 8 ran (0 instrument-failed) · 3 unverified report
Erra-Ernesto/master mentioned on GitHubtfApache-2.0Syntology: 9 samples, 4 ran (0 instrument-failed) · 5 unverified report
Janice-M/tensorflow-lessons mentioned on GitHubtfApache-2.0Syntology: 5 samples, 3 ran (0 instrument-failed) · 2 unverified report
JiachenMao/TransfornerPrune mentioned on GitHubtfApache-2.0Syntology: 5 samples, 1 ran (0 instrument-failed) · 4 unverified report
Pek20180909/dp-transformer mentioned on GitHubtfApache-2.0Syntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
artitw/tensor2tensor mentioned on GitHubtfApache-2.0Syntology: not harvested report
gitboyzorro5/tensor2tensor mentioned on GitHubtfApache-2.0Syntology: 1 sample, 0 ran · 1 unverified report
hhy37/tensor2tensor mentioned on GitHubtfApache-2.0Syntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
inzva/fake-academic-paper-generation mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context (arXiv:1901.02860; that paper's own run record: 67 ran (of which 37 constructed an object rather than computing a result; 49 with no instrument failure: 4 honoured, 1 violated, 44 with no contract checked; 18 where Syntology's instrument failed) · 76 unverified); nothing checks that they implement this paper's method. report
jinliangwei/tensor2tensor-1.11 mentioned on GitHubtfApache-2.0Syntology: not harvested report
qijimrc/tensor2tensor mentioned on GitHubtfApache-2.0Syntology: 3 samples, 2 ran (0 instrument-failed) · 1 unverified report
samsucik/t2t mentioned on GitHubtfApache-2.0Syntology: 1 sample, 0 ran · 1 unverified report
tianhai123/- mentioned on GitHubtfApache-2.0Syntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

48 samples harvested: 30 ran (of which 0 constructed an object rather than computing a result; 29 with no instrument failure: 0 honoured, 0 violated, 29 with no contract checked; 1 where Syntology's instrument failed) · 18 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
29ran
18unverified

Licence: 0 of the 48 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 12 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

tensorflow/tensor2tensor official repository 1 sample, 1 ran (1 instrument-failed) · 0 unverified
problem_hparams_to_features tensor2tensor/data_generators/problem.py ran · our draft was wrong Apache-2.0 (permissive) · 4116527c2a478716 · report fixture: signature problem_hparams:ProblemHParams/0/? · returned dict · level recorded 2026-09-22
1iyc/T2T-Analysis community (archive-listed) 8 samples, 7 ran (0 instrument-failed) · 1 unverified
average_sharded_losses tensor2tensor/utils/t2t_model.py ran Apache-2.0 (permissive) · e0f4770f7b603395 · report fixture: signature sharded_losses:list/1/dict · returned dict · level recorded 2026-09-26
is_in_expr tensor2tensor/data_generators/algorithmic_math.py ran Apache-2.0 (permissive) · 7e2bc85a4d4189a9 · report fixture: signature expr:ExprNode/0/?, find:ExprNode/0/? · returned bool · level recorded 2026-09-25
lower_endian_to_number tensor2tensor/data_generators/algorithmic.py ran fingerprinted Apache-2.0 (permissive) · b1896a2536602d28 · report fixture: signature l:list/1/int, base:int/0/int · returned int · level recorded 2026-09-25
random_expr tensor2tensor/data_generators/algorithmic_math.py ran Apache-2.0 (permissive) · 916cc023d1d1ddbd · report fixture: signature depth:int/0/int, vlist:list/1/str, ops:list/1/ExprOp · returned ExprNode · level recorded 2026-09-25
random_expr_with_required_var tensor2tensor/data_generators/algorithmic_math.py ran Apache-2.0 (permissive) · 0a76872f8ddc4b1e · report fixture: signature depth:int/0/int, required_var:str/0/str, optional_list:list/1/str, ops:list/1/ExprOp · returned ExprNode · level recorded 2026-09-25
zipf_distribution tensor2tensor/data_generators/algorithmic.py ran Apache-2.0 (permissive) · 68fe9a15fc61f6bd · report fixture: signature nbr_symbols:int/0/int, alpha:float/0/float · returned list · level recorded 2026-09-25
zipf_random_sample tensor2tensor/data_generators/algorithmic.py ran Apache-2.0 (permissive) · d0d6f2cc06f67920 · report fixture: signature distr_map:ndarray/1/float, sample_len:int/0/int · returned list · level recorded 2026-09-25
prepare_data in 87 papers tensor2tensor/bin/t2t_attack.py unverified Apache-2.0 (permissive) · 2d21f2cb3f076c8e · report
Eamin-sust/tensor2tensor community (archive-listed) 11 samples, 8 ran (0 instrument-failed) · 3 unverified
add_delta_deltas tensor2tensor/layers/common_audio.py ran Apache-2.0 (permissive) · 748914abdfd6b822 · report fixture: signature filterbanks:SymbolicTensor/4/float, name:NoneType/0/? · returned SymbolicTensor · level recorded 2026-09-26
compute_mel_filterbank_features tensor2tensor/layers/common_audio.py ran Apache-2.0 (permissive) · 0cd8646d2fafc11f · report fixture: signature waveforms:SymbolicTensor/2/float, sample_rate:int/0/int, dither:float/0/float, preemphasis:float/0/float, frame_length:int/0/int, frame_step:int/0/int, fft_length:NoneType/0/?, window_fn:callable/0/?, lower_edge_hertz:float/0/float, upper_edge_hertz:float/0/float, num_mel_bins:int/0/int, log_noise_floor:float/0/float, apply_mask:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-26
distorted_bounding_box_crop in 10 papers tensor2tensor/data_generators/imagenet.py ran Apache-2.0 (permissive) · c3b99eca8b1dea7b · report fixture: signature image:SymbolicTensor/3/int, bbox:SymbolicTensor/3/float, min_object_covered:float/0/float, aspect_ratio_range:tuple/1/float, area_range:tuple/1/float, max_attempts:int/0/int, scope:NoneType/0/? · returned tuple · level recorded 2026-09-26
large_compatible_negative tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · 4dce1b2c80bc7259 · report fixture: signature tensor_type:DType/0/? · returned float · level recorded 2026-09-26
maybe_upcast tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · f71eb3208ea1ac2e · report fixture: signature logits:EagerTensor/2/float, activation_dtype:NoneType/0/?, weight_dtype:NoneType/0/?, hparams:HParams/0/? · returned EagerTensor · level recorded 2026-09-26
mixed_precision_is_enabled tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · db9de8c21cfb33b2 · report fixture: signature activation_dtype:DType/0/?, weight_dtype:DType/0/?, hparams:NoneType/0/? · returned bool · level recorded 2026-09-26
scores_filter tensor2tensor/insights/transformer_model.py ran Apache-2.0 (permissive) · 71927fc77962a843 · report fixture: signature datum:MockDatum/0/?, tensor:Tensor/2/float · returned bool · level recorded 2026-09-26
seq_filter tensor2tensor/insights/transformer_model.py ran Apache-2.0 (permissive) · 6f29b141db6bc7e8 · report fixture: signature datum:MockDatum/0/?, tensor:Tensor/1/float · returned bool · level recorded 2026-09-26
imagenet_preprocess_example tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · 1beeedf33db29766 · report
preprocess_for_train in 10 papers tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · d0146eb229788856 · report
topk_watch_fn tensor2tensor/insights/transformer_model.py unverified Apache-2.0 (permissive) · 7d5116b9da3e71ed · report
Erra-Ernesto/master community (archive-listed) 9 samples, 4 ran (0 instrument-failed) · 5 unverified
add_delta_deltas tensor2tensor/layers/common_audio.py ran Apache-2.0 (permissive) · afcb74fd5f657185 · report fixture: signature filterbanks:EagerTensor/4/float, name:NoneType/0/? · returned EagerTensor · level recorded 2026-09-26
add_standard_attention_hparams tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · 74d5ffaeacd67288 · report fixture: signature hparams:MockHParams/0/? · returned MockHParams · level recorded 2026-09-26
comma_separated_string_to_integer_list tensor2tensor/layers/common_layers.py ran fingerprinted Apache-2.0 (permissive) · f5e828468ccc9543 · report fixture: signature s:str/0/str · returned list · level recorded 2026-09-26
create_regularization_loss_fn tensor2tensor/layers/bayes.py ran Apache-2.0 (permissive) · 9f7a9aa79bcd909d · report fixture: signature name:str/0/str, variable_fn:callable/0/?, regularizer_fn:callable/0/? · returned function · level recorded 2026-09-26
convert_gradient_to_tensor tensor2tensor/layers/common_layers.py unverified Apache-2.0 (permissive) · 5ea4d4b72662bfaf · report
distorted_bounding_box_crop in 10 papers tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · 50ee75354b0c6168 · report
dropout_with_broadcast_dims tensor2tensor/layers/common_layers.py unverified Apache-2.0 (permissive) · 0e0b6e97db301154 · report
imagenet_preprocess_example tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · 5393a76ac31b9d6f · report
preprocess_for_train in 10 papers tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · c31961a8f08b93ca · report
Janice-M/tensorflow-lessons community (archive-listed) 5 samples, 3 ran (0 instrument-failed) · 2 unverified
large_compatible_negative tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · 9a3f3b5c8fe9f016 · report fixture: signature tensor_type:DType/0/? · returned float16 · level recorded 2026-09-26
maybe_upcast tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · ca13c475bfeed81f · report fixture: signature logits:SymbolicTensor/2/float, activation_dtype:DType/0/?, weight_dtype:DType/0/?, hparams:NoneType/0/? · returned EagerTensor · level recorded 2026-09-26
mixed_precision_is_enabled tensor2tensor/layers/common_attention.py ran Apache-2.0 (permissive) · a26680f8cb87d722 · report fixture: signature activation_dtype:DType/0/?, weight_dtype:DType/0/?, hparams:NoneType/0/? · returned bool · level recorded 2026-09-26
imagenet_preprocess_example tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · 80cb2afad98acef4 · report
preprocess_for_train in 10 papers tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · d323135519eb2eaa · report
JiachenMao/TransfornerPrune community (archive-listed) 5 samples, 1 ran (0 instrument-failed) · 4 unverified
deserialize in 10 papers tensor2tensor/layers/bayes.py ran Apache-2.0 (permissive) · 8e8132bfb8eb0cd2 · report fixture: signature config:dict/0/?, custom_objects:NoneType/0/? · returned str · level recorded 2026-09-26
add_weight tensor2tensor/layers/bayes.py unverified Apache-2.0 (permissive) · b9294972d34bac80 · report
get in 42 papers tensor2tensor/layers/bayes.py unverified Apache-2.0 (permissive) · 30733be1f346d1da · report
imagenet_preprocess_example tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · 512b3e2718d80431 · report
preprocess_for_train in 10 papers tensor2tensor/data_generators/imagenet.py unverified Apache-2.0 (permissive) · 2ab69b6d79c736b0 · report
Pek20180909/dp-transformer community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
add_evolved_transformer_hparams tensor2tensor/models/evolved_transformer.py ran Apache-2.0 (permissive) · a39a84994bf39310 · report fixture: signature hparams:HParams/0/? · returned HParams · level recorded 2026-09-26
shift_and_pad tensor2tensor/models/research/transformer_aux.py ran Apache-2.0 (permissive) · 59c61142257c9e1e · report fixture: signature tensor:EagerTensor/2/int, shift:int/0/int, axis:int/0/int · returned EagerTensor · level recorded 2026-09-26
gitboyzorro5/tensor2tensor community (archive-listed) 1 sample, 0 ran · 1 unverified
encoder_decoder_attention_loss tensor2tensor/layers/common_attention.py unverified Apache-2.0 (permissive) · 6b159f110a2bd644 · report
hhy37/tensor2tensor community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
swap_time_and_batch_axes tensor2tensor/layers/common_video.py ran Apache-2.0 (permissive) · 592f83812bb35157 · report fixture: signature inputs:EagerTensor/3/float · returned EagerTensor · level recorded 2026-09-26
qijimrc/tensor2tensor community (archive-listed) 3 samples, 2 ran (0 instrument-failed) · 1 unverified
dropout_with_broadcast_dims tensor2tensor/layers/common_layers.py ran Apache-2.0 (permissive) · 6faf23aab5900dc8 · report fixture: signature x:EagerTensor/3/float, keep_prob:EagerTensor/0/float, broadcast_dims:list/1/int · returned EagerTensor · level recorded 2026-09-26
slice_hidden tensor2tensor/layers/discretization.py ran Apache-2.0 (permissive) · 07193e79db3b92e4 · report fixture: signature x:EagerTensor/2/float, hidden_size:int/0/int, num_blocks:int/0/int · returned EagerTensor · level recorded 2026-09-26
project_hidden tensor2tensor/layers/discretization.py unverified Apache-2.0 (permissive) · 7db79e182d1bda05 · report
samsucik/t2t community (archive-listed) 1 sample, 0 ran · 1 unverified
create_host_call tensor2tensor/utils/t2t_model.py unverified Apache-2.0 (permissive) · adbdf489f02bb809 · report
tianhai123/- community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
smart_constant_value tensor2tensor/layers/bayes.py ran Apache-2.0 (permissive) · 4f3643595cc37d38 · report fixture: signature pred:bool/0/bool · returned bool · level recorded 2026-09-26

Tasks

Deep LearningMachine TranslationTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections