# pbloem/former

Simple transformer implementation from scratch in pytorch. (archival, latest version on codeberg)

Repository: https://github.com/pbloem/former
Canonical: https://ross.abutalabs.com/products/pbloem-former
Homepage: http://peterbloem.nl/blog/transformers
Language: Python
License: MIT
License Family: permissive
Topics: machine-learning, transformer, pytorch
Last push: 2025-03-20T15:05:30+00:00

## Health v2 (maintenance only)
Score: 38/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 12, release rhythm 35, longevity 100
- inputs: {"age_days": 2575, "days_push": 531, "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 1097, forks 172 (observed 2026-08-28T04:03:34.636397+00:00)

## What it is
A minimal, from-scratch implementation of the transformer architecture in PyTorch, accompanying a tutorial blog post on how modern transformers work. The GitHub repository is archived and no longer maintained; the latest version lives on Codeberg.

## Use cases
- learn how transformer self-attention works
- read a simple transformer implementation in pytorch
- understand transformers without historical baggage
- teach a deep learning class about attention
- experiment with a minimal transformer codebase
- study self-attention sequence-to-sequence operations

## When to choose
- you want a small, readable transformer implementation for learning
- you are following the accompanying 'Transformers from scratch' tutorial
- you need educational code rather than production performance

## When to avoid
- you need a production-grade or feature-complete transformer library
- you want maintained software with active support
- you need optimized training of large language models

## Facets
- artifact type: library
- maturity: abandoned
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, large-language-models, tutorials
- platform: python
- tags: transformer, pytorch, self-attention, educational, from-scratch, archived

## Member repositories
- pbloem/former (main) score 38

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:34.636397+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-30T06:46:36.971450+00:00, confidence not recorded.
  - readme: https://github.com/pbloem/former (fetched 2026-08-28T04:03:34.636397+00:00, sha 00b04357061d)
  - homepage: http://peterbloem.nl/blog/transformers (fetched 2026-08-29T12:50:05.739236+00:00, sha 489ab29c3ea9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
