Hands-On Tutorial
Your First Local Model
From custom private JSONL logs to a fully functioning local LLM assistant in under 10 minutes.
1. Prepare Your Domain Dataset
MoroAI accepts standard chat message formats (compatible with OpenAI and Hugging Face ShareGPT/ChatML formats). Create a file called ./data/raw/finance_qa.jsonl:
{"messages": [{"role": "system", "content": "You are a corporate financial analyst assistant."}, {"role": "user", "content": "What is our company policy on capital expenditure approval limits?"}, {"role": "assistant", "content": "Under Section 4.2 of our Financial Guidelines, CapEx under $50,000 requires Department Head sign-off; amounts between $50,000 and $250,000 require CFO approval; exceeding $250,000 requires Board of Directors authorization."}]}
{"messages": [{"role": "system", "content": "You are a corporate financial analyst assistant."}, {"role": "user", "content": "How are international wire transfer exchange fees recognized?"}, {"role": "assistant", "content": "Foreign exchange wire transaction fees are recognized under Account 6420 (Bank & Transaction Fees) at the spot rate on the date of settlement."}]}
2. Compile the Dataset with Epistemic Filtering
Run the compiler to calculate token information entropy, filter duplicates, and protect rare financial guidelines:
moro data build --source ./data/raw/finance_qa.jsonl --output ./data/compiled/
The compiler outputs curated_train.jsonl and curated_val.jsonl with quality metrics.
3. Hardware Audit & Training
Generate the configuration and initiate training:
moro recipe generate --model Qwen/Qwen2.5-1.5B --hardware detect moro train
MoroAI will automatically allocate GPU tensors, optimize batch sizes, and monitor convergence with loss telemetry.
4. Test Local Inference
Once training finishes, export the model and test prompt completion immediately:
moro release deploy --target ollama --model-name finance-assistant:v1 ollama run finance-assistant:v1 "Who needs to approve a $120,000 server purchase?"