theosorus/GPT2-Hasktorch

GPT2 implementation in Haskell with the Hasktorch library, inspired by Andrej Karpathy's Pytorch implementation.

24
/ 100
Experimental

Implements the complete GPT-2 architecture (12 transformer blocks, 12 attention heads, 768 embedding dimensions) with full training pipeline including gradient accumulation, lazy data loading for large text files, real-time metric visualization, and CUDA support via Hasktorch. Leverages Haskell's type system and functional paradigm to replicate Karpathy's nanoGPT while integrating the OpenAI tokenizer for inference-ready model weights.

No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 2 / 25
Adoption 7 / 25
Maturity 9 / 25
Community 6 / 25

How are scores calculated?

Stars

36

Forks

2

Language

Haskell

License

BSD-3-Clause

Last pushed

Jun 17, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/theosorus/GPT2-Hasktorch"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.