/notebooks

Primary LanguageJupyter Notebook

ConsoleDocsTemplatesDiscord

Brev.dev Notebooks

This repo contains helpful AI/ML notebook templates for LLMs, multi-modal models, image segmentation, and more. Each notebook has been coupled with the minimum GPU specs required to use them along with a 1-click deploy badge that starts each notebook on a GPU.

Contributing

We welcome contributions to this repository! If you have a notebook you'd like to add, please reach out to use the Discord or open a pull request!

Notebooks

We've split the notebooks into categories based on the type of task they're designed for. Our current split is: LLM finetuning/training, multi-modal models, computer vision/image segmentation, and miscellaneous. Let us know if you want to see more notebooks for a certain task or using different frameworks and tools!

LLM Finetuning/Training

Notebook Description Min. GPU Deploy
Fine-tune Llama3 using Direct Preference Optimization Fine-tune Llama3 using DPO 1x A100 Colab  Click here to deploy.
Fine-tune Llama3 using SFT Fine-tune and deploy Llama 3 2x A100 Colab  Click here to deploy.
Fine-tune Llama 2 A Guide to Fine-tuning Llama 2 1x A10G Colab  Click here to deploy.
Fine-tune Llama 2 - Own Data Fine-tune Llama 2 on your own dataset 1x A10G Colab  Click here to deploy.
Fine-tune Mistral A Guide to Fine-tuning Mistral 1x A10G Colab  Click here to deploy.
Fine-tune Mistral using NVIDIA NeMO and PEFT Fine-tune Mistral using NVIDIA NeMO and PEFT 1x A100 Colab  Click here to deploy.
Fine-tune Mistral - Own Data Fine-tune Mistral on your own dataset 1x A10G Colab  Click here to deploy.
Fine-tune Mixtral (8x7B MoE) A Guide to Fine-tuning Mixtral, Mistral's 8x7B MoE 4x T4 Colab  Click here to deploy.
Fine-tune Mixtral (8x7B MoE) - Own Data A Guide to Fine-tuning Mixtral on your own dataset 4x T4 Colab  Click here to deploy.
Fine-tune BioMistral A Guide to Fine-tuning BioMistral 1x A10G Colab  Click here to deploy.
Fine-tune Phi-2 A Guide to Fine-tuning Phi-2 1x A10G Colab  Click here to deploy.
Fine-tune Phi-2 - Own Data Fine-tune Phi-2 on your own dataset 1x A10G Colab  Click here to deploy.
Training Question/Answer models using NVIDIA NeMo Use NeMo to train BERT, GPT, and S2S models for Q&A tasks 1x A10G Colab  Click here to deploy.

LLM Inference/Deployment

Notebook Description Min. GPU Deploy
Run inference on Llama3 using TensorRT-LLM Run inference on Llama3 using TensorRT-LLM 1x A10G Colab  Click here to deploy.
Inference on DBRX with VLLM and Gradio Run inference on DBRX with VLLM and Gradio 4x A100 Colab  Click here to deploy.
Run BioMistral Run BioMistral 1x A10G Colab  Click here to deploy.
Run Llama 2 70B Run Llama 2 70B, or any Llama 2 Model 4x T4 Colab  Click here to deploy.
Use TensorRT-LLM with Mistral Use NVIDIA TensorRT engine to run inference on Mistral-7B 1x A10G Colab  Click here to deploy.
StreamingLLM for Optimized Inference Use StreamingLLM for infinite length input without finetuning 1x A10G Colab  Click here to deploy.

Multi-modal and Computer Vision Models

Notebook Description Min. GPU Deploy
Finetune and deploy LlaVA Finetune the LlaVA model on your own data 1x A10G Colab  Click here to deploy.
AUTOMATIC1111 Stable Diffusion WebUI Run Stable Diffusion WebUI, AUTOMATIC1111 1x A10G Colab  Click here to deploy.
ControlNet on AUTOMATIC1111 Run ControlNet Models on Stable Diffusion WebUI 1x A10G Colab  Click here to deploy.
SDXL inference with LoRA and Diffusers Run inference using LoRA adaptors and SDXL 1x A10G Colab  Click here to deploy.
Oobabooga LLM WebUI Run Oobabooga, the LLM WebUI (like AUTOMATIC1111) 1x A10G Colab  Click here to deploy.
EfficientViT Segement Anything Run a TensorRT optimized version of Segment Anything 1x A10G Colab  Click here to deploy.

Other applications and tools

Notebook Description Min. GPU Deploy
Deploy to Replicate Deploy Model to Replicate any || CPU Colab  Click here to deploy.
GGUF Export FT Model Export your fine-tuned model to GGUF 1x A10G Colab  Click here to deploy.
Julia Install Easily Install Julia + Notebooks any || CPU Colab  Click here to deploy.
PDF Chatbot (OCR) PDF Chatbot using OCR 1x A10G Colab  Click here to deploy.
Zephyr Chatbot Chatbot with Open Source Models 1x A10G Colab  Click here to deploy.
Accelerate Data Science using NVIDIA RAPIDS Accelerate Data Science using NVIDIA RAPIDS 1x A10G Colab  Click here to deploy.

What is Brev.dev?

Brev is a dev tool that makes it really easy to code on a GPU in the cloud. Brev does 3 things: provision, configure, and connect.

Provision:

Brev provisions a GPU for you. You don't have to worry about setting up a cloud account. We have solid GPU supply, but if you do have AWS or GCP, you can link them.

Configure:

Brev configures your GPU with the right drivers and libraries. Use our open source tool Verb to point and click the right python and CUDA versions.

Connect:

Brev.dev CLI automatically edits your ssh config so you can ssh gpu-name or run brev open gpu-name to open VS Code to the remote machine