Table of Contents

Method AddTrainingData

Namespace
LMKit.Finetuning
Assembly
LM-Kit.NET.dll

AddTrainingData(ChatHistory)

Adds a conversation to the training set. Assistant turns are supervised; system and user turns are masked when AssistantLossOnly is enabled. Use BeginOfNewConversation markers to pack several conversations into one history.

public int AddTrainingData(ChatHistory chatHistory)

Parameters

chatHistory ChatHistory

Returns

int

The number of samples added.

AddTrainingData(ChatHistory, string)

Adds a conversation to the training set as a member of group. The validation split (ValidationSplit) keeps every group whole, on one side: give the same group to samples that must not be split apart, such as copies of one sample or variants of one source document, so the validation loss is measured on samples the run never trained on. Without a group, identical samples are grouped together and every other sample is its own group.

public int AddTrainingData(ChatHistory chatHistory, string group)

Parameters

chatHistory ChatHistory

The conversation.

group string

The group the conversation belongs to.

Returns

int

The number of samples added.

Share