8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
llama_state_get_size
1 parent 4696d56 commit 017f10bCopy full SHA for 017f10b
src/llama-context.cpp
@@ -1704,10 +1704,12 @@ size_t llama_context::state_write_data(llama_io_write_i & io) {
1704
}
1705
1706
1707
- LLAMA_LOG_DEBUG("%s: - writing KV self\n", __func__);
1708
llama_kv_cache * kv_self = static_cast<llama_kv_cache *>(memory.get());
1709
-
1710
- kv_self->state_write(io);
+
+ if (kv_self != nullptr) {
+ LLAMA_LOG_DEBUG("%s: - writing KV self\n", __func__);
1711
+ kv_self->state_write(io);
1712
+ }
1713
1714
return io.n_bytes();
1715
0 commit comments