Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ggml/cmake/ggml-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ if(NOT TARGET ggml::ggml)
if (TARGET ggml::${_ggml_backend})
list(APPEND _ggml_all_targets ggml::${_ggml_backend})
endif()
endforeach()
endif()

# Synthetic ggml::all aggregating every available backend — matches the
# upstream contract used by examples/simple-cmake-pkg and any external
Expand Down
1 change: 1 addition & 0 deletions src/llama-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2428,6 +2428,7 @@ llama_rope_type llama_model_rope_type(const llama_model * model) {
switch (model->arch) {
// these models do not use RoPE
case LLM_ARCH_CLIP:
case LLM_ARCH_KOKORO:
case LLM_ARCH_GPT2:
case LLM_ARCH_GPTJ:
case LLM_ARCH_MPT:
Expand Down
6 changes: 3 additions & 3 deletions tests/test-llama-archs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static std::vector<float> get_logits(
}
if (target_ctx) {
llama_memory_clear(llama_get_memory(target_source), true);
llama_set_embeddings_pre_norm(target_source, true);
llama_set_embeddings_nextn(target_source, true, false);
get_logits(llama_get_model(target_source), target_source, tokens);
if (target_source != target_ctx) {
std::vector<uint8_t> state(llama_state_get_size(target_source));
Expand All @@ -366,10 +366,10 @@ static std::vector<float> get_logits(
batch.token = static_cast<llama_token *>(std::malloc(n_ctx * sizeof(llama_token)));
GGML_ASSERT(batch.token);
// Match MTP prefill: first row has no prior state; later rows consume
// the real target's preceding pre-normalization hidden state.
// the real target's preceding NextN hidden state.
std::memset(batch.embd, 0, n_embd * sizeof(float));
for (uint32_t i = 1; i < n_tokens; ++i) {
const float * hidden = llama_get_embeddings_pre_norm_ith(target_source, i - 1);
const float * hidden = llama_get_embeddings_nextn_ith(target_source, i - 1);
GGML_ASSERT(hidden);
std::memcpy(batch.embd + i * n_embd, hidden, n_embd * sizeof(float));
}
Expand Down
Loading