File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ void llama_ngram_cache_draft(
306
306
307
307
void llama_ngram_cache_save (llama_ngram_cache & ngram_cache, std::string & filename) {
308
308
std::ofstream file_out (filename, std::ios::binary);
309
- for (std::pair<llama_ngram, llama_ngram_cache_part> item : ngram_cache) {
309
+ for (const std::pair<llama_ngram, llama_ngram_cache_part> & item : ngram_cache) {
310
310
const llama_ngram ngram = item.first ;
311
311
llama_ngram_cache_part token_counts = item.second ;
312
312
GGML_ASSERT (!token_counts.empty ());
@@ -366,7 +366,7 @@ llama_ngram_cache llama_ngram_cache_load(std::string & filename) {
366
366
}
367
367
368
368
void llama_ngram_cache_merge (llama_ngram_cache & ngram_cache_target, llama_ngram_cache & ngram_cache_add) {
369
- for (std::pair<llama_ngram, llama_ngram_cache_part> ngram_part : ngram_cache_add) {
369
+ for (const std::pair<llama_ngram, llama_ngram_cache_part> & ngram_part : ngram_cache_add) {
370
370
const llama_ngram ngram = ngram_part.first ;
371
371
llama_ngram_cache_part part = ngram_part.second ;
372
372
You can’t perform that action at this time.
0 commit comments