MCPcopy Create free account
hub / github.com/antirez/ds4 / encode_chat_prompt

Function encode_chat_prompt

ds4.c:22285–22306  ·  view source on GitHub ↗

Build the DS4 chat prompt: BOS, optional system text, user prompt, assistant * marker, and either or depending on the requested mode. Max * thinking is only a prompt prefix: the model still enters through . */

Source from the content-addressed store, hash-verified

22283 metal_graph_qr(g),
22284 metal_graph_kv_raw(g),
22285 metal_graph_comp_kv_cur(g),
22286 metal_graph_comp_sc_cur(g),
22287 metal_graph_comp_kv_cur(g),
22288 metal_graph_comp_sc_cur(g),
22289 g->layer_attn_state_kv[il],
22290 g->layer_attn_state_score[il],
22291 g->layer_attn_state_kv[il],
22292 g->layer_attn_state_score[il],
22293 model->map,
22294 model->size,
22295 layer->attn_q_a->abs_offset,
22296 layer->attn_kv->abs_offset,
22297 layer->attn_compressor_kv->abs_offset,
22298 layer->attn_compressor_gate->abs_offset,
22299 layer->attn_compressor_kv->abs_offset,
22300 layer->attn_compressor_gate->abs_offset,
22301 layer->attn_compressor_ape->abs_offset,
22302 layer->attn_compressor_ape->type,
22303 layer->attn_compressor_ape->abs_offset,
22304 layer->attn_compressor_ape->type,
22305 DS4_N_EMBD,
22306 q_rank,
22307 DS4_N_HEAD_DIM,
22308 DS4_N_HEAD_DIM,
22309 0u,

Callers 1

ds4_encode_chat_promptFunction · 0.85

Calls 3

token_vec_pushFunction · 0.85
bpe_tokenize_textFunction · 0.85
ds4_think_mode_enabledFunction · 0.85

Tested by

no test coverage detected