Skip to content

Commit 9d14041

Browse files
Avoid a string copy
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent a9aff37 commit 9d14041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ static void llm_load_vocab(
22472247
{ LLM_KV_TOKENIZER_PAD_ID, vocab.special_pad_id },
22482248
};
22492249
for (const auto & it : special_token_types) {
2250-
const std::string key = kv(std::get<0>(it));
2250+
const std::string & key = kv(std::get<0>(it));
22512251
int32_t & id = std::get<1>(it), old_id = id;
22522252

22532253
GGUF_GET_KEY(ctx, id, gguf_get_val_u32, GGUF_TYPE_UINT32, false, key);

0 commit comments

Comments
 (0)