Fine-Tuning Mistral 7B LLM

Fine-tune the Mistral 7B model for domain-specific text generation using Valohai. This example demonstrates a complete fine-tuning and inference pipeline with Hugging Face integration.


Overview

This example demonstrates how to:

  • Preprocess datasets for Mistral fine-tuning

  • Fine-tune a large language model using Valohai

  • Run inference with the fine-tuned checkpoint

  • Deploy an endpoint for inference


Steps

1

Data Preprocessing

Fetch data from an S3 bucket and automatically store it in Valohai for preprocessing and tokenization using Mistral.

2

Model Fine-Tuning

A base-model is loaded and is fine-tuned using the "PEFT" method to better understand video gaming texts.

3

Model Inference

The fine-tuned LLM is used to generate texts based on a prompt.


GitHub Repository

The repository walks you through how to go through the above steps:

Last updated

Was this helpful?