Skip to content

A Python framework for efficient LLM inference, caching, and training with built-in resource management, caching, and monitoring.

License

Notifications You must be signed in to change notification settings

zachshallbetter/LlamaHome

Repository files navigation

Llama Home

A comprehensive training and inference pipeline for LLM models, featuring efficient resource management, advanced monitoring, and enterprise-grade security features.

Python Version License Code Style Security

🌟 Features

  • 🚀 High-Performance Training

    • Distributed training with efficient resource utilization
    • Dynamic batch sizing and gradient accumulation
    • Mixed-precision training with automatic optimization
    • H2O integration for enhanced performance
  • 📊 Advanced Monitoring

    • Real-time metrics tracking and visualization
    • Custom metric definitions and aggregations
    • Performance profiling and bottleneck detection
    • Resource utilization monitoring
  • 💾 Smart Resource Management

    • Multi-tier caching system with configurable policies
    • Memory-efficient data processing with streaming
    • Automatic resource scaling and optimization
    • Checkpoint management with safetensors support
  • 🔒 Enterprise Security

    • Role-based access control
    • Secure token management
    • Automated security scanning
    • Comprehensive audit logging
  • 🛠️ Developer Experience

    • Clean, modular architecture
    • Comprehensive documentation
    • Extensive test coverage
    • CI/CD integration

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • CUDA 11.7+ (for GPU support)
  • 16GB+ RAM
  • 50GB+ storage

Installation

  1. Clone the repository:

    git clone https://github.com/zachshallbetter/LlamaHome.git
    cd LlamaHome
  2. Set up your environment:

    # Create and activate virtual environment
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
    # Install dependencies
    pip install -r requirements.txt
  3. Configure your environment:

    cp .env.example .env
    # Edit .env with your settings

📚 Documentation

Our comprehensive documentation covers everything you need:

Getting Started

Core Functionality

Advanced Topics

💻 Example Usage

from llamahome.training import TrainingPipeline, CheckpointManager, MonitorManager
from llamahome.config import Config

# Initialize configuration
config = Config.from_env()

# Set up training components
pipeline = TrainingPipeline(config)
checkpoint_mgr = CheckpointManager(config)
monitor = MonitorManager(config)

# Configure training
pipeline.configure(
    model_name="llama3.3",
    batch_size=32,
    gradient_accumulation=4,
    mixed_precision="fp16"
)

# Train model
results = pipeline.train(
    train_dataset=train_data,
    val_dataset=val_data,
    epochs=10,
    checkpoint_manager=checkpoint_mgr,
    monitor=monitor
)

# Save and analyze results
checkpoint_mgr.save_best(results)
monitor.generate_report()

🧪 Testing

We maintain comprehensive test coverage:

# Run all tests
make test

# Run specific test suites
make test-unit
make test-integration
make test-performance

# Run with coverage report
make test-coverage

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Run tests (make test)
  4. Commit your changes (git commit -m 'feat: add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

About

A Python framework for efficient LLM inference, caching, and training with built-in resource management, caching, and monitoring.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages