---
name: llm-lora-writing-style lesson 01
description: >-
  Agent recipe for lesson 01: map writing-style LoRA from private writing
  through merge, Core AI export, and on-device chat. No hot-swap LoRA.
---
# What a writing-style LoRA means

**Lesson id:** `01`  
**One-line goal:** Tell a compact writing-style adapter apart from a full fine-tune, and set the bake-then-export on-device goal.

## On-device job

Private writing stays local. The phone stores a baked `.aimodel` plus tokenizer. Core AI has no documented hot-swap LoRA.

## Prerequisites

Read the course [SKILL.md](SKILL.md). Pair with [Diffusion LoRA to Core AI on device](../diffusion-lora-coreai/).

## Inputs

A style goal, a Mac with MPS or CPU, Python 3.11+, and `uv`.

## Outputs and artifacts

A `uv` project, a device check, and a contract with `runtime_lora_swap: false`.

## Executable steps

1. Create the project with `uv init --python 3.11`, `uv venv`, and `uv add`.
2. Run the torch MPS check with `uv run`.
3. Confirm `uv run coreai.llm.export --help`.
4. Write the contract JSON. Style is not facts.
5. Draw the chain as progressive `.flow` boxes. Do not add a swap box.

## Constraints

No CUDA. No quizzes. No Mermaid. No em dashes. Keep the tokenizer in the artifact map.

## Failure modes

Runtime LoRA slot, secrets treated as knowledge, forgotten tokenizer, CUDA-only scripts.

## Key concepts

- The chain is your writing, LoRA, merged instruct LLM, `.aimodel` plus tokenizer, offline chat.
- Style is rhythm, directness, word choice, and answer shape. It is not facts.
- A LoRA still needs merge for Core AI. There is no documented runtime adapter.
- A baked model can memorize phrases. Treat the export as sensitive.

## Takeaways

- The contract sets `runtime_lora_swap: false` and keeps the corpus local.
- The device loads one ordinary language model, not a live adapter.
- The tokenizer sidecar is required.

## Done when

The five-box chain is stated without a hot-swap step. The `uv` project runs. The contract exists.

**Human lesson:** [What a writing-style LoRA means](01-what-style-lora-means.html)
