AllM Assistant
AllM Assistant is a lightweight instruction-tuned LLM focused on fitness and lifestyle guidance. This repository contains training scripts, inference wrappers, a Gradio demo for Hugging Face Spaces, and a sample instruction-response dataset to fine-tune a causal LM (GPT-2 by default).
Contents
src/β model/inference/training utilitiesdata/β sampletrain.jsonlandval.jsonlhf_space/β Gradio demo apprequirements.txtβ exact package versions to reproduce the environmentREADME.md,model_card.md,LICENSE,.gitignore
Quick start (local)
- Create and activate a virtual env:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt - Train (small quick demo):
python src/trainer.py --model_name_or_path gpt2 --train_file data/train.jsonl --validation_file data/val.jsonl --output_dir outputs/allm --num_train_epochs 1 --per_device_train_batch_size 1 - Inference:
python src/inference.py --model_dir outputs/allm --prompt "Create a 10-minute beginner home workout for fat loss." - Run the demo locally:
python hf_space/app.py
Notes
- This project uses GPT-2 by default for speed. After testing, you can replace the base model with larger OSS LLMs.
- For efficient fine-tuning on limited hardware, consider using PEFT/LoRA (PEFT is included in requirements).
- The dataset included is synthetic sample data for demo and testing only β expand with high-quality real data for production.