Skip to content

Simple Implement Transformer with C and Python for educational purpose

License

Notifications You must be signed in to change notification settings

insop/transformer_simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Implementation for Transformer with C and Python

Implement Tranformer with C and Python for educational purpose. Code is written for readability.

Build

cd lib/sml
make
cd ..

cd src/c
make

Run

C version

cd src/c
./transformer

Python version

cd src/python

python ./experiments/classify.py  --random-seed=1234 --num-epochs=1 --tiny

TODO:

  • main Makefile for build library and c executable
  • add config load
  • add trained weight load
  • add python code to generate test vector, and use that to test the C code

Reference:

About

Simple Implement Transformer with C and Python for educational purpose

Resources

License

Stars

Watchers

Forks

Packages

No packages published