reset conversation (#34)

This commit is contained in:
Naoki Kishida 2024-02-25 07:21:01 +09:00 committed by Dan Zheng
parent 3af439621e
commit 621434e424
1 changed files with 5 additions and 0 deletions

5
run.cc
View File

@ -144,6 +144,11 @@ void ReplGemma(gcpp::Gemma& model, hwy::ThreadPool& pool,
return;
}
if (prompt_string == "%c" || prompt_string == "%C") {
abs_pos = 0;
continue;
}
if (model.model_training == ModelTraining::GEMMA_IT) {
// For instruction-tuned models: add control tokens.
prompt_string = "<start_of_turn>user\n" + prompt_string +