All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

TRiP: An open-source Transformer AI engine built from scratch in C for educational purposes

By

carlovalenti

1mo ago· 7 min readenCode

Summary

TRiP (TRansformer in Progress) is an open-source, from-scratch implementation of a Transformer AI engine written entirely in C. Built over 18 months during the developer's personal time, it supports inference, training, tokenizer creation, chat, and vision for models like Gemma 1, Llama 2, PaliGemma, and GPT-2. The project is purely educational, aimed at helping the developer and others understand transformer internals from the ground up.

Key quotes

· 4 pulled
TRiP exists just because I wanted to truly understand the transformer internals - from the matrix multiplications up.
TRiP's purpose is purely educational, for me and for anyone willing to learn about transformers.
A few-files, all-in-one C engine for Transformer AI models: inference, training, tokenizer creation, chat, and vision.
Built from scratch over 18 months (from March 2024 to August 2025) during my lunch breaks and weekend nights.
Snippet from the RSS feed
A complete transformer engine in C — inference, training, chat, vision. - carlovalenti/TRiP

You might also wanna read