Skip to content

Commit 70fb2f9

Browse files
committed
fix
1 parent a15e010 commit 70fb2f9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/server/atomic_hash_map.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ namespace atomic {
295295
friend ConstIterator;
296296

297297
hash_map(size_t maxSize,
298-
float maxLoadFactor = 0.8f,
299-
const Allocator& alloc = Allocator())
298+
float maxLoadFactor = 0.8f,
299+
const Allocator& alloc = Allocator())
300300
: allocator_(alloc)
301301
{
302302
size_t capacity = size_t(maxSize / (maxLoadFactor > 1.0f ? 1.0f : maxLoadFactor) + 128);

src/llama-model.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2949,7 +2949,8 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
29492949
ggml_context * ctx = ctx_for_buft(buft);
29502950

29512951
auto trans_wkv_b = ggml_transpose(ctx, layer.wkv_b);
2952-
auto wkv_b_copied = ggml_dup(ctx, trans_wkv_b);
2952+
auto wkv_b_copied = ggml_new_tensor_2d(ctx, trans_wkv_b->type, trans_wkv_b->ne[0], trans_wkv_b->ne[1]);
2953+
ggml_cpy(ctx, trans_wkv_b, wkv_b_copied);
29532954
layer.wk_b = ggml_view_2d(ctx, wkv_b_copied, wkv_b_copied->ne[0], n_embd_head_qk_nope, n_head, 0);
29542955
layer.wv_b = ggml_view_2d(ctx, wkv_b_copied, wkv_b_copied->ne[0], n_embd_head_v, n_head, n_embd_head_qk_nope * n_head);
29552956
}

0 commit comments

Comments
 (0)