Llama2 Powered by Rust burn

185 points Illustrious_Cup1867

After a stint with Python and her erraticisms I decided to find a better way to bring machine learning models to production. Encouraged by my success at porting Whisper to Rust's deep learning framework burn, I decided to tackle the Llamas. I downloaded Meta's llama2 python model code and created a random midget llama for verifying my burn implementation. After glaring at too many inconsistent floating point number inconsistencies I finally got my llamas to agree. Then I scaled my Rusty llama and shoved one of Meta's million dollar llamas into it and was not surprised to suffer gibberish. It was an interesting mix of German words and symbols. I racked my brain to bring forth an explanation. Eventually I realized that perhaps gibberish is the default state of the llamas and that they must be sufficiently prompted to produce coherent utterances. Then I augmented my prompt and voila! I got an English speaking llama! Moral of the story: avoid snakes and carefully Whisper to your Llama.

If you also desire Rusty llamas please do check out https://github.com/Gadersd/llama2-burn. Any feedback will be greatly appreciated!