Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ ForgeOS

Zero-Code Personal LLM Fine-Tuning Desktop Application

Import documents β†’ Generate training data β†’ Fine-tune a model β†’ Chat with it.
No terminal. No Python. No ML jargon.

License Python React Tauri FastAPI


ForgeOS democratizes LLM fine-tuning by wrapping the entire pipeline β€”
document ingestion, dataset creation, LoRA training, and inference β€”
inside a beautiful desktop app that anyone can use.


✨ Features

Feature Description
πŸ“„ Document Ingestion Drag-and-drop PDF, DOCX, TXT, CSV, and Markdown files. Automatic parsing, cleaning, and intelligent chunking with section-aware splitting.
🧠 Dataset Generation Auto-generate instruction/output training pairs using Ollama LLMs or built-in rule-based NLP. Review, edit, approve, or reject each pair.
πŸ“¦ Model Catalog 9 curated open-source models (Llama 3.2, Mistral 7B, Gemma 2, Phi-3, Qwen 2.5) with GGUF quantization variants and VRAM recommendations.
⚑ LoRA Training One-click fine-tuning via Unsloth with configurable hyperparameters. Real-time loss curves, step tracking, and ETA. Simulation mode for testing.
πŸ’¬ Chat Interface Streaming chat with any Ollama model. Temperature control, system prompts, and message history. Test your fine-tuned model instantly.
πŸ–₯️ Hardware Detection Auto-detects NVIDIA GPU, Apple Silicon, CPU, RAM, CUDA, and Ollama. Provides intelligent training mode recommendations.
πŸ“Š Dataset Export Export approved training pairs as JSONL, JSON, or CSV β€” ready for any training framework.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Tauri v2 Desktop Shell                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚              React 18 + TypeScript Frontend            β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚  Ingest  β”‚ β”‚ Dataset  β”‚ β”‚  Models  β”‚ β”‚   Chat   β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚          β”‚   HTTP / SSE (localhost:47899)       β”‚            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚       β–Ό            β–Ό            β–Ό            β–Ό         β”‚  β”‚
β”‚  β”‚              FastAPI Backend (Python 3.10+)            β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚  Parser  β”‚ β”‚Generator β”‚ β”‚ Catalog  β”‚ β”‚ Trainer  β”‚   β”‚  β”‚
β”‚  β”‚  β”‚ Chunker  β”‚ β”‚ Reviewer β”‚ β”‚ Ollama   β”‚ β”‚ Unsloth  β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Ollama (11434)   β”‚
                    β”‚  Local LLM Runner  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Layer Technology
Desktop Shell Tauri v2 (Rust)
Frontend React 18 Β· TypeScript 5 Β· Vite 5
Styling TailwindCSS v3 Β· Framer Motion
State Zustand v5 Β· TanStack Query v5
Backend Python 3.10+ Β· FastAPI Β· Uvicorn
ML Training Unsloth Β· LoRA Β· QLoRA
Inference Ollama
Monorepo Turborepo Β· pnpm

πŸš€ Getting Started

Prerequisites

Tool Version Required
Node.js β‰₯ 18 βœ…
pnpm β‰₯ 9 βœ…
Python β‰₯ 3.10 βœ…
Rust β‰₯ 1.70 βœ… (for Tauri builds)
Ollama Latest Recommended
NVIDIA GPU + CUDA β€” For real training

Installation

# 1. Clone the repository
git clone https://github.com/your-username/ForgeOS.git
cd ForgeOS

# 2. Install frontend dependencies
pnpm install

# 3. Set up Python backend
cd apps/backend
python -m venv .venv

# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate

pip install -r requirements.txt

# 4. Return to project root
cd ../..

Running in Development

# Terminal 1 β€” Start the backend
cd apps/backend
.venv/Scripts/python -m uvicorn app.main:app --host 127.0.0.1 --port 47899 --reload

# Terminal 2 β€” Start the frontend (Vite dev server)
pnpm dev:desktop

# Terminal 3 (Optional) β€” Start Tauri desktop shell
pnpm --filter @forgeos/desktop tauri dev

Verify Installation

# Health check
curl http://127.0.0.1:47899/api/v1/health
# β†’ {"status":"ok","version":"1.0.0","uptime_seconds":5.2,"platform":"Windows"}

# Hardware detection
curl http://127.0.0.1:47899/api/v1/system/hardware
# β†’ {"cpu_info":{"name":"...","cores":12},"ram":{"total_gb":15.7},...}

# Model catalog
curl http://127.0.0.1:47899/api/v1/models/catalog
# β†’ {"models":[{"id":"llama3.2-1b","display_name":"Llama 3.2 1B",...},...]}

πŸ“ Project Structure

ForgeOS/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ backend/                    # Python FastAPI backend
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ api/v1/             # REST endpoints
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ system.py       #   Health + hardware
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ingestion.py    #   File upload + processing
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dataset.py      #   Dataset CRUD + export
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ models.py       #   Model catalog + Ollama
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ training.py     #   Training jobs
β”‚   β”‚   β”‚   β”‚   └── inference.py    #   Chat / streaming
β”‚   β”‚   β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ hardware.py     #   GPU/CPU/RAM detection
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ file_parser.py  #   PDF/DOCX/TXT/CSV/MD
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ chunker.py      #   Intelligent text splitting
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ingestion.py    #   Ingestion orchestration
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dataset_generator.py  # Q&A pair generation
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dataset.py      #   Dataset management
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ models.py       #   Model catalog (9 models)
β”‚   β”‚   β”‚   β”‚   └── training.py     #   Unsloth LoRA training
β”‚   β”‚   β”‚   β”œβ”€β”€ schemas/            # Pydantic v2 models
β”‚   β”‚   β”‚   β”œβ”€β”€ core/               # Config, logging, lifecycle
β”‚   β”‚   β”‚   └── main.py             # FastAPI application
β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   └── pyproject.toml
β”‚   β”‚
β”‚   └── desktop/                    # Tauri + React frontend
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ features/           # Feature pages
β”‚       β”‚   β”‚   β”œβ”€β”€ ingestion/      #   Drag-and-drop file upload
β”‚       β”‚   β”‚   β”œβ”€β”€ dataset/        #   Dataset review + approval
β”‚       β”‚   β”‚   β”œβ”€β”€ models/         #   Model catalog browser
β”‚       β”‚   β”‚   β”œβ”€β”€ training/       #   Training dashboard
β”‚       β”‚   β”‚   β”œβ”€β”€ chat/           #   Streaming chat interface
β”‚       β”‚   β”‚   └── settings/       #   System info + config
β”‚       β”‚   β”œβ”€β”€ components/layout/  # AppShell, Sidebar, TopBar
β”‚       β”‚   β”œβ”€β”€ stores/             # Zustand state management
β”‚       β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚       β”‚   β”œβ”€β”€ lib/                # API client, utilities
β”‚       β”‚   └── router.tsx          # View-based routing
β”‚       └── src-tauri/              # Rust Tauri backend
β”‚
β”œβ”€β”€ packages/
β”‚   └── shared-types/               # Shared TypeScript definitions
β”‚
β”œβ”€β”€ turbo.json                      # Turborepo configuration
β”œβ”€β”€ pnpm-workspace.yaml             # pnpm workspace config
β”œβ”€β”€ LICENSE                         # Apache 2.0
└── README.md                       # This file

πŸ”Œ API Reference

All endpoints are prefixed with /api/v1.

System

Method Endpoint Description
GET /health Health check
GET /system/hardware Detect GPU, CPU, RAM, CUDA

Ingestion

Method Endpoint Description
POST /ingestion/sessions Upload files (multipart)
POST /ingestion/sessions/:id/process Process files β†’ SSE stream
GET /ingestion/sessions/:id/chunks Get paginated chunks

Dataset

Method Endpoint Description
POST /dataset/generate Generate Q&A pairs β†’ SSE stream
GET /dataset/:id/pairs Get pairs (filterable by status)
PUT /dataset/:id/pairs/:pid Edit a pair
POST /dataset/:id/approve-all Bulk approve pending pairs
GET /dataset/:id/export?format=jsonl Export approved pairs

Models

Method Endpoint Description
GET /models/catalog Browse curated models
GET /models/ollama List installed Ollama models
POST /models/pull/:name Pull model via Ollama β†’ SSE

Training

Method Endpoint Description
POST /training/start Start LoRA training β†’ SSE stream
GET /training/active Get active training job
POST /training/jobs/:id/cancel Cancel training

Inference

Method Endpoint Description
POST /inference/chat Streaming chat with Ollama
GET /inference/models List available chat models

πŸ“¦ Supported Models

Model Provider Parameters VRAM License
Llama 3.2 1B Meta 1B 2 GB Llama 3.2 Community
Llama 3.2 3B Meta 3B 4 GB Llama 3.2 Community
Llama 3.1 8B Meta 8B 8 GB Llama 3.1 Community
Mistral 7B v0.3 Mistral AI 7B 8 GB Apache 2.0
Gemma 2 2B Google 2B 3 GB Gemma License
Gemma 2 9B Google 9B 10 GB Gemma License
Phi-3 Mini Microsoft 3.8B 4 GB MIT
Qwen 2.5 3B Alibaba 3B 4 GB Apache 2.0
Qwen 2.5 7B Alibaba 7B 8 GB Apache 2.0

πŸ”§ Configuration

ForgeOS stores all data in your system's app data directory:

Platform Path
Windows %APPDATA%\ForgeOS\
macOS ~/Library/Application Support/ForgeOS/
Linux ~/.local/share/ForgeOS/
ForgeOS/
β”œβ”€β”€ models/       # Downloaded model files
β”œβ”€β”€ datasets/     # Generated training datasets
β”œβ”€β”€ sessions/     # Ingestion session data
β”œβ”€β”€ logs/         # Application logs
└── temp/         # Temporary upload files

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the Apache License 2.0 β€” see the LICENSE file for details.


πŸ™ Acknowledgments

  • Unsloth β€” Fast LoRA fine-tuning
  • Ollama β€” Local LLM inference
  • Tauri β€” Lightweight desktop framework
  • FastAPI β€” Modern Python web framework
  • React β€” UI framework
  • Framer Motion β€” Animations


ForgeOS β€” Making LLM fine-tuning accessible to everyone.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages