Correctly identify LF token for GPT-2 style BPE tokenizer

This commit is contained in:
mgroeber9110 2025-01-29 20:27:37 +01:00
parent 6171c9d258
commit fe8d4df76b

View file

@ -1687,7 +1687,7 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
GGML_ASSERT(!ids.empty() && "model vocab missing newline token");
linefeed_id = ids[0];
} else {
const std::vector<int> ids = tokenize("\xC4\x8A", false); // U+010A
const std::vector<int> ids = tokenize("\n", false);
//GGML_ASSERT(!ids.empty() && "model vocab missing newline token");
if (ids.empty()) {