Skip to main content
This tutorial guides you through creating a custom safety guardrail model. We will adapt the Nemotron dataset, fine-tune a model on Prem Studio, and evaluate it using a custom evaluator.

Prerequisites

  • A Prem Studio account
  • Basic familiarity with Python (for dataset adaptation scripts)
1

Adapt Nemotron Dataset

First, we need to convert the Nemotron Safety Guard Dataset into a JSONL format compatible with Prem Studio.Check out our tutorial on GitHub for a script to perform this conversion:

Nemotron Dataset Adaptation

View the tutorial on GitHub to convert Nemotron data to Prem-compatible JSONL.
2

Upload Dataset to Studio

Once you have your JSONL file ready, upload it to Prem Studio.Follow the internal guide on uploading datasets:

Upload a Dataset

Learn how to upload your JSONL dataset to Prem Studio.
3

Autosplit Dataset

After uploading, split your dataset into training and validation sets using the Autosplit feature.

How to Autosplit

Follow the guide to automatically split your dataset.
4

Create a Snapshot

Create a snapshot of your split dataset.The snapshot creates an immutable version of your data which is required for both fine-tuning and evaluation. This ensures that your results are reproducible and consistent across different runs.

Create a Snapshot

Learn how to freeze your dataset version for training.
5

Fine-Tuning and Experiments

Now that your data is ready, you can start the fine-tuning process.

Create a Fine-Tuning Job

Start by creating a fine-tuning job with your snapshot.

Get Started with Fine-Tuning

Follow the guide to create your first fine-tuning job.

Configure Experiments

You can customize your training parameters using Experiments to get the best results.

Experiment Settings

Learn how to configure and manage fine-tuning experiments.

Monitor Results

Once the training is complete, analyze the loss curves and metrics.

View Results

Understand how to interpret your fine-tuning results.
6

Evaluation (BYOE)

Finally, evaluate your fine-tuned model using Bring Your Own Evaluation (BYOE).You can implement your own evaluation logic using our BYOE framework. Check out the tutorial below to learn how to set it up:

BYOE Tutorial

Learn how to implement and integrate your own safety evaluator script.