# Kyubyong/transformer

A TensorFlow Implementation of the Transformer: Attention Is All You Need

Repository: https://github.com/Kyubyong/transformer
Canonical: https://ross.abutalabs.com/products/kyubyong-transformer
Language: Python
License: Apache-2.0
License Family: permissive
Topics: attention-mechanism, translation, attention-is-all-you-need, implementation, transformer
Last push: 2023-05-21T17:39:56+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3364, "days_push": 1200, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4474, forks 1303 (observed 2026-08-28T04:08:51.034512+00:00)

## What it is
A readable TensorFlow 1.x implementation of the Transformer architecture from the paper 'Attention Is All You Need', targeted at machine translation (IWSLT 2016 de-en). It serves primarily as an educational reference with well-commented, modular code.

## Use cases
- learn how the transformer architecture works by reading code
- understand positional encoding and masking implementations
- train a small machine translation model on IWSLT de-en
- study a minimal transformer implementation before using production frameworks
- reproduce the Attention Is All You Need paper results on a small dataset

## When to choose
- you want to understand the transformer architecture through readable, commented code
- you need a small, quick-to-run transformer for experimentation or teaching
- you are learning TensorFlow 1.x and sequence-to-sequence modeling

## When to avoid
- you need production-grade training on large corpora like WMT - use tensor2tensor or PyTorch alternatives
- you need TensorFlow 2.x or modern framework support
- you need beam search decoding or the latest transformer variants

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: machine-learning, deep-learning, nlp
- domain: machine-learning, education
- platform: python
- tags: transformer, attention-mechanism, machine-translation, tensorflow, paper-implementation, educational, natural-language-processing

## Member repositories
- Kyubyong/transformer (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:51.034512+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:35.173202+00:00, confidence not recorded.
  - readme: https://github.com/Kyubyong/transformer (fetched 2026-08-28T04:08:51.034512+00:00, sha b06edb444084)
- Data as of 2026-08-30T08:39:29.467469+00:00.
