Skip to content

CerebriumAI/examples

Repository files navigation

Welcome to Cerebrium's official examples repository! This collection of examples helps you get started with building Machine Learning / AI applications on the platform. Whether you're looking to deploy LLMs, process voice data, or handle image and video tasks, you'll find practical, ready-to-use examples here.

How to Use This Repository

Each example is a self-contained project that demonstrates a specific use case. You can explore the examples in any order, depending on your interests and needs. Each example includes detailed instructions on how to deploy the application on the Cerebrium platform.

Deploy each example by cloning the repo and running the cerebrium deploy command in each example folder.

Categories

We've split each of the examples by category to make them easier to find.

1. Getting started 🚀

  1. Deploy your first model
  2. Managing secrets and configurations
  3. CPU-only workloads

2. Advanced Concepts 🧠

  1. Improve inference speed with VLLM
  2. Deploying Inferentia
  3. Loading model weights faster
  4. Multi-GPU inference

3. Endpoints 🛤

  1. WebSockets
  2. Implement simple output streaming

4. Integrations 🤝

  1. Create a Langchain QA system
  2. Create a virtual calendar assistant with Langsmith

5. Large Language Models 📚

  1. Create an OpenAI compatible endpoint with vLLM
  2. Stream results from Falcon 7B to a client
  3. Build a code review tool with Winston

6. Voice 🎤

  1. Transcription service using Whisper
  2. Create a realtime voice agent
  3. Create a voice agent that leverages current context with RAG
  4. Create a WebSockets-based voice agent using Twilio
  5. Clone voices with XTTS
  6. Build your own OpenAI realtime API replacement

7. Image & Video 📸

  1. Deploy ComfyUI on Cerebrium
  2. Build a ControlNet logo detection system
  3. Refined image generation with SDXL
  4. Using SDXL Lightning for image processing
  5. Fast stable diffusion for image generation
  6. Regular stable diffusion for image generation
  7. How to generate images faster with SDXL

8. Migrations 🚚

  1. Migrate your COG model to SDXL

9. Application demos 🎬

  1. Create a sales training tool with Mistral
  2. Find products for sale using a live video stream

10. Batching 📦

  1. Implement batching with LitServe - CPU version
  2. Implement batching with LitServe - GPU version
  3. Batching requests with vLLM
  4. Batching requests with transformers

11. Python apps 🌐

  1. Deploy FastAPI applications
  2. Create ML web interfaces with Gradio

How to Contribute 🤝

We love contributions! Here's how you can contribute to our examples repository:

  • Fork the repository

  • Create a new branch for your example

  • Add your example following our template

  • Include a clear README with:

    • Description of the example
    • Requirements
    • Step-by-step setup instructions
    • Expected outputs
    • (Optional) Link to a blog post or tutorial video

Share your fork with us on our Discord & Slack communities or on social media. Highly valuable examples for the community will be merged into the master repo.

🎁 Get Free Swag!

For each successful contribution, we'll send you exclusive Cerebrium swag! To be eligible:

  • Your PR must be merged
  • Fill out the contributor form with your shipping details
  • Bonus swag for contributions that include:
    • A blog post explaining your example
    • A tutorial video demonstrating your example

🦮 Contribution Guidelines

  • Ensure your example is well-documented
  • Make sure that your example deploys successfully
  • Add appropriate error handling
  • Follow our code style as much as possible
  • Test your example thoroughly
  • Update the main README.md to include your example

Support 🛟

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages