mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-08 10:07:01 +00:00
chore : fix models indent after refactor (#16992)
This commit is contained in:
@@ -27,7 +27,6 @@ llm_build_grok::llm_build_grok(const llama_model & model, const llm_graph_params
|
|||||||
LLM_NORM_RMS, il);
|
LLM_NORM_RMS, il);
|
||||||
cb(cur, "attn_norm", il);
|
cb(cur, "attn_norm", il);
|
||||||
|
|
||||||
|
|
||||||
// self-attention
|
// self-attention
|
||||||
{
|
{
|
||||||
// compute Q and K and RoPE them
|
// compute Q and K and RoPE them
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
llm_build_internlm2::llm_build_internlm2(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
llm_build_internlm2::llm_build_internlm2(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
llm_build_jamba::llm_build_jamba(const llama_model & model, const llm_graph_params & params) : llm_graph_context_mamba(params) {
|
llm_build_jamba::llm_build_jamba(const llama_model & model, const llm_graph_params & params) : llm_graph_context_mamba(params) {
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
|
|
||||||
|
|||||||
@@ -120,4 +120,3 @@ llm_build_llada_moe::llm_build_llada_moe(const llama_model & model, const llm_gr
|
|||||||
|
|
||||||
ggml_build_forward_expand(gf, cur);
|
ggml_build_forward_expand(gf, cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
llm_build_llada::llm_build_llada(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
llm_build_llada::llm_build_llada(const llama_model & model, const llm_graph_params & params) :
|
|
||||||
llm_graph_context(params) {
|
|
||||||
// LLaDA is similar to LLaMA but uses non-causal attention for diffusion
|
// LLaDA is similar to LLaMA but uses non-causal attention for diffusion
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
llm_build_llama::llm_build_llama(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
llm_build_llama::llm_build_llama(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
|
|
||||||
@@ -153,4 +152,4 @@ llm_build_llama::llm_build_llama(const llama_model & model, const llm_graph_para
|
|||||||
res->t_logits = cur;
|
res->t_logits = cur;
|
||||||
|
|
||||||
ggml_build_forward_expand(gf, cur);
|
ggml_build_forward_expand(gf, cur);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
llm_build_minicpm3::llm_build_minicpm3(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
llm_build_minicpm3::llm_build_minicpm3(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
//TODO: if the model varies, these parameters need to be read from the model
|
//TODO: if the model varies, these parameters need to be read from the model
|
||||||
const int64_t n_embd_base = 256;
|
const int64_t n_embd_base = 256;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
template <bool iswa>
|
template <bool iswa>
|
||||||
llm_build_olmo2<iswa>::llm_build_olmo2(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
llm_build_olmo2<iswa>::llm_build_olmo2(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
@@ -144,7 +143,7 @@ llm_build_olmo2<iswa>::llm_build_olmo2(const llama_model & model, const llm_grap
|
|||||||
res->t_logits = cur;
|
res->t_logits = cur;
|
||||||
|
|
||||||
ggml_build_forward_expand(gf, cur);
|
ggml_build_forward_expand(gf, cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicit template instantiations
|
// Explicit template instantiations
|
||||||
template struct llm_build_olmo2<false>;
|
template struct llm_build_olmo2<false>;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
template<bool iswa>
|
template<bool iswa>
|
||||||
llm_build_phi3<iswa>::llm_build_phi3(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
llm_build_phi3<iswa>::llm_build_phi3(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
@@ -146,7 +145,7 @@ llm_build_phi3<iswa>::llm_build_phi3(const llama_model & model, const llm_graph_
|
|||||||
res->t_logits = cur;
|
res->t_logits = cur;
|
||||||
|
|
||||||
ggml_build_forward_expand(gf, cur);
|
ggml_build_forward_expand(gf, cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicit template instantiations
|
// Explicit template instantiations
|
||||||
template struct llm_build_phi3<false>;
|
template struct llm_build_phi3<false>;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "models.h"
|
#include "models.h"
|
||||||
|
|
||||||
|
|
||||||
llm_build_qwen2::llm_build_qwen2(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
llm_build_qwen2::llm_build_qwen2(const llama_model & model, const llm_graph_params & params) : llm_graph_context(params) {
|
||||||
const int64_t n_embd_head = hparams.n_embd_head_v;
|
const int64_t n_embd_head = hparams.n_embd_head_v;
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ llm_build_smallthinker<iswa>::llm_build_smallthinker(const llama_model & model,
|
|||||||
res->t_logits = cur;
|
res->t_logits = cur;
|
||||||
|
|
||||||
ggml_build_forward_expand(gf, cur);
|
ggml_build_forward_expand(gf, cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicit template instantiations
|
// Explicit template instantiations
|
||||||
template struct llm_build_smallthinker<false>;
|
template struct llm_build_smallthinker<false>;
|
||||||
|
|||||||
Reference in New Issue
Block a user