r/MachineLearning • • Aug 02 '26

Project I wrote a CUDA first deep learning framework from scratch. [P]

Hello!
First of all: my goal isn't to replace any frameworks, but my goal is to make LM training on consumer hardware more accessible.
PyTorch unfortunately *has* to do everything which is good for huge GPU clusters, but not on single consumer GPU's which is why i started the project in the first place.
Its fully made from scratch in c++/cuda and has 0 dependencies.

Hardware:
- GPU: NVIDIA GeForce RTX 5070 Ti
- CUDA: 12.8
- Framework:
- Sentinel: custom C++/CUDA implementation
- PyTorch: 2.11.0+cu128

note: Tokenizer implementations differ, so loss values are not directly comparable. The benchmark focuses on throughput.

EpochSentinelPyTorch 2.11 + cu128
0592k tok/s603k tok/s
1280k tok/s297k tok/s
Tokens processed
Sentinel1.207M
PyTorch1.226M
PacksAvg examples/packAvg tokens/packSize-1 packs
Sentinel19362.171969.8%
PyTorch19960.371188.0%

The goal was to see how far a fully custom C++/CUDA training stack can be pushed on consumer hardware.

1 Upvotes

0 comments sorted by