Merge 2793b863bb
into c81f3bbb05
This commit is contained in:
commit
ca71edfefc
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ void llama_ngram_cache_draft(
|
|||
|
||||
void llama_ngram_cache_save(llama_ngram_cache & ngram_cache, std::string & filename) {
|
||||
std::ofstream file_out(filename, std::ios::binary);
|
||||
for (std::pair<llama_ngram, llama_ngram_cache_part> item : ngram_cache) {
|
||||
for (const std::pair<llama_ngram, llama_ngram_cache_part> & item : ngram_cache) {
|
||||
const llama_ngram ngram = item.first;
|
||||
llama_ngram_cache_part token_counts = item.second;
|
||||
GGML_ASSERT(!token_counts.empty());
|
||||
|
@ -258,7 +258,7 @@ llama_ngram_cache llama_ngram_cache_load(std::string & filename) {
|
|||
}
|
||||
|
||||
void llama_ngram_cache_merge(llama_ngram_cache & ngram_cache_target, llama_ngram_cache & ngram_cache_add) {
|
||||
for (std::pair<llama_ngram, llama_ngram_cache_part> ngram_part : ngram_cache_add) {
|
||||
for (const std::pair<llama_ngram, llama_ngram_cache_part> & ngram_part : ngram_cache_add) {
|
||||
const llama_ngram ngram = ngram_part.first;
|
||||
llama_ngram_cache_part part = ngram_part.second;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue