|
| 1 | +# Chutes |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +| Property | Details | |
| 6 | +|-------|-------| |
| 7 | +| Description | Chutes is a cloud-native AI deployment platform that allows you to deploy, run, and scale LLM applications with OpenAI-compatible APIs using pre-built templates for popular frameworks like vLLM and SGLang. | |
| 8 | +| Provider Route on LiteLLM | `chutes/` | |
| 9 | +| Link to Provider Doc | [Chutes Website ↗](https://chutes.ai) | |
| 10 | +| Base URL | `https://llm.chutes.ai/v1/` | |
| 11 | +| Supported Operations | [`/chat/completions`](#sample-usage), Embeddings | |
| 12 | + |
| 13 | +<br /> |
| 14 | + |
| 15 | +## What is Chutes? |
| 16 | + |
| 17 | +Chutes is a powerful AI deployment and serving platform that provides: |
| 18 | +- **Pre-built Templates**: Ready-to-use configurations for vLLM, SGLang, diffusion models, and embeddings |
| 19 | +- **OpenAI-Compatible APIs**: Use standard OpenAI SDKs and clients |
| 20 | +- **Multi-GPU Scaling**: Support for large models across multiple GPUs |
| 21 | +- **Streaming Responses**: Real-time model outputs |
| 22 | +- **Custom Configurations**: Override any parameter for your specific needs |
| 23 | +- **Performance Optimization**: Pre-configured optimization settings |
| 24 | + |
| 25 | +## Required Variables |
| 26 | + |
| 27 | +```python showLineNumbers title="Environment Variables" |
| 28 | +os.environ["CHUTES_API_KEY"] = "" # your Chutes API key |
| 29 | +``` |
| 30 | + |
| 31 | +Get your Chutes API key from [chutes.ai](https://chutes.ai). |
| 32 | + |
| 33 | +## Usage - LiteLLM Python SDK |
| 34 | + |
| 35 | +### Non-streaming |
| 36 | + |
| 37 | +```python showLineNumbers title="Chutes Non-streaming Completion" |
| 38 | +import os |
| 39 | +import litellm |
| 40 | +from litellm import completion |
| 41 | + |
| 42 | +os.environ["CHUTES_API_KEY"] = "" # your Chutes API key |
| 43 | + |
| 44 | +messages = [{"content": "What is the capital of France?", "role": "user"}] |
| 45 | + |
| 46 | +# Chutes call |
| 47 | +response = completion( |
| 48 | + model="chutes/model-name", # Replace with actual model name |
| 49 | + messages=messages |
| 50 | +) |
| 51 | + |
| 52 | +print(response) |
| 53 | +``` |
| 54 | + |
| 55 | +### Streaming |
| 56 | + |
| 57 | +```python showLineNumbers title="Chutes Streaming Completion" |
| 58 | +import os |
| 59 | +import litellm |
| 60 | +from litellm import completion |
| 61 | + |
| 62 | +os.environ["CHUTES_API_KEY"] = "" # your Chutes API key |
| 63 | + |
| 64 | +messages = [{"content": "Write a short poem about AI", "role": "user"}] |
| 65 | + |
| 66 | +# Chutes call with streaming |
| 67 | +response = completion( |
| 68 | + model="chutes/model-name", # Replace with actual model name |
| 69 | + messages=messages, |
| 70 | + stream=True |
| 71 | +) |
| 72 | + |
| 73 | +for chunk in response: |
| 74 | + print(chunk) |
| 75 | +``` |
| 76 | + |
| 77 | +## Usage - LiteLLM Proxy Server |
| 78 | + |
| 79 | +### 1. Save key in your environment |
| 80 | + |
| 81 | +```bash |
| 82 | +export CHUTES_API_KEY="" |
| 83 | +``` |
| 84 | + |
| 85 | +### 2. Start the proxy |
| 86 | + |
| 87 | +```yaml |
| 88 | +model_list: |
| 89 | + - model_name: chutes-model |
| 90 | + litellm_params: |
| 91 | + model: chutes/model-name # Replace with actual model name |
| 92 | + api_key: os.environ/CHUTES_API_KEY |
| 93 | +``` |
| 94 | +
|
| 95 | +## Supported OpenAI Parameters |
| 96 | +
|
| 97 | +Chutes supports all standard OpenAI-compatible parameters: |
| 98 | +
|
| 99 | +| Parameter | Type | Description | |
| 100 | +|-----------|------|-------------| |
| 101 | +| `messages` | array | **Required**. Array of message objects with 'role' and 'content' | |
| 102 | +| `model` | string | **Required**. Model ID or HuggingFace model identifier | |
| 103 | +| `stream` | boolean | Optional. Enable streaming responses | |
| 104 | +| `temperature` | float | Optional. Sampling temperature | |
| 105 | +| `top_p` | float | Optional. Nucleus sampling parameter | |
| 106 | +| `max_tokens` | integer | Optional. Maximum tokens to generate | |
| 107 | +| `frequency_penalty` | float | Optional. Penalize frequent tokens | |
| 108 | +| `presence_penalty` | float | Optional. Penalize tokens based on presence | |
| 109 | +| `stop` | string/array | Optional. Stop sequences | |
| 110 | +| `tools` | array | Optional. List of available tools/functions | |
| 111 | +| `tool_choice` | string/object | Optional. Control tool/function calling | |
| 112 | +| `response_format` | object | Optional. Response format specification | |
| 113 | + |
| 114 | +## Support Frameworks |
| 115 | + |
| 116 | +Chutes provides optimized templates for popular AI frameworks: |
| 117 | + |
| 118 | +### vLLM (High-Performance LLM Serving) |
| 119 | +- OpenAI-compatible endpoints |
| 120 | +- Multi-GPU scaling support |
| 121 | +- Advanced optimization settings |
| 122 | +- Best for production workloads |
| 123 | + |
| 124 | +### SGLang (Advanced LLM Serving) |
| 125 | +- Structured generation capabilities |
| 126 | +- Advanced features and controls |
| 127 | +- Custom configuration options |
| 128 | +- Best for complex use cases |
| 129 | + |
| 130 | +### Diffusion Models (Image Generation) |
| 131 | +- Pre-configured image generation templates |
| 132 | +- Optimized settings for best results |
| 133 | +- Support for popular diffusion models |
| 134 | + |
| 135 | +### Embedding Models |
| 136 | +- Text embedding templates |
| 137 | +- Vector search optimization |
| 138 | +- Support for popular embedding models |
| 139 | + |
| 140 | +## Authentication |
| 141 | + |
| 142 | +Chutes supports multiple authentication methods: |
| 143 | +- API Key via `X-API-Key` header |
| 144 | +- Bearer token via `Authorization` header |
| 145 | + |
| 146 | +Example for LiteLLM (uses environment variable): |
| 147 | +```python |
| 148 | +os.environ["CHUTES_API_KEY"] = "your-api-key" |
| 149 | +``` |
| 150 | + |
| 151 | +## Performance Optimization |
| 152 | + |
| 153 | +Chutes offers hardware selection and optimization: |
| 154 | +- **Small Models (7B-13B)**: 1 GPU with 24GB VRAM |
| 155 | +- **Medium Models (30B-70B)**: 4 GPUs with 80GB VRAM each |
| 156 | +- **Large Models (100B+)**: 8 GPUs with 140GB+ VRAM each |
| 157 | + |
| 158 | +Engine optimization parameters available for fine-tuning performance. |
| 159 | + |
| 160 | +## Deployment Options |
| 161 | + |
| 162 | +Chutes provides flexible deployment: |
| 163 | +- **Quick Setup**: Use pre-built templates for instant deployment |
| 164 | +- **Custom Images**: Deploy with custom Docker images |
| 165 | +- **Scaling**: Configure max instances and auto-scaling thresholds |
| 166 | +- **Hardware**: Choose specific GPU types and configurations |
| 167 | + |
| 168 | +## Additional Resources |
| 169 | + |
| 170 | +- [Chutes Documentation](https://chutes.ai/docs) |
| 171 | +- [Chutes Getting Started](https://chutes.ai/docs/getting-started/running-a-chute) |
| 172 | +- [Chutes API Reference](https://chutes.ai/docs/sdk-reference) |
0 commit comments