EDGE FDE
AdvancedLLM 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
Key concepts
- Clean private writing, train a LoRA on a Mac, merge it into a small instruct LLM, export
.aimodelplus tokenizer, chat offline. - Core AI has no documented hot-swap LoRA.
- Train on MPS or CPU only. Never CUDA.
- Course examples are
qwen3-0.6bandsmollm2instruct presets.
Takeaways
- You can bake your writing style into a model file that stays on the phone.
- You export with
coreai.llm.exportortorch.exportpluscoreai-torch. - The tokenizer sidecar ships with the model. Token ids are part of the contract.
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