Downloads · 30 days
0
ekomobng/voira-essay-lora-v1
voira-essay-lora-v1 is a machine learning model from ekomobng. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
A LoRA adapter fine-tuned on top of Llama 3.1 8B Instruct to write essays from detailed outlines. Part of the Voira essay writing system.
Downloads · 30 days
0
Access
Public
Updated Mar 19, 2026
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
A LoRA adapter fine-tuned on top of Llama 3.1 8B Instruct to write essays from detailed outlines. Part of the Voira essay writing system.
Given a structured outline containing section plans, voice notes, key phrases, and emotional cues, this adapter generates polished, human-sounding essays. It's trained to follow the outline's structure precisely while writing with genuine voice — varied rhythm, concrete imagery, emotional honesty.
This is the base essay craft LoRA — it teaches general essay writing quality. Per-user LoRA adapters can be stacked on top for individual voice personalization.
from unsloth import FastLanguageModel
from peft import PeftModel
# Load base model
model, tokenizer = FastLanguageModel.from_pretrained(
"meta-llama/Meta-Llama-3.1-8B-Instruct",
load_in_4bit=True,
)
# Load adapter
model = PeftModel.from_pretrained(model, "ekomobng/voira-essay-lora-v1")
FastLanguageModel.for_inference(model)
# Generate
outline = """--- OUTLINE ---
[your outline here]
--- END ---
Now write the essay based on this outline:"""
messages = [
{"role": "system", "content": "You are an expert essay writer. Given a detailed outline, write the essay. Output ONLY the essay text, nothing else."},
{"role": "user", "content": outline},
]
input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=2048,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
do_sample=True,
)
generated = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(generated)
The model expects outlines wrapped with --- OUTLINE --- and --- END --- markers, followed by the cue Now write the essay based on this outline:. The outline schema includes:
[Prompt:] — the essay question or topic[Word Limit:] — target length[Overall Emotional Arc:] — macro emotional trajectory[Overall Tone & Voice:] — the writer's baseline register[Introduction / Hook:] — opening strategy with MOOD and STRESS notes[Body:] — numbered sections with content plans, key phrases, voice/pacing notes, MOOD, TONAL SHIFT, and STRESS[Conclusion / Summary:] — closing strategy with final emotional landing| Parameter | Value |
|---|---|
| Base model | meta-llama/Meta-Llama-3.1-8B-Instruct |
| Method | QLoRA (4-bit quantization + LoRA) |
| LoRA rank | 32 |
| LoRA alpha | 64 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable params | 83.9M / 4.7B (1.78%) |
| Training examples | 91 |
| Validation examples | 15 |
| Epochs | 4 |
| Learning rate | 2e-4 |
| Scheduler | Cosine |
| Effective batch size | 8 (2 × 4 gradient accumulation) |
| Optimizer | AdamW 8-bit |
| Max sequence length | 8192 |
| Training loss (final) | 1.34 |
| Validation loss (final) | 1.70 |
| Hardware | NVIDIA A100 40GB |
| Training time | ~1.5 hours |
105 high-quality essays (pre-2010, verified non-AI-generated) with reverse-engineered outlines. Outlines were generated using Claude to capture the writer's planning notes — structure, specific phrases, emotional architecture, voice notes, and craft-level decisions. The training format uses train_on_responses_only=True so the model is only scored on essay generation, not outline prediction.
This adapter is part of a layered LoRA system:
Base Llama 3.1 8B Instruct
└── voira-essay-lora-v1 (this adapter — general essay craft)
└── per-user LoRA (future — individual voice adaptation)
The base adapter teaches essay craft patterns: narrative pacing, show-don't-tell, concrete detail, emotional resonance, varied sentence rhythm. Per-user adapters (trained from each user's edited outputs) will be stacked on top for voice personalization.
Voira — AI-powered essay writing that preserves human voice.