Skip to content

Commit

Permalink
additional stop character for Mistral
Browse files Browse the repository at this point in the history
  • Loading branch information
amakropoulos committed May 27, 2024
1 parent 35dbe9b commit 44e5b43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Runtime/LLMChatTemplates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public class MistralInstructTemplate : ChatTemplate

public override string[] GetStop(string playerName, string AIName)
{
return AddStopNewlines(new string[] { "[INST]", "[/INST]" });
return AddStopNewlines(new string[] { "</s>", "[INST]", "[/INST]" });
}
}

Expand All @@ -331,7 +331,7 @@ public class MistralChatTemplate : MistralInstructTemplate

public override string[] GetStop(string playerName, string AIName)
{
return AddStopNewlines(new string[] { "[INST]", "[/INST]", "###" });
return AddStopNewlines(new string[] { "</s>", "[INST]", "[/INST]", "###" });
}
}

Expand Down

0 comments on commit 44e5b43

Please sign in to comment.