Skip to content

SwarmTrainer is a decentralized LLM fine-tuning framework powered by autonomous, role-specific agents. Agents generate, critique, and optimize training data through feedback loops, enabling emergent self-supervision. Features include modular agent logic, curriculum learning, and a full UI dashboard.

License

Notifications You must be signed in to change notification settings

moonrunnerkc/swarm_trainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwarmTrainer

WIP -- Work In Progress


🧠 Overview

SwarmTrainer is a modular Python framework for autonomous multi‑agent feedback loops to fine‑tune large language models. Agents such as Curator, Critic, Editor, Evaluator, and more work together to generate, critique, and refine training data. All without manual supervision. The system integrates curriculum learning, real‑time monitoring, and a UI dashboard to observe swarm behavior.


⚙️ What Works Now

  • Home page UI for selecting base model and agent configuration
  • Dashboard navigation routing via dashboard.py
  • Monitor page with:
    • Loading logs from local directory (default logs/agents/)
    • Summaries of agent performance (average score, error rate, response time)
    • Detailed log view, with tabs per agent, pagination, error‑filter toggles, and raw JSON display
  • Basic session and config state tracked in Streamlit session state
  • Log filtering by session ID or directory path

🔍 Current Limitations / What’s WIP

  • Backend infrastructure (API /generate, /status) is stubbed or not fully implemented
  • No persistent database for logs: uses file‑based logs; formats may vary and need normalization
  • Timing / latency metrics depend on log content; not all agents/traces include them yet
  • Some UI elements are placeholders (e.g. “Clear All” in Monitor)
  • No authentication or user management
  • Performance scaling with large log volume needs work

🚦 Architecture & Key Components

swarm_trainer/ ├── agents/ ← agent logic (curator, critic, etc.) ├── swarm_engine/ ← orchestration / consensus / memory ├── trainer/ ← curriculum and fine‑tuning logic ├── data/ ← raw / generated / annotated datasets ├── app/ │ ├── pages/ │ │ ├── home.py ← base model selection + launch UI │ │ └── monitor.py ← agent metrics & logs UI │ └── dashboard.py ← app entrypoint + sidebar routing ├── configs/ │ └── agent_profiles.yaml ← agent parameters (temperature, behavior, etc.) ├── api/ ← planned HTTP endpoints ├── utils/ │ └── logger.py ← structured logging utilities └── README.md ← you are here


🔧 Setup & Running

  1. Clone the repo
    git clone https://github.com/moonrunnerkc/swarm_trainer.git
    cd swarm_trainer

Create and activate a Python virtual environment

bash python3 -m venv venv source venv/bin/activate Install dependencies (Streamlit, PyYAML, etc.)

pip install -r requirements.txt Ensure you have a logs/agents/ directory (or point Monitor to wherever your logs are) with appropriately named YAML log files.

Run the dashboard UI streamlit run app/dashboard.py

📅 Planned Features / Roadmap Feature Status Notes

Agent‑based self‑supervised curriculum builder 🚧 In design Agents will generate data, critique, edit, and vote API endpoints for triggering training & checking status 🚧 Planned To communicate with backend controller More robust logging & standardization 🚧 WIP Uniform schemas, timestamps, structured metrics Resource usage / GPU / memory monitoring 🚧 Planned To show hardware telemetry during runs User roles / multi‑user support 🚧 Future Not in scope currently

💡 Contributing & Style Notes

All new pages/modules must expose a render() function for UI pages

Stick to existing file structure; do not rearrange modules or rename agents without plan

Use the configs/agent_profiles.yaml as single source of truth for agent behavior

Follow existing style: clear, typed, defensive, human readable

Document assumptions in function docstrings

⚠️ License & Disclaimer This project is under MIT License. It is experimental and in progress. Use at your own risk. No guarantees of stable behavior yet.

📬 Contact Made by Bradley R. Kinnard

About

SwarmTrainer is a decentralized LLM fine-tuning framework powered by autonomous, role-specific agents. Agents generate, critique, and optimize training data through feedback loops, enabling emergent self-supervision. Features include modular agent logic, curriculum learning, and a full UI dashboard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages