Latest / Learning & reference

tensorli

github.com · Open source · Quiet

Minimal GPT-style transformer in under 650 lines of NumPy

Visit github.com ↗Share

  • numpy
  • minimal transformer
  • numpy gpt
  • transformer from scratch
  • autodiff numpy
  • learn transformers
Stars
251
Forks
15
Open issues
0
Last commit
Found
3 years ago

GitHub figures as of . They are context, not a ranking.

tensorli is a minimal GPT-like transformer implemented in Python using only NumPy, in fewer than 650 lines of code. It suits learners who want to read and train a small transformer without a deep learning framework.

Repository description on GitHub: “Absolute minimalistic implementation of a GPT-like transformer using only numpy (<650 lines).”

What it does

  • Automatic differentiation on a Tensorli object with a PyTorch-like API
  • Linear, embedding, multihead attention and layer norm layers
  • Adam optimizer implementation
  • GPT-style transformer runnable from a short NumPy example

Good for

  • Read and train a small GPT-style transformer written in NumPy
  • Learn how autodiff and attention work by stepping through the code

Suits: Learners who want to understand transformers without a framework.

What you can try

Read the README on GitHub and install from source.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw tensorli on , when joennlae posted it to Show HN. GitHub listed no published releases for joennlae/tensorli when checked , so the project may ship straight from its main branch. The repository was created .

Day-7 and day-30 updates

Day 7 no new release

  • No tagged release was published in the first 7 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 90 points, 18 comments. API record

Checked , later than day 7 because tracking began after.

Day 30 no new release

  • No tagged release was published in the first 30 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 90 points, 18 comments. API record

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

  1. Repository created on GitHub: joennlae/tensorli
  2. Found: joennlae posted it to Show HN. Show HN
  3. Day-7 check recorded by Kip (details)
  4. Day-30 check recorded by Kip (details)

Quick answers

When was tensorli released?
No dated release record is available. Kip found it on Show HN on 17 Nov 2023.
Is tensorli open source?
Its source is public on GitHub at joennlae/tensorli under the MIT licence.
What does tensorli run on?
Library.
Is tensorli free?
It is open source, so the code is free to read and run; check the licence for terms.
Is tensorli still maintained?
It has had no commit or release for over a year as of the latest check.

Provenance

SourceRecordLast checked
Show HNlisting
official API record
GitHub repositoryjoennlae/tensorli
REST API record
GitHub Releasesrelease list
REST API record

Stable ID hn-38304148. Summary written by KipFound’s editor.

Share

Similar tools

More in Learning & reference

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.