Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Refactor examples #5065

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are many ways to contribute to BentoML.

* Contributing code or documentation to the project by submitting a Github pull request.

* Create new example projects and contribute it to [bentoml/examples](https://github.com/bentoml/BentoML/tree/main/examples)
* Create new example projects and contribute it to the [Examples Index Page](https://docs.bentoml.com/en/latest/use-cases/index.html).



Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ As a contributor, you may find yourself doing one or more of the following:
relevant to you in BentoML's [issue tracker](https://github.com/bentoml/BentoML/issues).
* Investigate bugs and reviewing other developer's pull requests.
* Contribute code or documentation to the project by submitting a Github pull request.
* Create new example projects and contribute it to [bentoml/examples](https://github.com/bentoml/BentoML/tree/main/examples).
* Create new example projects and contribute it to the [Examples Index Page](https://docs.bentoml.com/en/latest/use-cases/index.html).


Contributors engage with the project through the issue tracker and mailing list. They
Expand Down
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Featured examples

Deploy an image generation application capable of creating high-quality visuals with just a single inference step.

See the :doc:`/use-cases/index` section to learn more.

Start your BentoML journey
--------------------------

Expand Down
5 changes: 0 additions & 5 deletions docs/source/reference/frameworks/flax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ Flax
This is an API reference for FLax in BentoML. Please refer to
:doc:`/frameworks/flax` for more information about how to use Flax in BentoML.


.. note::

You can find more examples for **Flax** in our `bentoml/examples https://github.com/bentoml/BentoML/tree/main/examples`_ directory.

.. currentmodule:: bentoml.flax

.. autofunction:: bentoml.flax.save_model
Expand Down
87 changes: 78 additions & 9 deletions docs/source/use-cases/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Examples
========

This section provides a variety of example projects for you to learn how BentoML can be used for different scenarios.
This section provides the tutorials for a curated list of example projects to help you learn how BentoML can be used for different scenarios.

.. grid:: 1 2 2 2
:gutter: 3
Expand All @@ -27,13 +27,6 @@ This section provides a variety of example projects for you to learn how BentoML

Deploy custom models with BentoML.

.. grid-item-card:: :doc:`/use-cases/more-examples`
:link: /use-cases/more-examples
:link-type: doc

More example projects to explore BentoML.


.. toctree::
:maxdepth: 1
:titlesonly:
Expand All @@ -42,4 +35,80 @@ This section provides a variety of example projects for you to learn how BentoML
large-language-models/index
diffusion-models/index
custom-models/index
more-examples

See the following lists for a complete collection of BentoML example projects. Browse through different categories to find the example that best suits your needs.

LLMs
----

Serve LLMs with BentoML and vLLM:

- `Llama 3.2 90B <https://github.com/bentoml/BentoVLLM/tree/main/llama3.2-90b-instruct>`_
- `Llama 3.1 70B <https://github.com/bentoml/BentoVLLM/tree/main/llama3.1-70b-instruct-awq>`_
- `Mistral 7B <https://github.com/bentoml/BentoVLLM/tree/main/mistral-7b-instruct>`_
- `Pixtral 12B <https://github.com/bentoml/BentoVLLM/tree/main/pixtral-12b>`_
- `Phi 3 mini <https://github.com/bentoml/BentoVLLM/tree/main/phi-3-mini-4k-instruct>`_
- Check out the `BentoVLLM project <https://github.com/bentoml/BentoVLLM>`_ to see more examples

Build compound AI systems on top of LLMs:

- `Build an AI agent with function calling using BentoML <https://github.com/bentoml/BentoFunctionCalling>`_
- `Build a LangGraph agent application with BentoML <https://github.com/bentoml/BentoLangGraph>`_
- `Build a multi-agent application with CrewAI and BentoML <https://github.com/bentoml/BentoCrewAI>`_
- `Build an AI assistant to ensure LLM safety with BentoML and ShieldGemma <https://github.com/bentoml/BentoShield/>`_
- `Build a RAG system for document ingestion and search with LlamaIndex and BentoML <https://github.com/bentoml/rag-tutorials>`_
- `Build a voice agent with open-source models using Twilio, Pipecat and BentoML <https://github.com/bentoml/BentoVoiceAgent>`_

Image and video
---------------

Serve text-to-image and image-to-image models with BentoML:

- `Stable Diffusion 3.5 Large Turbo <https://github.com/bentoml/BentoDiffusion/tree/main/sd3.5-large-turbo>`_
- `Stable Diffusion 3 Medium <https://github.com/bentoml/BentoDiffusion/tree/main/sd3-medium>`_
- `Stable Diffusion XL Turbo <https://github.com/bentoml/BentoDiffusion/tree/main/sdxl-turbo>`_
- `Stable Video Diffusion <https://github.com/bentoml/BentoDiffusion/tree/main/svd>`_
- `ControlNet <https://github.com/bentoml/BentoDiffusion/tree/main/controlnet>`_
- Check out the `BentoDiffusion project <https://github.com/bentoml/BentoDiffusion>`_ to see more examples

Audio
-----

Serve text-to-speech and speech-to-text models with BentoML:

- `ChatTTS <https://github.com/bentoml/BentoChatTTS>`_
- `XTTS <https://github.com/bentoml/BentoXTTS>`_
- `XTTS with a streaming endpoint <https://github.com/bentoml/BentoXTTSStreaming>`_
- `WhisperX <https://github.com/bentoml/BentoWhisperX>`_
- `Bark <https://github.com/bentoml/BentoBark>`_

Computer vision
---------------

Serve computer vision models with BentoML:

- `YOLO: Object detection <https://github.com/bentoml/BentoYolo>`_
- `ResNet: Image classification <https://github.com/bentoml/BentoResnet>`_

Embeddings
----------

Build embedding inference APIs with BentoML:

- `SentenceTransformers <https://github.com/bentoml/BentoSentenceTransformers>`_
- `CLIP <https://github.com/bentoml/BentoClip>`_

Custom models
-------------

Serve custom models with BentoML:

- `MLflow <https://github.com/bentoml/BentoML/tree/main/examples/mlflow>`_
- `XGBoost <https://github.com/bentoml/BentoML/tree/main/examples/xgboost>`_
- `scikit-learn <https://github.com/bentoml/BentoML/tree/main/examples/sk-learn>`_

Others
------

- `Build an image captioning inference API with BLIP and BentoML <https://github.com/bentoml/BentoBlip>`_
- `Build a forecasting inference API for time-series data with Moirai and BentoML <https://github.com/bentoml/BentoMoirai/>`_
22 changes: 0 additions & 22 deletions docs/source/use-cases/more-examples.rst

This file was deleted.

38 changes: 1 addition & 37 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
# BentoML Examples 🎨

The directory contains a collection of example projects demonstrating
[BentoML](https://github.com/bentoml/BentoML) usage and best practices.

## Index

| Example | Model | Functionality |
| --- | --- | --- |
| [quickstart](./quickstart/) | Transformers | Summarization |
| [inference-graph](./inference-graph/) | Text Generation, Text Classification | Distributed Services, Model Composition, Inference Graph |
| [io-descriptors](./io-descriptors/) | Pydantic | Custom IO Types |
| [model-loading-saving](./model-loading-saving/) | Stable Diffusion | Model Store |
| [monitoring/task_classification](./monitoring/task_classification/) | Classification | Model Monitoring, Classification Tasks |
| [sk-learn](./sk-learn/) | Classification | Classification |
| [mlflow](./mlflow/) | Classification | Classification |
| [xgboost](./xgboost/) | Classification | Classification |

## More examples

You can also try the following example projects.

- [BentoVLLM](https://github.com/bentoml/BentoVLLM) - Accelerate your model inference and improve serving throughput by using vLLM as your LLM backend.
- [BentoDiffusion](https://github.com/bentoml/BentoDiffusion) - Self-host diffusion models with BentoML to generate custom images and video clips.
- [BentoXTTS](https://github.com/bentoml/BentoXTTS) - Convert text to speech based on your custom audio data.
- [BentoWhisperX](https://github.com/bentoml/BentoWhisperX) - Convert spoken words into text for AI scenarios like virtual assistants, voice-controlled devices, and automated transcription services.
- [Sentence Transformer](https://github.com/bentoml/BentoSentenceTransformers) - Transform text into numerical vectors for a variety of natural language processing (NLP) tasks.
- [BentoCLIP](https://github.com/bentoml/BentoClip) - Build a CLIP (Contrastive Language-Image Pre-training) application for tasks like zero-shot learning, image classification, and image-text matching.
- [BentoBLIP](https://github.com/bentoml/BentoBlip) - Leverage BLIP (Bootstrapping Language Image Pre-training) to improve the way AI models understand and process the relationship between images and textual descriptions.
- [BentoBark](https://github.com/bentoml/BentoBark) - Generate highly realistic audio like music, background noise and simple sound effects with Bark.
- [BentoYolo](https://github.com/bentoml/BentoYolo) - Build an object detection inference API server with YOLO.
- [RAG](https://github.com/bentoml/rag-tutorials) - Self-host a private RAG app using custom embedding and language models.
- [BentoChatTTS](https://github.com/bentoml/BentoChatTTS) - Deploy a text-to-speech model ChatTTS for dialogue scenarios like chatbots and virtual assistants.
- [BentoMoirai](https://github.com/bentoml/BentoMoirai/) - Create a forecasting inference API for time-series data.
- [BentoResnet](https://github.com/bentoml/BentoResnet) - Build an image classification inference API server with ResNet.
- [BentoFunctionCalling](https://github.com/bentoml/BentoFunctionCalling/) - Build LLM function calling capabilities with BentoML.
- [BentoShield](https://github.com/bentoml/BentoShield/) - Build an AI assistant using BentoML and ShieldGemma to evaluate the safety of prompts and filter out harmful content.
- [BentoLangGraph](https://github.com/bentoml/BentoLangGraph) - Deploy a LangGraph AI agent application with BentoML.
- [BentoCrewAI](https://github.com/bentoml/BentoCrewAI) - Deploy a CrewAI multi-agent application with BentoML.
We provide a comprehensive collection of example projects to help you build and scale AI applications with BentoML for different use cases. Check out the [full list](https://docs.bentoml.com/en/latest/use-cases/index.html).
4 changes: 0 additions & 4 deletions examples/inference-graph/.bentoignore

This file was deleted.

137 changes: 0 additions & 137 deletions examples/inference-graph/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions examples/inference-graph/bentofile.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions examples/inference-graph/requirements.txt

This file was deleted.

Loading
Loading