HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
explosion
curated-transformers
Python2023–2023
explosion / curated-transformers

curated-transformers

🤖 A PyTorch library of curated Transformer models and their composable components

2Distinct people
8Mentions
0Explicit recommenders
887GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

🤖 A PyTorch library of curated Transformer models and their composable components

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week8 dated mentions

Observed mentions: 2023-06-18 06:35:20 UTC to 2023-12-20 16:51:08 UTC. Weeks start Monday, UTC.

0122023-06-12 00:00:00 UTC to 2023-06-19 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 122023-06-19 00:00:00 UTC to 2023-06-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-26 00:00:00 UTC to 2023-07-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-03 00:00:00 UTC to 2023-07-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-10 00:00:00 UTC to 2023-07-17 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2023-07-17 00:00:00 UTC to 2023-07-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-24 00:00:00 UTC to 2023-07-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-31 00:00:00 UTC to 2023-08-07 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2023-08-07 00:00:00 UTC to 2023-08-14 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2023-08-14 00:00:00 UTC to 2023-08-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-21 00:00:00 UTC to 2023-08-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-28 00:00:00 UTC to 2023-09-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-09-04 00:00:00 UTC to 2023-09-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-09-11 00:00:00 UTC to 2023-09-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsSep 112023-09-18 00:00:00 UTC to 2023-09-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-09-25 00:00:00 UTC to 2023-10-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-02 00:00:00 UTC to 2023-10-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-09 00:00:00 UTC to 2023-10-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-16 00:00:00 UTC to 2023-10-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-23 00:00:00 UTC to 2023-10-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-30 00:00:00 UTC to 2023-11-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-11-06 00:00:00 UTC to 2023-11-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-11-13 00:00:00 UTC to 2023-11-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-11-20 00:00:00 UTC to 2023-11-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-11-27 00:00:00 UTC to 2023-12-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-12-04 00:00:00 UTC to 2023-12-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-12-11 00:00:00 UTC to 2023-12-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-12-18 00:00:00 UTC to 2023-12-25 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 18

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 122023-06-12 00:00:00 UTC2023-06-19 00:00:00 UTC101
Jun 192023-06-19 00:00:00 UTC2023-06-26 00:00:00 UTC000
Jun 262023-06-26 00:00:00 UTC2023-07-03 00:00:00 UTC000
Jul 32023-07-03 00:00:00 UTC2023-07-10 00:00:00 UTC000
Jul 102023-07-10 00:00:00 UTC2023-07-17 00:00:00 UTC220
Jul 172023-07-17 00:00:00 UTC2023-07-24 00:00:00 UTC000
Jul 242023-07-24 00:00:00 UTC2023-07-31 00:00:00 UTC000
Jul 312023-07-31 00:00:00 UTC2023-08-07 00:00:00 UTC211
Aug 72023-08-07 00:00:00 UTC2023-08-14 00:00:00 UTC211
Aug 142023-08-14 00:00:00 UTC2023-08-21 00:00:00 UTC000
Aug 212023-08-21 00:00:00 UTC2023-08-28 00:00:00 UTC000
Aug 282023-08-28 00:00:00 UTC2023-09-04 00:00:00 UTC000
Sep 42023-09-04 00:00:00 UTC2023-09-11 00:00:00 UTC000
Sep 112023-09-11 00:00:00 UTC2023-09-18 00:00:00 UTC000
Sep 182023-09-18 00:00:00 UTC2023-09-25 00:00:00 UTC000
Sep 252023-09-25 00:00:00 UTC2023-10-02 00:00:00 UTC000
Oct 22023-10-02 00:00:00 UTC2023-10-09 00:00:00 UTC000
Oct 92023-10-09 00:00:00 UTC2023-10-16 00:00:00 UTC000
Oct 162023-10-16 00:00:00 UTC2023-10-23 00:00:00 UTC000
Oct 232023-10-23 00:00:00 UTC2023-10-30 00:00:00 UTC000
Oct 302023-10-30 00:00:00 UTC2023-11-06 00:00:00 UTC000
Nov 62023-11-06 00:00:00 UTC2023-11-13 00:00:00 UTC000
Nov 132023-11-13 00:00:00 UTC2023-11-20 00:00:00 UTC000
Nov 202023-11-20 00:00:00 UTC2023-11-27 00:00:00 UTC000
Nov 272023-11-27 00:00:00 UTC2023-12-04 00:00:00 UTC000
Dec 42023-12-04 00:00:00 UTC2023-12-11 00:00:00 UTC000
Dec 112023-12-11 00:00:00 UTC2023-12-18 00:00:00 UTC000
Dec 182023-12-18 00:00:00 UTC2023-12-25 00:00:00 UTC101

What Hacker News says

8 sources
Nice! For what it is worth, a colleague and I made a library a while ago that factors out most shared model code, with which many models can be implemented in about 100 lines (excluding Python import ceremony and comments). E.g.: BERT: https://github.com/explosion/curated-transformers/blob/main/... Llama 1/2: https://github.com/explosion/curated-transformers/blob/main/... MPT: https://github.com/explosion/curated-transformers/blob/main/... With various stuff enabled, including support for TorchScript JIT, PyTorch flash attention, etc.
In Implementation of Mamba in one file of PyTorch
I am so happy about them releasing this. A few years ago I wrote a multi-task syntax annotator in Rust using Laurent Mazare's excellent Torch binding (tch-rs, it looks like he is also working on Candle): https://github.com/tensordot/syntaxdot However, the deployment story was always quite difficult. The PyTorch C++ API is not stable, so a particular version of tch-rs will only work with a particular PyTorch version. So, anyone wanting to use SyntaxDot always had to get exactly the right version of libtorch (and set some environment variables) to build the project. The idea of making an abstraction over Torch and Rust ndarray (similar to Burn) crossed my mind several times, but there is only so much that I could do as a solo developer. So Candle would be a god-given if I was still working on this project. Seeing Candle wants to make me por
Read the rest
t curated-transformers to Candle for fun: https://github.com/explosion/curated-transformers
In Candle: Torch Replacement in Rust
Yeah. In curated transformers [1] we are seeing completely deterministic output across multiple popular transformer architectures on a single GPU (there can be variance between GPUs due to different kernels). Of course, it completely depends on what ops and implementations you are using. But most transformers do not use ops that are typically non-deterministic to be fast (like scatter-add). One non-determinism we see with a temperature of 0 is that once you have quantized weights, many predicted pieces will have the same probability, including multiple pieces with the highest probability. And then the sampler (if you are not using a greedy decoder) will sample from those pieces. So, generation is non-deterministic with a temperature of 0. In other words, a temperature of 0 is a poor man’s greedy decoding. (It is totally possible that Open
Read the rest
AI’s implementation switches to a greedy decoder with a temperature of 0). [1] https://github.com/explosion/curated-transformers
In Non-determinism in GPT-4 is caused by Sparse MoE

Show HN: Curated Transformers – Lightweight, composable PyTorch transformers

This is a Python library that Madeesh Kannan and I have developed. It started out as a small transformer library to use in spaCy pipelines. The last two months we have extended it to an independent PyTorch library and added support for modern LLMs such as Falcon, LLaMA, and Dolly V2. Our focus has been on making a library of reusable components, so that new transformer architectures can be added with as little code as possible. We will release a semver-stable 1.0 release over the coming weeks.
7 points · Open discussion
There are no big differences compared to other LLM architecturally. The largest differences compared to NeoX are: no biases in linear layers, shared heads for the key and value representations (but not query). Of course, it has 40B parameters, but there is also a 7B parameter version. The primary issue is that the current upstream version (on Huggingface) hasn't implemented key-value caching correctly. KV caching is needed to bring the complexity down from O(n^3) to O(n^2). The issues are: (1) their implementation uses Torch' scaled dot-product attention, which uses incorrect causal masks when the query/key sizes are not the same (which it the case when generating with a cache). (2) They don't index the rotary embeddings correctly when using key-value cache, so the rotary embedding of the first token is used for all generated tokens. Toge
Read the rest
ther, this causes the model to output garbage and it only works when using it without KV caching, making it very slow. However, this is not a property of the model and they will probably fix this soon. E.g. the transformer library that we are currently developing supports Falcon with key-value caching and it the speed is on-par with other models of the same size: https://github.com/explosion/curated-transformers/blob/main/... (This is a correct implementation of the decoder layer.)
In Falcon LLM – A 40B Model

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.