Giter VIP home page Giter VIP logo

llama2.zig's People

Contributors

arrufat avatar cgbur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

llama2.zig's Issues

zig build and baseline zig cc

( CONTROL BUILD WITH upstream main branch and zig cc)
.PHONY: winzig
winzig:
c:\zig\zig cc -Doptimize=ReleaseFast -march=native -ffinite-loops -DCOMPILER="ZIG" -Ofast -fno-math-errno -D_WIN32 -o runzig.exe -I. -xc save_to_file.c run.c win.c base64_utils.c

../babylwin.c/runzig ../out/model15M.bin -z ..\out\tok32k.bin -t 0 -p 1.0 -n 0 -s 42 -i "Varsa ran"
Varsa ran to the park. She saw a big, red balloon in the sky. She wanted to catch it. She ran after it, but it was too high. She tried to jump, but she couldn't reach it.Suddenly, a boy came up to her. He had a big smile on his face. He said, "I can help you catch the balloon!" He ran up to the balloon and grabbed it. He held it tight and said, "I'm going to release it!"The boy ran around the park, pulling the balloon with all his might. He was so strong! The balloon flew up into the sky. The boy was so happy. He said, "Thank you for helping me!"The boy and Vars played with the balloon all day. They had so much fun. They were the best of friends. Once upon a time, there was a little girl named Lily. She loved to play outside in the sunshine. One day, she saw a big, red ball in the sky. It was the sun! She thought it was so pretty.Lily wanted to play with the ball

achieved tok/s: 35.250207 for ZIG

main.exe ../out/model15M.bin -t 0 -v -s 42 -p 1.0 -i "Versa ran"
config: main.Config{ .dim = 288, .hidden_dim = 768, .n_layers = 6, .n_heads = 6, .n_kv_heads = 6, .vocab_size = 32000, .seq_len = 256 }
shared weights: true
temperature: 0
top-p: 1
SIMD vector size: 4

Versa ran to the park. He was very excited to go and play. He saw a big slide and he wanted to go on it. He ran to the slide and started to climb up. He was so excited that he started to slide down. He went faster and faster and he felt like he was flying. He was having so much fun!
Suddenly, he heard a loud noise. He looked up and saw a big truck. It was carrying a lot of boxes. He was so excited that he started to run towards it. He was so excited that he forgot to be careful. He ran right into the truck and the boxes fell out of the truck. He was so scared and he started to cry.
The truck driver saw what happened and he was very sorry. He said to the boy, "I'm sorry, I didn't mean to scare you. I was just having fun." The boy was so sorry that he had been scared. He said, "It's okay. I'm sorry I scared you. I'm sorry I scared you."
The truck driver smiled and said, "It's okay. I'm sorry I sc

61 tokens per second

and the apples versus oranges acid test (clang + omp)

.PHONY: winclang
winclang:
clang -march=native -ffinite-loops -fopenmp -DCOMPILER="CLANG" -D_CRT_SECURE_NO_WARNINGS -Ofast -fno-math-errno -D_WIN32 -o run.exe -I. -xc run.c win.c base64_utils.c save_to_file.c

$env:OMP_NUM_THREADS=4; ../babylwin.c/run ../out/model15M.bin -z ..\out\tok32k.bin -t 0 -p 1.0 -n 0 -s 42 -i "Varsa ran"
Varsa ran to the park. She saw a big, red balloon in the sky. She wanted to catch it. She ran after it, but it was too high. She tried to jump, but she couldn't reach it.Suddenly, a boy came up to her. He had a big smile on his face. He said, "I can help you catch the balloon!" He ran up to the balloon and grabbed it. He held it tight and said, "I'm going to release it!"The boy ran around the park, pulling the balloon with all his might. He was so strong! The balloon flew up into the sky. The boy was so happy. He said, "Thank you for helping me!"The boy and Vars played with the balloon all day. They had so much fun. They were the best of friends. Once upon a time, there was a little girl named Lily. She loved to play outside in the sunshine. One day, she saw a big, red ball in the sky. It was the sun! She thought it was so pretty.Lily wanted to play with the ball

achieved tok/s: 91.660676 for CLANG

Hope it helps. not really an issue, more for your ref.

utf8 input breaks stuff

main.exe ../out/model15M.bin -t 0 -v -s 42 -i "Værså ran"
config: main.Config{ .dim = 288, .hidden_dim = 768, .n_layers = 6, .n_heads = 6, .n_kv_heads = 6, .vocab_size = 32000, .seq_len = 256 }
shared weights: true
temperature: 0
top-p: 1
SIMD vector size: 4

error: TokenNotFound

main.exe ../out/model15M.bin -t 0 -v -s 42 -i "Versa ran"
config: main.Config{ .dim = 288, .hidden_dim = 768, .n_layers = 6, .n_heads = 6, .n_kv_heads = 6, .vocab_size = 32000, .seq_len = 256 }
shared weights: true
temperature: 0
top-p: 1
SIMD vector size: 4

Versa ran to the park. et cetera

Windows failing to run

Reported that it does not work properly on windows. Pushed 631d596 to avoid using linux specific mappings. Will test and debug to get it working properly on windows this weekend.

Thank you @Freakman on discord for testing this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.