← All courses

EDGE FDE

Advanced

LLM LoRA for your writing style

A practical skill for running a personalized model on a phone, not in the cloud. Clean your private writing. Train a LoRA on a Mac. Bake it into a small instruct LLM. Export a portable .aimodel plus tokenizer. Then chat on the device. The writing style is stored in the model file on the phone.

This course is for you if you can run Python on a Mac and ship a small Xcode 27 chat screen. Pair it with Diffusion LoRA to Core AI on device. The same method, for text instead of images.

The real path

Core AI has no documented hot-swap LoRA. Do not build a runtime that attaches a new writing adapter on the device. Train the LoRA on a Mac with MPS, or with CPU if MPS is missing. Merge it into the base. Export with coreai.llm.export, or with torch.export plus coreai-torch. Ship the on-device .aimodel and its tokenizer sidecar.

Lessons

  1. What a writing-style LoRA means
  2. Prepare your writing data
  3. Pick a base LLM
  4. Train a LoRA on a Mac
  5. Merge and export to Core AI
  6. Build on-device chat
  7. Evaluate the writing style
  8. End-to-end checklist

Key concepts

Takeaways

Agent briefs

Related courses

PyTorch to Core AI in Xcode · From the metal to the model · Core AI models, typed · Model architectures in plain English · Diffusion LoRA to Core AI on device

Official references

apple/coreai-models · coreai-torch docs · Apple Core AI