Fast LiteLLM High-performance Rust acceleration for LiteLLM - providing 2-20x performance improvements for token counting, routing, rate limiting, and connection management. Why Fast LiteLLM? Fast LiteLLM is a drop-in Rust acceleration layer for LiteLLM that provides significant performance improvements: 5-20x faster token counting with batch processing token counting with batch processing 3-8x faster request routing with lock-free data structures request routing with lock-free data structures 4-12x faster rate limiting with async support rate limiting with async support 2-5x faster connection management Built with PyO3 and Rust, it seamlessly integrates with existing LiteLLM code with zero configuration required. Installation pip install fast-litellm Quick Start import fast_litellm # Automatically accelerates LiteLLM import litellm # All LiteLLM operations now use Rust acceleration where available response = litellm . completion ( model = "gpt-3.5-turbo" , messages = [{ "role" : "user" , "content" : "Hello!" }] ) That's it! Just import fast_litellm before litellm and acceleration is automatically applied. Architecture The acceleration uses PyO3 to create Python extensions from Rust code: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ LiteLLM Python Package โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ fast_litellm (Python Integration Layer) โ โ โโโ Enhanced Monkeypatching โ โ โโโ Feature Flags & Gradual Rollout โ โ โโโ Performance Monitoring โ โ โโโ Automatic Fallback โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ Rust Acceleration Components (PyO3) โ โ โโโ core (Advanced Routing) โ โ โโโ tokens (Token Counting) โ โ โโโ connection_pool (Connection Management) โ โ โโโ rate_limiter (Rate Limiting) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Features Zero Configuration : Works automatically on import : Works automatically on import Production Safe : Built-in feature flags, monitoring, ...
First seen: 2025-11-18 16:50
Last seen: 2025-11-18 18:51