You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/kfto-sft-feast-rag/README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Fine-Tuning a RAG Model with Feast on OpenShift AI
2
2
3
-
This project provides an end-to-end example of how to fine-tune a Retrieval-Augmented Generation (RAG) model on **OpenShift AI**. It uses the **Feast**feature store for efficient retrieval of context and the **Kubeflow Training SDK** to orchestrate the distributed fine-tuning job on the cluster.
3
+
This project provides an end-to-end example of how to fine-tune a Retrieval-Augmented Generation (RAG) model on **OpenShift AI**. It uses the **Feast**(Feature Store) for efficient retrieval of context and the **Kubeflow Training SDK** to orchestrate the distributed fine-tuning job on the cluster.
4
4
5
5
The core idea is to enhance a generator model (like BART) by providing it with relevant documents retrieved from a knowledge base at runtime. This notebook handles the entire lifecycle: ingesting data into the feature store, fine-tuning the RAG model on synthetically generated Q&A pairs, and testing the final artifact.
6
6
@@ -11,10 +11,10 @@ The core idea is to enhance a generator model (like BART) by providing it with r
11
11
Before you begin, ensure you have the following setup:
12
12
13
13
* An OpenShift cluster with OpenShift AI (RHOAI) 2.20+ installed:
14
-
* The `dashboard`, `trainingoperator` and `workbenches` components enabled
15
-
* Workbench with medium size container, 1 NVIDIA GPU accelerator, and cluster storage of 200GB.
16
-
* Sufficient worker nodes for your configuration(s) with NVIDIA GPUs (Ampere-based or newer recommended)
17
-
* A dynamic storage provisioner supporting RWX PVC provisioning
14
+
* The `dashboard`, `trainingoperator` and `workbenches` components enabled.
15
+
* Workbench with medium size container, 1 NVIDIA GPU / 1 AMD GPU accelerator, and cluster storage of 200GB.
16
+
* Sufficient worker nodes for your configuration(s) with NVIDIA GPUs (Ampere-based or newer recommended) or AMD GPUs depending on your environment.
17
+
* A dynamic storage provisioner supporting RWX PVC provisioning.
18
18
* A standalone Milvus deployment. See example [here](https://github.com/rh-aiservices-bu/llm-on-openshift/tree/main/vector-databases/milvus#deployment).
19
19
20
20
***
@@ -29,9 +29,9 @@ You must run this notebook from within an OpenShift AI Workbench. Follow these s
29
29
* Then create a workbench with a preferred name and with the following settings:
30
30
* Select the `PyTorch` (or the `ROCm-PyTorch`) workbench image with the recommended version.
31
31
* Select the `Medium` as the deployment container size.
32
-
* Add an accelerator (GPU).
32
+
* Add one NVIDIA / AMD accelerator (GPU) depending on environment.
33
33
* Create a storage that'll be shared between the workbench and the fine-tuning runs.
34
-
Make sure it uses a storage class with RWX capability and give it enough size according to the size of the model you want to fine-tune.
34
+
Make sure it uses a storage class with RWX capability and give it enough capacity according to the size of the model you want to fine-tune.
35
35
> [!NOTE]
36
36
> You can attach an existing shared storage if you already have one instead.
37
37
* Review the storage configuration and click "Create workbench"
@@ -64,7 +64,7 @@ The notebook is structured to guide you through the following key stages:
64
64
* It defines a `RagSequenceForGeneration` model, combining a question-encoder with a generator model.
65
65
* It uses a custom `FeastRAGRetriever` to connect the RAG model to the Feast feature store.
66
66
* The notebook uses the Kubeflow `TrainingClient` to submit this `main` function as a distributed `PyTorchJob` to the OpenShift cluster.
67
-
***Monitoring**: You can monitor the job's progress directly through its logs and visualize metrics using the integrated TensorBoard.
67
+
***Monitoring**: You can monitor the job's progress directly through its logs and visualize metrics using the integrated TensorBoard dashboard.
68
68
***Inference and Testing**: After the training job is complete, the final, fine-tuned RAG model is loaded from shared storage for testing.
0 commit comments