XSLM — build AI yourself, inside your browser
is a tiny you build yourself in your web . Learn the five steps of every project in Basic, then build a tiny in Advanced.
Two courses
Basic teaches the order of work that every project follows. Advanced uses the same order to build a itself. Basic runs in JupyterLab and Advanced in a , both inside the page, with nothing to install.
Basic · Build AI in five steps
Build a small spam filter in five steps: prepare, analyze, preprocess, train and evaluate. You learn the and the of AI development with short .
Advanced · Build AI
Build an , a tiny , from the first line: , model, training, text generation, a , your own chat and publishing your model.
What is XSLM — one step smaller than LLMs and SLMs
XSLM (Extra Small Language Model) is one step smaller than large language models () and (SLMs): it means a very small AI model with millions to a few hundred million . It is a term coined by sonub.com.
- LLM: tens to hundreds of billions of parameters. Runs on in .
- SLM: around a few billion parameters. Runs on a powerful computer or a single GPU.
- XSLM: millions to a few hundred million parameters. Runs even on small devices such as smartphones.
XSLM has three key features.
- Optimized for use: the model is so light that it runs on its own, without a connection, even on devices with very limited computing power such as smartphones, wearables and equipment.
- Very low cost: a typical SLM needs several gigabytes () of just to load, but an XSLM runs in a few hundred megabytes (MB) of or less. So and running it costs almost nothing.
- A specialist for one job (Specialized Worker): unlike an LLM that knows a lot like an encyclopedia, an XSLM is built to do just one job very well, such as summarizing sentences, classifying text, or routing for an AI (Router).
The XSLM you build in this course is far smaller still: a learning model with 1,248 parameters. It is shrunk to the smallest size so you can follow the principles with your own eyes, but the parts are the same. Grow the same structure and train it on data for one job, and it becomes the practical XSLM described above.
What is a language model — a function that gives next-token probabilities
A language model is a function that looks at the text so far and gives a to each possible next piece (). For example, after "the sun is", it might give 0.6 to warm, 0.2 to hot and 0.01 to blue, and share the remaining 0.19 among the other tokens in the . The probabilities of the whole vocabulary add up to 1.
Writing text means repeating this function.
- Turn the text so far into .
- The model computes the probability of each next token.
- Pick one token according to those probabilities.
- Append the chosen token to the text and go back to the start.
Huge models like and work on the same basis. What differs is their size (hundreds of billions of ), the amount of , and extra training that makes them good at conversation. XSLM builds this basis from scratch at the smallest size, so you can see with your own eyes what each part does.
Grow it the same way and it becomes an SLM
Learning is not the end. You only need to keep growing the size the same way.
-
Learn XSLM on sonub.com Inside your web
-
Build a bigger XSLM on your own computer The same way, at a larger size
-
Build it bigger still: an The same way, even larger
The steps stay the same. As the size grows, you need more , a stronger computer and more time, and you hand the calculations to a tool such as .
Everything happens in your browser
Basic gives you JupyterLab with Python, and Advanced gives you a real Linux (), both running inside your web . You type Python, run it and see the result, on a computer, a tablet or a phone. Nothing is installed on your device.