agershun / llamajs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Llama2.c port to JavaScript

This is a JavaScript version of the popular llama2.c library by Andrej Karpathy.

Place the model file (e.g. stories15M.bin) into the directory.

wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin

Then run the LLM.

> node src/main.js stories15M.bin -i "Tell me a story "

The repo is not yet on npm, byt if you prefer to run from outside of the repo you can install it globally via npm

> npm install -g .
> llamajs stories15M.bin -i "Tell me a story "

License

MIT

About


Languages

Language:JavaScript 100.0%