-
vocab size: 50257
-
sequence length: 1024
-
125 M
-
takes 1 hour to reproduce
-
costs about $10
-
token embedding (768 dimentionality)
-
possition embedding (768 dimentionality)
// tensor // + - * / // graph // autograd
/opt/homebrew/Cellar/llvm/17.0.6_1/bin/clang -c -o ./build/main.o ./src/main.cpp
/opt/homebrew/Cellar/llvm/17.0.6_1/bin/clang -c -o ./build/ml.o ./src/ml.cpp
/opt/homebrew/Cellar/llvm/17.0.6_1/bin/ld64.lld -o ./build/main ./build/ml.o ./build.main.o
clang++ -c ./src/main.cpp -o ./build/main.o
clang++ -c ./src/ml.cpp -o ./build/ml.o
ld -o ./build/main ./build/ml.o ./build/main.o -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lc++
ld -arch x86_64 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -macosx_version_min 10.15 -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lc++ your_object_files.o -o your_executable
-lSystem -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
ld ./build/ml.o ./build/main.o -o ./build/main -lc++
clang++ -std=c++17 your_program.cpp -o your_program -L/opt/homebrew/lib -lc++
ld -lc++ -lSystem -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk ./build/ml.o ./build/main.o -o ./build/main
rm -rf build
mkdir build
clang++ -c ./src/ml.cpp -o ./build/ml.o
clang++ -c ./src/main.cpp -o ./build/main.o
ld \
-lc++ \
-lSystem \
-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk \
./build/ml.o ./build/main.o \
-o ./build/main
./build/main
echo $?