GitHub - bennyschmidt/next-token-prediction: Next-token prediction in JavaScript — build fast LLMs from scratch!
Next-Token Prediction
Create a language model based on a body of text and get high-quality predictions (next word, next phrase, next pixel, etc.). With enough training data and a good chat interface, this can be used instead of well-known decoder-only models like GPT, Mistral, etc.
Install
npm i next-token-prediction
Usage
Simple (from a built-in data bootstrap)
Put this /training/ directory in the root of your project.
Now you just need to create your app's index.js file and run it. Your model ...
Read more at github.com