Merge branch 'feat/qlora-training'
This commit is contained in:
commit
e263bac771
|
|
@ -217,11 +217,12 @@ static std::vector<training_sample> load_jsonl(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (last_assistant_content.find("Error:") != std::string::npos ||
|
// // this should be done on the python side...
|
||||||
last_assistant_content.find("error:") != std::string::npos) {
|
// if (last_assistant_content.find("Error:") != std::string::npos ||
|
||||||
LOG_DBG("%s: skipping line %d — assistant response contains error marker\n", __func__, lineno);
|
// last_assistant_content.find("error:") != std::string::npos) {
|
||||||
continue;
|
// LOG_DBG("%s: skipping line %d — assistant response contains error marker\n", __func__, lineno);
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split into prompt (no loss) + last assistant response (loss).
|
// Split into prompt (no loss) + last assistant response (loss).
|
||||||
|
|
@ -262,11 +263,12 @@ static std::vector<training_sample> load_jsonl(
|
||||||
}
|
}
|
||||||
} else if (j.contains("prompt") && j.contains("response")) {
|
} else if (j.contains("prompt") && j.contains("response")) {
|
||||||
response_text = j["response"].get<std::string>();
|
response_text = j["response"].get<std::string>();
|
||||||
if (response_text.find("Error:") != std::string::npos ||
|
// // this should be done on the python side...
|
||||||
response_text.find("error:") != std::string::npos) {
|
// if (response_text.find("Error:") != std::string::npos ||
|
||||||
LOG_DBG("%s: skipping line %d — response contains error marker\n", __func__, lineno);
|
// response_text.find("error:") != std::string::npos) {
|
||||||
continue;
|
// LOG_DBG("%s: skipping line %d — response contains error marker\n", __func__, lineno);
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
prompt_text = j["prompt"].get<std::string>();
|
prompt_text = j["prompt"].get<std::string>();
|
||||||
} else if (j.contains("text")) {
|
} else if (j.contains("text")) {
|
||||||
response_text = j["text"].get<std::string>();
|
response_text = j["text"].get<std::string>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue