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

Function metal_graph_stream_map_token

ds4.c:13072–13083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13070 const float * steering_dirs,
13071 float steering_scale) {
13072 const uint32_t n_hc = DS4_N_HC;
13073 const uint64_t q_dim = (uint64_t)DS4_N_HEAD * DS4_N_HEAD_DIM;
13074
13075 float *attn_cur = xmalloc((size_t)DS4_N_EMBD * sizeof(attn_cur[0]));
13076 float *attn_norm = xmalloc((size_t)DS4_N_EMBD * sizeof(attn_norm[0]));
13077 float *attn_residual = xmalloc((size_t)n_hc * DS4_N_EMBD * sizeof(attn_residual[0]));
13078 float *q = xmalloc((size_t)q_dim * sizeof(q[0]));
13079 float *qr_norm = xmalloc((size_t)DS4_N_LORA_Q * sizeof(qr_norm[0]));
13080 float *kv = xmalloc((size_t)DS4_N_HEAD_DIM * sizeof(kv[0]));
13081 float *heads = xmalloc((size_t)q_dim * sizeof(heads[0]));
13082 float *attn_out = xmalloc((size_t)DS4_N_EMBD * sizeof(attn_out[0]));
13083 bool *comp_allowed = NULL;
13084 float post[4];
13085 float comb[16];
13086

Tested by

no test coverage detected