tairov / llama2.mojo

Inference Llama 2 in one file of pure 🔥
https://www.modular.com/blog/community-spotlight-how-i-built-llama2-by-aydyn-tairov
MIT License
2.09k stars 140 forks source link

How to use mojo playground to run this model? #6

Closed yhyu13 closed 1 year ago

yhyu13 commented 1 year ago

Hi,

Maybe a stupid question, I couldn't find a way to execute shelll cmd in mojo player ground's console or notebook. How did you manage to run this project in the mojo playground?

Thanks!

tairov commented 1 year ago
  1. Upload stories15M.bin to playground
  2. Upload tokenizer.bin
  3. Upload read directory
  4. Create a notebook
  5. Copy paste llama2.mojo content to code section 1 for example
  6. Add code section 2 and put this call to it main()
  7. Execute both code sections one by one