PEFT
Safetensors
lora
fitness
structured-generation

CoachTwin Workout LoRA

LoRA adapter for Qwen/Qwen2.5-0.5B-Instruct, fine-tuned to generate structured workout plans as JSON for the CoachTwin app.

Why

The app runs on a free CPU Space, so the generative model has to be small. A base 0.5B model follows the required JSON schema unreliably and leans heavily on a repair-and-retry layer. This adapter teaches the schema and the fitness domain directly, so the small model behaves far more like a large one on this one task.

Training

  • Base: Qwen/Qwen2.5-0.5B-Instruct
  • Data: 9,873 prompt/completion pairs from OrDora/coachtwin-workouts
  • Method: LoRA, r=16, alpha=32, dropout=0.05, on q,k,v,o,gate,up,down projections
  • Schedule: 2 epochs, lr 2e-4 cosine, effective batch size 16
  • Loss masking: prompt tokens excluded (-100); the model is graded only on the workout it must generate

Results

Single-shot generation on 40 held-out requests - no retries and no repair layer, so this measures the raw model:

metric base Qwen2.5-0.5B-Instruct + CoachTwin LoRA
valid workout rate 25.0% 82.5%
parseable JSON rate 62.5% 100.0%
repairs per generation 1.55 0.20

"Valid" means the output passes the same contract that built the dataset: title free of digits, 2+ exercises all matching the requested body_focus, rest_seconds within 15-120s, equipment consistency, and non-empty warm-up and cool-down.

Usage

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
model = PeftModel.from_pretrained(base, "OrDora/coachtwin-workout-lora")
tok = AutoTokenizer.from_pretrained("OrDora/coachtwin-workout-lora")

Limitations

Trained on synthetic, model-generated data that is not expert-reviewed. It reproduces the conventions of that corpus, including its limitations. Not fitness or medical advice.

Downloads last month
17
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OrDora/coachtwin-workout-lora

Adapter
(757)
this model

Dataset used to train OrDora/coachtwin-workout-lora