Skip to content

Commit 76b05fc

Browse files
Avoid a string copy
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 8796025 commit 76b05fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,7 @@ static void llm_load_vocab(
22502250
{ LLM_KV_TOKENIZER_PAD_ID, vocab.special_pad_id },
22512251
};
22522252
for (const auto & it : special_token_types) {
2253-
const std::string key = kv(std::get<0>(it));
2253+
const std::string & key = kv(std::get<0>(it));
22542254
int32_t & id = std::get<1>(it), old_id = id;
22552255

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

0 commit comments

Comments
 (0)