Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–82 unchanged (82 lines)
83 model.mm_1_w, model.mm_1_b,
84 nullptr, nullptr,
85 model.mm_2_w, model.mm_2_b,
86 FFN_GELU_ERF,
87 -1);
88
89 } else if (proj_type == PROJECTOR_TYPE_MUSIC_FLAMINGO) {
90 // projector
91 cur = build_ffn(cur,
92 model.mm_1_w, model.mm_1_b,
93 nullptr, nullptr,
94 model.mm_2_w, model.mm_2_b,
95 FFN_GELU_ERF,
96 -1);
97
98 } else if (proj_type == PROJECTOR_TYPE_GLMA) {
99 cur = ggml_norm(ctx0, cur, hparams.eps);
100 cur = ggml_mul(ctx0, cur, model.mm_norm_pre_w);
101 cur = ggml_add(ctx0, cur, model.mm_norm_pre_b);
102 cur = build_stack(cur, hparams.proj_stack_factor, n_embd);
103 cur = build_ffn(cur, model.mm_1_w, model.mm_1_b, nullptr, nullptr, model.mm_2_w, model.mm_2_b, hparams.ffn_op, 0);
104 cur = ggml_concat(ctx0, model.mm_boi, cur, 1);
…lines 105–116 unchanged (12 lines)

After

…lines 1–82 unchanged (82 lines)
83 model.mm_1_w, model.mm_1_b,
84 nullptr, nullptr,
85 model.mm_2_w, model.mm_2_b,
86 FFN_GELU_ERF,
87 -1);
88
89 } else if (proj_type == PROJECTOR_TYPE_GLMA) {
90 cur = ggml_norm(ctx0, cur, hparams.eps);
91 cur = ggml_mul(ctx0, cur, model.mm_norm_pre_w);
92 cur = ggml_add(ctx0, cur, model.mm_norm_pre_b);
93 cur = build_stack(cur, hparams.proj_stack_factor, n_embd);
94 cur = build_ffn(cur, model.mm_1_w, model.mm_1_b, nullptr, nullptr, model.mm_2_w, model.mm_2_b, hparams.ffn_op, 0);
95 cur = ggml_concat(ctx0, model.mm_boi, cur, 1);
…lines 96–107 unchanged (12 lines)

Before

translation_unit
preproc_include
#include "#include"
string_literal
" "\""
string_content "models.h"
" "\""
function_definition
type_identifier "ggml_cgraph"
pointer_declarator
* "*"
function_declarator
qualified_identifier
namespace_identifier "clip_graph_whisper_enc"
:: "::"
identifier "build"
parameter_list
( "("
) ")"
compound_statement
{ "{"
declaration
type_qualifier
const "const"
primitive_type "int"
init_declarator
identifier "n_frames"
= "="
field_expression
identifier "img"
. "."
field_identifier "nx"
; ";"
declaration
type_qualifier
const "const"
primitive_type "int"
init_declarator
identifier "n_pos"
= "="
binary_expression
identifier "n_frames"
/ "/"
number_literal "2"
; ";"
expression_statement (+22 nodes collapsed)
declaration
type_identifier "ggml_tensor"
init_declarator
pointer_declarator
* "*"
identifier "inp"
= "="
call_expression
identifier "build_inp_raw"
argument_list
( "("
number_literal "1"
) ")"
; ";"
comment "// conv1d block"
compound_statement (+149 nodes collapsed)
comment "// sanity check (only check one layer, but it should be the "...
expression_statement (+33 nodes collapsed)
expression_statement (+33 nodes collapsed)
expression_statement
call_expression
identifier "GGML_ASSERT"
argument_list
( "("
field_expression
subscript_expression
field_expression
identifier "model"
. "."
field_identifier "layers"
subscript_argument_list
[ "["
number_literal "0"
] "]"
. "."
field_identifier "q_b"
) ")"
; ";"
expression_statement
call_expression
identifier "GGML_ASSERT"
argument_list
( "("
field_expression
subscript_expression
field_expression
identifier "model"
. "."
field_identifier "layers"
subscript_argument_list
[ "["
number_literal "0"
] "]"
. "."
field_identifier "v_b"
) ")"
; ";"
expression_statement (+21 nodes collapsed)
comment "// no bias for k"
declaration (+49 nodes collapsed)
declaration (+28 nodes collapsed)
expression_statement
call_expression
identifier "cb"
argument_list
( "("
identifier "cur"
, ","
string_literal
" "\""
string_content "after_transformer"
" "\""
, ","
number_literal "-1"
) ")"
; ";"
if_statement (+51 nodes collapsed)
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_ULTRAVOX"
) ")"
compound_statement (+125 nodes collapsed)
else_clause
else "else"
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_QWEN2A"
) ")"
compound_statement (+40 nodes collapsed)
else_clause
else "else"
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_VOXTRAL"
) ")"
compound_statement (+45 nodes collapsed)
else_clause
else "else"
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_MUSIC_FLAMINGO"
) ")"
compound_statement
{ "{"
comment "// projector"
expression_statement
assignment_expression
identifier "cur"
= "="
call_expression
identifier "build_ffn"
argument_list
( "("
identifier "cur"
, ","
field_expression
identifier "model"
. "."
field_identifier "mm_1_w"
, ","
field_expression
identifier "model"
. "."
field_identifier "mm_1_b"
, ","
null
nullptr "nullptr"
, ","
null
nullptr "nullptr"
, ","
field_expression
identifier "model"
. "."
field_identifier "mm_2_w"
, ","
field_expression
identifier "model"
. "."
field_identifier "mm_2_b"
, ","
identifier "FFN_GELU_ERF"
, ","
number_literal "-1"
) ")"
; ";"
} "}"
else_clause (+188 nodes collapsed)
expression_statement
call_expression
identifier "cb"
argument_list
( "("
identifier "cur"
, ","
string_literal
" "\""
string_content "projected"
" "\""
, ","
number_literal "-1"
) ")"
; ";"
expression_statement
call_expression
identifier "ggml_build_forward_expand"
argument_list
( "("
identifier "gf"
, ","
identifier "cur"
) ")"
; ";"
return_statement
return "return"
identifier "gf"
; ";"
} "}"

After

translation_unit
preproc_include
#include "#include"
string_literal
" "\""
string_content "models.h"
" "\""
function_definition
type_identifier "ggml_cgraph"
pointer_declarator
* "*"
function_declarator
qualified_identifier
namespace_identifier "clip_graph_whisper_enc"
:: "::"
identifier "build"
parameter_list
( "("
) ")"
compound_statement
{ "{"
declaration
type_qualifier
const "const"
primitive_type "int"
init_declarator
identifier "n_frames"
= "="
field_expression
identifier "img"
. "."
field_identifier "nx"
; ";"
declaration
type_qualifier
const "const"
primitive_type "int"
init_declarator
identifier "n_pos"
= "="
binary_expression
identifier "n_frames"
/ "/"
number_literal "2"
; ";"
expression_statement (+22 nodes collapsed)
declaration
type_identifier "ggml_tensor"
init_declarator
pointer_declarator
* "*"
identifier "inp"
= "="
call_expression
identifier "build_inp_raw"
argument_list
( "("
number_literal "1"
) ")"
; ";"
comment "// conv1d block"
compound_statement (+149 nodes collapsed)
comment "// sanity check (only check one layer, but it should be the "...
expression_statement (+33 nodes collapsed)
expression_statement (+33 nodes collapsed)
expression_statement
call_expression
identifier "GGML_ASSERT"
argument_list
( "("
field_expression
subscript_expression
field_expression
identifier "model"
. "."
field_identifier "layers"
subscript_argument_list
[ "["
number_literal "0"
] "]"
. "."
field_identifier "q_b"
) ")"
; ";"
expression_statement
call_expression
identifier "GGML_ASSERT"
argument_list
( "("
field_expression
subscript_expression
field_expression
identifier "model"
. "."
field_identifier "layers"
subscript_argument_list
[ "["
number_literal "0"
] "]"
. "."
field_identifier "v_b"
) ")"
; ";"
expression_statement (+21 nodes collapsed)
comment "// no bias for k"
declaration (+49 nodes collapsed)
declaration (+28 nodes collapsed)
expression_statement
call_expression
identifier "cb"
argument_list
( "("
identifier "cur"
, ","
string_literal
" "\""
string_content "after_transformer"
" "\""
, ","
number_literal "-1"
) ")"
; ";"
if_statement (+51 nodes collapsed)
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_ULTRAVOX"
) ")"
compound_statement (+125 nodes collapsed)
else_clause
else "else"
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_QWEN2A"
) ")"
compound_statement (+40 nodes collapsed)
else_clause
else "else"
if_statement
if "if"
condition_clause
( "("
binary_expression
identifier "proj_type"
== "=="
identifier "PROJECTOR_TYPE_VOXTRAL"
) ")"
compound_statement (+45 nodes collapsed)
else_clause (+188 nodes collapsed)
expression_statement
call_expression
identifier "cb"
argument_list
( "("
identifier "cur"
, ","
string_literal
" "\""
string_content "projected"
" "\""
, ","
number_literal "-1"
) ")"
; ";"
expression_statement
call_expression
identifier "ggml_build_forward_expand"
argument_list
( "("
identifier "gf"
, ","
identifier "cur"
) ")"
; ";"
return_statement
return "return"
identifier "gf"
; ";"
} "}"