Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 872 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 872 Bytes

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: