Metadata-Version: 2.4
Name: pyautollm
Version: 0.2.0
Summary: AI-Native LLM Training & Infrastructure Abstraction Library
Home-page: https://github.com/Mullassery/PyAutoLLM
Author: Georgi Mammen Mullassery
Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
License: MIT
Project-URL: Repository, https://github.com/Mullassery/PyAutoLLM
Project-URL: Issues, https://github.com/Mullassery/PyAutoLLM/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: transformers>=4.30
Requires-Dist: datasets>=2.14
Requires-Dist: torch>=2.0
Requires-Dist: peft>=0.7
Requires-Dist: trl>=0.7
Requires-Dist: huggingface-hub>=0.16
Requires-Dist: docling>=1.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: requests>=2.31
Requires-Dist: python-dotenv>=1.0
Requires-Dist: keyring>=24.0
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.0
Requires-Dist: tenacity>=8.2
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"
Requires-Dist: black>=23.7; extra == "dev"
Requires-Dist: ruff>=0.0.287; extra == "dev"
Requires-Dist: mypy>=1.5; extra == "dev"
Requires-Dist: pre-commit>=3.3; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.3; extra == "docs"
Requires-Dist: myst-parser>=2.0; extra == "docs"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# PyAutoLLM

**AI-Native LLM Training & Infrastructure Abstraction Library**

Fine-tune open-weight LLMs with three lines of Python code. No ML expertise, no infrastructure knowledge required.

```python
import pytune

model = pytune.models.llama2_7b()
model.add_data("./my-documents")
trained_model = model.train()
```

That's it. The system automatically:
- Analyzes your data
- Selects the best fine-tuning method
- Picks the cheapest GPU infrastructure
- Handles all orchestration
- Evaluates quality
- Returns a ready-to-use model

## Why PyAutoLLM?

- **No Jargon:** You don't need to know LoRA, QLoRA, distributed training, or GPUs
- **Guided Setup:** Step-by-step instructions for infrastructure (RunPod, Lambda Labs, AWS)
- **Transparent Costs:** See exactly what you'll pay before training
- **Smart Defaults:** Recommended settings work for 95% of users
- **Open Source:** No vendor lock-in; runs anywhere (Ollama, vLLM, HF Inference)
- **Three-Tier Pricing:**
  - **Cheap & Fast:** $10, 2 hours, 90% quality (QLoRA on single GPU)
  - **Balanced:** $30, 5 hours, 95% quality (LoRA, recommended)
  - **Best Quality:** $80, 12 hours, 98% quality (Full retraining)

## Quick Start

### Installation (Coming Soon)

```bash
pip install pyautollm
```

### Basic Workflow

```python
import pytune

# 1. Create a model
model = pytune.models.llama2_7b()

# 2. Add your data (PDF, DOCX, CSV, TXT, Markdown, etc.)
model.add_data("./documents")

# 3. See recommended training options
recommendation = model.plan()
# Output:
# Cheap & Fast:    $10, 2h, 90% quality
# Balanced (*)     $30, 5h, 95% quality
# Best Quality:    $80, 12h, 98% quality

# 4. Train with recommended settings (or pick another tier)
trained_model = model.train()

# 5. Use your trained model
response = trained_model.generate("Your prompt here")
```

### First Time Setup (RunPod)

```python
# First time only: PyAutoLLM guides you through RunPod setup
# 1. Go to https://www.runpod.io
# 2. Create a pod with H100 GPU
# 3. Copy your API token
# 4. Paste it when prompted

# After setup, credentials are cached
model.train()  # Runs immediately on second call
```

## Documentation

- **[PRODUCT_VISION.md](PRODUCT_VISION.md)** — What is PyAutoLLM and why it matters
- **[ROADMAP.md](ROADMAP.md)** — Development phases, timeline, and deliverables

## Project Status

🚧 **Currently in development:** Phase 1 (MVP) — 4 weeks to beta release (v0.1.0)

**Milestones:**
- Phase 1 (Jul-Aug): Single model, RunPod only, guided UX
- Phase 2 (Aug): Multi-model support
- Phase 3 (Sep): Multi-provider, advanced methods
- Phase 4 (Oct): Polish, production-ready v1.0

## Architecture

PyAutoLLM is built with:
- **Rust:** High-performance orchestration layer (infrastructure, training coordination)
- **Python:** User-facing API, data analysis, ML integrations (PyO3 bindings)
- **Unsloth:** Fast fine-tuning engine
- **TRL:** Hugging Face training utilities
- **Docling:** Document parsing

```
Python API (user-friendly, guided UX)
    ↓
Rust Orchestrator (performance layer)
    ├─ Pod management (RunPod, Lambda, AWS)
    ├─ Cost calculation
    ├─ Training coordination
    └─ Monitoring & logging
    ↓
Training Engine (Unsloth + TRL)
```

## Features (MVP Phase 1)

- ✅ Single-model fine-tuning (Llama 2 7B)
- ✅ Data analysis (quality scoring, deduplication)
- ✅ Intelligent method selection (QLoRA vs LoRA)
- ✅ Cost forecasting (±10% accuracy)
- ✅ RunPod integration with guided setup
- ✅ Automatic evaluation (LLM-as-Judge)
- ✅ Training monitoring & logging

**Coming Soon (Phase 2-4):**
- Multi-model support (Mistral, LLaMA 3, Phi, etc.)
- Multi-provider infrastructure (Lambda Labs, AWS, GCP)
- Advanced training methods (DPO, continued pretraining, multi-GPU)
- Inference abstraction (vLLM, Ollama, HF Inference)
- Model versioning & registry
- Production monitoring & A/B testing

## Use Cases

- **Customer Support Agents:** Fine-tune on your support documentation
- **Domain Experts:** Create specialized assistants (legal, medical, financial)
- **Content Generation:** Adapt models to your brand voice
- **Internal Tools:** Build AI features without infrastructure expertise
- **Research:** Experiment with fine-tuning without DevOps headaches

## Contributing

This is an open-source project. We welcome contributions!

- 📖 Documentation improvements
- 🧪 Tests and examples
- 🚀 Performance optimization
- 🐛 Bug reports and fixes

## License

MIT License — See LICENSE file for details.

## Contact & Community

- **Issues:** Report bugs and request features on GitHub
- **Discussions:** Join our community discussions
- **Twitter:** [@PyAutoLLM](https://twitter.com) (coming soon)

---

**Status:** v0.1.0-beta (in development)  
**Start Date:** 2026-07-21  
**Target Release:** 2026-10-01
