Skip to content

a typescript library that implements a nearly identical API to Karpathy's micrograd

Notifications You must be signed in to change notification settings

EvanChisholm1/micrograd.ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Micrograd.ts

Micrograd.ts is a simple autgradient/machine learning library written in typescript that has a very similar api to that of Andrej Karpathy's micrograd.

Installation

Just copy and paste the value.ts file and the nn.ts file. I may make this an npm package or host it on a cdn at some point but for now copy and paste works.

Features

Basic auto differentiation of compute graphs, basic Multi Layer Perceptron (MLP) class. For now you need to write your own training code, it's pretty simple to do so, just calculate loss and nudge params of network so loss decreases.

Performance

Slow as hell. Don't use this for anything other than learning how basic Automatic differentiation works.

Maybe WebGPU support will come at some point but no promises.

About

a typescript library that implements a nearly identical API to Karpathy's micrograd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published