Skip to content

Commit e263bac

Browse files
committed
Merge branch 'feat/qlora-training'
2 parents 768d4d9 + 99c2456 commit e263bac

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

examples/qlora_training/finetune_qlora.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,12 @@ static std::vector<training_sample> load_jsonl(
217217
break;
218218
}
219219
}
220-
if (last_assistant_content.find("Error:") != std::string::npos ||
221-
last_assistant_content.find("error:") != std::string::npos) {
222-
LOG_DBG("%s: skipping line %d — assistant response contains error marker\n", __func__, lineno);
223-
continue;
224-
}
220+
// // this should be done on the python side...
221+
// if (last_assistant_content.find("Error:") != std::string::npos ||
222+
// last_assistant_content.find("error:") != std::string::npos) {
223+
// LOG_DBG("%s: skipping line %d — assistant response contains error marker\n", __func__, lineno);
224+
// continue;
225+
// }
225226
}
226227

227228
// Split into prompt (no loss) + last assistant response (loss).
@@ -262,11 +263,12 @@ static std::vector<training_sample> load_jsonl(
262263
}
263264
} else if (j.contains("prompt") && j.contains("response")) {
264265
response_text = j["response"].get<std::string>();
265-
if (response_text.find("Error:") != std::string::npos ||
266-
response_text.find("error:") != std::string::npos) {
267-
LOG_DBG("%s: skipping line %d — response contains error marker\n", __func__, lineno);
268-
continue;
269-
}
266+
// // this should be done on the python side...
267+
// if (response_text.find("Error:") != std::string::npos ||
268+
// response_text.find("error:") != std::string::npos) {
269+
// LOG_DBG("%s: skipping line %d — response contains error marker\n", __func__, lineno);
270+
// continue;
271+
// }
270272
prompt_text = j["prompt"].get<std::string>();
271273
} else if (j.contains("text")) {
272274
response_text = j["text"].get<std::string>();

0 commit comments

Comments
 (0)