LLMForge is a modular LLMOps pipeline originally designed for Reddit-based dataset curation and LoRA fine-tuning on TinyLLaMA-1.1B. It automates ingestion, cleaning, training, and Hugging Face syncing β all backed by Prefect, Modal, and CI/CD best practices.
Weβve added a one-line fine-tuning CLI flow using Modal GPU compute and any Hugging Face dataset.
./llmforge finetune \
--dataset-repo yourusername/your-dataset \
--model-repo yourusername/your-model-name \
--hf-auth ./hf_token.txt \
--push-to-hubNo setup beyond a HF token file and basic venv install. Full walkthrough and screenshots below π
This update streamlines LLMForge into a modular LoRA trainer for the OSS community:
- π₯ No MLOps knowledge needed to fine-tune & push your own model
- π§Ό Old full-pipeline logic is retained but commented for now
- π Fast launch, easy to build on top of
- π Reddit-based prompt-completion dataset creation
- π§Ή Toxicity filtering using Detoxify
- βοΈ LoRA fine-tuning on Modal with GPU (
T4) - βοΈ Hugging Face Dataset + Model Hub syncing
- π
Prefectorchestration pipeline (legacy) - π New! One-command fine-tuning using unsloth via CLI + Modal
- π§ͺ CI setup with
pytestand GitHub Actions - π§ Email alerts for pipeline (optional)
After cloning the repo:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtPlace your Hugging Face token in a file named hf_token.txt.
Then run:
./llmforge finetune \
--dataset-repo yourusername/your-dataset(whatever dataset repo name you want to give) \
--model-repo yourusername/your-model-name(same naming conventions like dataset) \
--hf-auth ./hf_token.txt \
--push-to-hubThat's it. Modal will handle the GPU job and push the model to your HF.
tinylamaand old full-pipeline fine-tuning logic are commented (not deleted).- The 12-hour looped pipeline is inactive, but logic is retained for future revival.
modal secretcreation is handled dynamically using your HF token.
| Module | Role |
|---|---|
src/ |
Pipeline + finetuning logic |
tasks/ |
Prefect-wrapped tasks for orchestration |
tests/ |
Test coverage |
llmforge |
CLI to trigger training |
| Feature | Status |
|---|---|
| Reddit Ingestion with PRAW | β |
| Toxicity Filtering (Detoxify) | β |
| Prompt-Completion Generation | β |
| Hugging Face Dataset Push | β |
| LoRA Fine-tuning on Modal | β |
| Hugging Face Model Push | β |
| CLI-based Finetune Trigger | β |
CI + pytest test integration |
β |
| Email Alerts | β |
| Streamlit Inference UI (local) | β |
.
βββ hf_uploader.py
βββ inference.py
βββ LICENSE
βββ llmforge # CLI wrapper for launching fine-tune jobs
βββ prefect.yaml
βββ __pycache__
βββ README.md
βββ requirements.txt
βββ run_pipeline.py
βββ src/
β βββ data_ingestion.py
β βββ data_processor.py
β βββ email.py
β βββ finetune.py
β βββ __init__.py
β βββ __pycache__
βββ tasks/
β βββ data_ingestion_task.py
β βββ data_processor_task.py
β βββ finetune_task.py
β βββ __pycache__
βββ tests/
β βββ __init__.py
β βββ test_pipeline.py
βββ venv
βββ
---
pytest tests/β All tests pass for ETL logic and CLI triggers
LLMForge was built on a 4GB GPU laptop:
- Modal handles all remote fine-tuning
- The 12-hr pipeline is currently disabled for cost reasons
- Adapter merging was skipped for memory savings
Despite that:
- Itβs cloud-ready and reproducible
- Works on real Reddit + HF datasets
- Fully OSS and tweakable
- Merge adapters for complete model export
- Auto-deploy Streamlit via Modal or Render
- Reactivate scheduled flows (Prefect)
- Add Rouge/BLEU scoring post-finetune
- Support data balancing + multi-source ingestion
Hindol R. Choudhury MLOps β’ LLM Infra β’ Applied AI π« LinkedIn



