Everything K-culture — comebacks to K-beauty, straight to your inboxGet it in your inbox

METAL MEDIA

Greninja9257/LabLLM

22SwiftMIT

A Mac app that lets you build and train your own language model from scratch

LabLLM is a native macOS app that runs the whole language-model workflow locally on Apple Silicon, from designing a Transformer to training, fine-tuning, and chatting with it. There is no cloud upload and no subscription; everything stays on the Mac. It is written in Swift and accelerated with Apple's MLX framework.

What it does

  1. You can design a GPT-style decoder inside the app and feed it data from Hugging Face, local files, or even imported iMessage conversations
  2. It supports pretraining with AdamW/SGD, warmup, cosine learning-rate schedules, and gradient clipping, plus LoRA and DPO fine-tuning, with live loss curves and generated samples during training
  3. Trained models can be saved and resumed as checkpoints, exported as 4-bit or 8-bit quantized models, or served locally through an OpenAI-shaped API for immediate chatting
  4. It includes inspection tools like an 'X-Ray' token viewer showing token probabilities and entropy, and an embedding explorer that projects embeddings into 2D space
  5. The repository currently has 22 GitHub stars and is described as beta software, built and documented mainly by a single developer so far

Why it matters

It turns the process of building and training a language model into something you can do hands-on with a single Mac, instead of a black box that requires cloud infrastructure. Its local-first design also matters for anyone who wants to experiment with private data without sending it anywhere.

Terms in this repo

  • MLX · Apple's framework for running machine-learning computations efficiently on Apple Silicon chips
  • Transformer · The neural network architecture that most modern language models are built on
  • LoRA · A fine-tuning technique that trains a small set of added parameters instead of the whole model, saving compute
  • DPO · A training method that adjusts a model using pairs of preferred and non-preferred responses
  • Quantization · Reducing the numerical precision of model weights to shrink size and computation

Repository description (English)

build the architecture, train the weights, and watch a small LLM emerge from scratch, locally on Apple Silicon with custom data, tokenizers, checkpoints, and MLX acceleration.

Open on GitHub

Trending repos

All repos →

Latest from METAL MEDIA