Teach a model on the graphics card already in your machine

3 months ago

You can already run an AI model on your own computer. Unsloth is a desktop app that also teaches one. Teaching a model means taking one that already exists and training it further on material you give it. Unsloth does that training on the graphics card in your machine.

Ask about this presentation

Chapters

  1. 0:00Unsloth · teach a model on the graphics card in your machine
  2. 0:14The training run happens in a normal application window
  3. 0:29Training fills your graphics card with the results of every step
  4. 0:50Unsloth saves one number per row and rebuilds the rest
  5. 1:27The formula is written into the source code as a comment
  6. 1:46The whole memory trick is one setting in the training panel
  7. 1:58Unsloth Desktop installs like any other application
  8. 2:22You could already run a model. Now you can teach one
Show transcript
  1. You can already run an AI model on your own computer. Unsloth is a desktop app that also teaches one. Teaching a model means taking one that already exists and training it further on material you give it. Unsloth does that training on the graphics card in your machine.

    Slide text
    Unsloth Desktop, the chat screen

    Unsloth

    teach a model your own material, on the graphics card already in your machine
    Python Apache-2.0 core and AGPL-3.0 app Windows, macOS, Linux v0.1.801-beta
    Unsloth Desktop v0.1.801-beta, released 2026-08-20
  2. Unsloth is a normal application window. You pick a model. You hand Unsloth a file of your own examples, a spreadsheet or a text file. You press start, and Unsloth shows you the run as it happens: which step it is on, and a chart of how wrong the model still is.

    Slide text

    The training run happens in a normal application window.

    the Dataset card
    “Drop file or click to upload”
    CSV · JSONL · JSON · PARQUET · PDF · DOCX · TXT · MD
    Unsloth Desktop, unsloth.ai/docs/desktop
  3. To learn, the machine walks backwards through every step it just took and works out how each step should change. On the way forward, each step takes a row of numbers and works out a new row. The machine keeps that new row, because the walk back will need it. Every step keeps its own row. That stack of kept rows is what fills up the memory on your graphics card while a model trains. Then the machine walks back through the whole stack.

    Slide text

    Training fills your graphics card with the results of every step.

    …
    the walk back
    a row of numbers one step the result it keeps the memory on your graphics card
    unsloth/kernels/rms_layernorm.py, v0.1.801-beta
  4. Unsloth's answer is to stop keeping the rows. For a step that runs twice in every layer of the model, Unsloth keeps one single number for the whole row of results, and throws those results away. That step does something simple. It stretches or shrinks a whole row of numbers by one factor it works out from the row itself. That one factor is the number Unsloth keeps. The row that went in is still there. So on the way back, the machine multiplies that row by the one factor again, and the results are back. You would expect a shortcut like that to cost you a smaller model, or a worse one. The arithmetic is exactly the same. Doing it twice is cheaper than storing the answer.

    Slide text

    Unsloth saves one number per row and rebuilds the rest on the way back.

    …
    one factor, worked out from the row itself
    a row of numbers one step what it keeps the memory on your graphics card
    Fast_RMS_Layernorm.forward
    Y = torch.empty((n_rows, n_cols), dtype = X.dtype, …)
    r = torch.empty(n_rows, dtype = torch.float32, …)
    …
    ctx.save_for_backward(X, W, r)
    (n_rows, n_cols) one value in every column of every row
    (n_rows,) one value per row
    _rms_layernorm_backward
    inv_var = tl.load(r).to(tl.float32)
    normed = X_row * inv_var
    and →
    recomputed from what is still there
    the cost moves from memory to arithmetic
    unsloth/kernels/rms_layernorm.py, v0.1.801-beta
  5. The machine can throw those results away because a person did the calculus first. The people who build Unsloth left the working in. They wrote the formula into the code itself, as a comment for whoever reads it next: four lines, by hand. The code that runs it sits a few lines down in the same file. Three separate pieces of that one file each carry their own formula, written out the same way.

    Slide text

    The formula is written into the source code as a comment.

    the comment’s own heading reads ### Backpropagation chain rule
    class LoRA_MLP(torch.autograd.Function)
    df = sigmoid(e) * (1 - f) + f dC/dW = h.T @ dY dC/dU = X.T @ (D @ W.T * f) dC/dG = X.T @ (D @ W.T * df * g)
    # Up projection LoRA weights # d_upA = X.t() @ (df @ upB.t()) … d_upA.addmm_(X.t(), df @ upB.t(), alpha = upS, beta = 0)
    LoRA_MLP LoRA_QKV LoRA_W
    each with its own ### Backpropagation chain rule
    unsloth/kernels/fast_lora.py, v0.1.801-beta
  6. That memory work used to be something you had to write code to switch on. Now the setting sits a few inches from the chart of your run. On Windows and Linux, one of the choices in that list is Unsloth itself.

    Slide text

    The whole memory trick is one setting in the training panel.

    Grad Checkpoint
    the setting that turns the memory trick on
    None
    Standard
    Unsloth
    Unsloth
    Windows and Linux
    studio/frontend/src/features/studio/sections/training-memory-params.tsx, v0.1.801-beta
  7. Unsloth Desktop is free and open source, in two parts under two licences: the training core under one, the app under another. Unsloth ships a build for Windows, Mac and Linux. This version landed two days ago and it is still before version one. The app runs in more places than it trains. Training needs a graphics card the app supports, and on some older cards the app runs while the training does not.

    Slide text

    Unsloth Desktop installs like any other application.

    Apache-2.0 core and AGPL-3.0 app v0.1.801-beta, released 2026-08-20
    Windows
    .exe · 44.0 MB
    macOS
    .dmg · 45.2 MB
    Ubuntu
    .deb · 46.9 MB
    Linux
    AppImage · 190.7 MB
    ARM64
    .app.tar.gz · 45.0 MB
    what training needs
    a graphics card the app supports
    the project’s own hardware notes
    unslothai/unsloth releases and README.md, v0.1.801-beta
  8. The people who build Unsloth worked that formula out by hand, so the machine would not have to keep the working. That is why teaching a model now fits on the card already in your computer. Find it at unsloth A I slash unsloth, on GitHub. New repo tomorrow.

    Slide text

    You could already run a model. Now you can teach one.

    github.com/unslothai/unsloth
    New repo tomorrow.

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York