ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
Loading...
Searching...
No Matches
LayerWeights Struct Reference

Structure holding all weights for a single transformer layer. More...

#include <model.h>

Collaboration diagram for LayerWeights:
Collaboration graph

Public Attributes

std::vector< uint16_t > input_layernorm
 
std::vector< uint16_t > post_attention_layernorm
 
std::vector< uint16_t > q_proj
 
std::vector< uint16_t > k_proj
 
std::vector< uint16_t > v_proj
 
std::vector< uint16_t > o_proj
 
std::vector< uint16_t > gate_proj
 
std::vector< uint16_t > up_proj
 
std::vector< uint16_t > down_proj
 
std::vector< float > input_layernorm_f32
 
std::vector< float > post_attention_layernorm_f32
 
std::vector< float > q_proj_f32
 
std::vector< float > k_proj_f32
 
std::vector< float > v_proj_f32
 
std::vector< float > o_proj_f32
 
std::vector< float > gate_proj_f32
 
std::vector< float > up_proj_f32
 
std::vector< float > down_proj_f32
 
std::vector< block_q4_K > q_proj_q4k
 
std::vector< block_q4_K > k_proj_q4k
 
std::vector< block_q4_K > v_proj_q4k
 
std::vector< block_q4_K > o_proj_q4k
 
std::vector< block_q4_K > gate_proj_q4k
 
std::vector< block_q4_K > up_proj_q4k
 
std::vector< block_q4_K > down_proj_q4k
 
std::vector< block_q5_K > q_proj_q5k
 
std::vector< block_q5_K > k_proj_q5k
 
std::vector< block_q5_K > v_proj_q5k
 
std::vector< block_q5_K > o_proj_q5k
 
std::vector< block_q5_K > gate_proj_q5k
 
std::vector< block_q5_K > up_proj_q5k
 
std::vector< block_q5_K > down_proj_q5k
 
std::vector< block_q6_K > q_proj_q6k
 
std::vector< block_q6_K > k_proj_q6k
 
std::vector< block_q6_K > v_proj_q6k
 
std::vector< block_q6_K > o_proj_q6k
 
std::vector< block_q6_K > gate_proj_q6k
 
std::vector< block_q6_K > up_proj_q6k
 
std::vector< block_q6_K > down_proj_q6k
 
std::vector< block_q8_0 > q_proj_q8_0
 
std::vector< block_q8_0 > k_proj_q8_0
 
std::vector< block_q8_0 > v_proj_q8_0
 
std::vector< block_q8_0 > o_proj_q8_0
 
std::vector< block_q8_0 > gate_proj_q8_0
 
std::vector< block_q8_0 > up_proj_q8_0
 
std::vector< block_q8_0 > down_proj_q8_0
 
std::vector< float > moe_router_f32
 
std::vector< block_q8_0 > moe_router_q8_0
 
std::vector< float > moe_gate_exps_f32
 
std::vector< float > moe_up_exps_f32
 
std::vector< float > moe_down_exps_f32
 
std::vector< block_q8_K > q_proj_q8k
 
std::vector< block_q8_K > k_proj_q8k
 
std::vector< block_q8_K > v_proj_q8k
 
std::vector< block_q8_K > o_proj_q8k
 
std::vector< block_q8_K > gate_proj_q8k
 
std::vector< block_q8_K > up_proj_q8k
 
std::vector< block_q8_K > down_proj_q8k
 

Detailed Description

Structure holding all weights for a single transformer layer.

Contains projections for attention and MLP, as well as normalization weights, in various formats.

Definition at line 253 of file model.h.

Member Data Documentation

◆ down_proj

std::vector<uint16_t> LayerWeights::down_proj

Definition at line 264 of file model.h.

◆ down_proj_f32

std::vector<float> LayerWeights::down_proj_f32

Definition at line 269 of file model.h.

◆ down_proj_q4k

std::vector<block_q4_K> LayerWeights::down_proj_q4k

Definition at line 271 of file model.h.

◆ down_proj_q5k

std::vector<block_q5_K> LayerWeights::down_proj_q5k

Definition at line 274 of file model.h.

◆ down_proj_q6k

std::vector<block_q6_K> LayerWeights::down_proj_q6k

Definition at line 276 of file model.h.

◆ down_proj_q8_0

std::vector<block_q8_0> LayerWeights::down_proj_q8_0

Definition at line 278 of file model.h.

◆ down_proj_q8k

std::vector<block_q8_K> LayerWeights::down_proj_q8k

Definition at line 286 of file model.h.

◆ gate_proj

std::vector<uint16_t> LayerWeights::gate_proj

Definition at line 262 of file model.h.

◆ gate_proj_f32

std::vector<float> LayerWeights::gate_proj_f32

Definition at line 269 of file model.h.

◆ gate_proj_q4k

std::vector<block_q4_K> LayerWeights::gate_proj_q4k

Definition at line 271 of file model.h.

◆ gate_proj_q5k

std::vector<block_q5_K> LayerWeights::gate_proj_q5k

Definition at line 274 of file model.h.

◆ gate_proj_q6k

std::vector<block_q6_K> LayerWeights::gate_proj_q6k

Definition at line 276 of file model.h.

◆ gate_proj_q8_0

std::vector<block_q8_0> LayerWeights::gate_proj_q8_0

Definition at line 278 of file model.h.

◆ gate_proj_q8k

std::vector<block_q8_K> LayerWeights::gate_proj_q8k

Definition at line 286 of file model.h.

◆ input_layernorm

std::vector<uint16_t> LayerWeights::input_layernorm

Definition at line 254 of file model.h.

◆ input_layernorm_f32

std::vector<float> LayerWeights::input_layernorm_f32

Definition at line 266 of file model.h.

◆ k_proj

std::vector<uint16_t> LayerWeights::k_proj

Definition at line 258 of file model.h.

◆ k_proj_f32

std::vector<float> LayerWeights::k_proj_f32

Definition at line 268 of file model.h.

◆ k_proj_q4k

std::vector<block_q4_K> LayerWeights::k_proj_q4k

Definition at line 270 of file model.h.

◆ k_proj_q5k

std::vector<block_q5_K> LayerWeights::k_proj_q5k

Definition at line 273 of file model.h.

◆ k_proj_q6k

std::vector<block_q6_K> LayerWeights::k_proj_q6k

Definition at line 275 of file model.h.

◆ k_proj_q8_0

std::vector<block_q8_0> LayerWeights::k_proj_q8_0

Definition at line 277 of file model.h.

◆ k_proj_q8k

std::vector<block_q8_K> LayerWeights::k_proj_q8k

Definition at line 285 of file model.h.

◆ moe_down_exps_f32

std::vector<float> LayerWeights::moe_down_exps_f32

Definition at line 284 of file model.h.

◆ moe_gate_exps_f32

std::vector<float> LayerWeights::moe_gate_exps_f32

Definition at line 284 of file model.h.

◆ moe_router_f32

std::vector<float> LayerWeights::moe_router_f32

Definition at line 282 of file model.h.

◆ moe_router_q8_0

std::vector<block_q8_0> LayerWeights::moe_router_q8_0

Definition at line 283 of file model.h.

◆ moe_up_exps_f32

std::vector<float> LayerWeights::moe_up_exps_f32

Definition at line 284 of file model.h.

◆ o_proj

std::vector<uint16_t> LayerWeights::o_proj

Definition at line 260 of file model.h.

◆ o_proj_f32

std::vector<float> LayerWeights::o_proj_f32

Definition at line 268 of file model.h.

◆ o_proj_q4k

std::vector<block_q4_K> LayerWeights::o_proj_q4k

Definition at line 270 of file model.h.

◆ o_proj_q5k

std::vector<block_q5_K> LayerWeights::o_proj_q5k

Definition at line 273 of file model.h.

◆ o_proj_q6k

std::vector<block_q6_K> LayerWeights::o_proj_q6k

Definition at line 275 of file model.h.

◆ o_proj_q8_0

std::vector<block_q8_0> LayerWeights::o_proj_q8_0

Definition at line 277 of file model.h.

◆ o_proj_q8k

std::vector<block_q8_K> LayerWeights::o_proj_q8k

Definition at line 285 of file model.h.

◆ post_attention_layernorm

std::vector<uint16_t> LayerWeights::post_attention_layernorm

Definition at line 255 of file model.h.

◆ post_attention_layernorm_f32

std::vector<float> LayerWeights::post_attention_layernorm_f32

Definition at line 267 of file model.h.

◆ q_proj

std::vector<uint16_t> LayerWeights::q_proj

Definition at line 257 of file model.h.

◆ q_proj_f32

std::vector<float> LayerWeights::q_proj_f32

Definition at line 268 of file model.h.

◆ q_proj_q4k

std::vector<block_q4_K> LayerWeights::q_proj_q4k

Definition at line 270 of file model.h.

◆ q_proj_q5k

std::vector<block_q5_K> LayerWeights::q_proj_q5k

Definition at line 273 of file model.h.

◆ q_proj_q6k

std::vector<block_q6_K> LayerWeights::q_proj_q6k

Definition at line 275 of file model.h.

◆ q_proj_q8_0

std::vector<block_q8_0> LayerWeights::q_proj_q8_0

Definition at line 277 of file model.h.

◆ q_proj_q8k

std::vector<block_q8_K> LayerWeights::q_proj_q8k

Definition at line 285 of file model.h.

◆ up_proj

std::vector<uint16_t> LayerWeights::up_proj

Definition at line 263 of file model.h.

◆ up_proj_f32

std::vector<float> LayerWeights::up_proj_f32

Definition at line 269 of file model.h.

◆ up_proj_q4k

std::vector<block_q4_K> LayerWeights::up_proj_q4k

Definition at line 271 of file model.h.

◆ up_proj_q5k

std::vector<block_q5_K> LayerWeights::up_proj_q5k

Definition at line 274 of file model.h.

◆ up_proj_q6k

std::vector<block_q6_K> LayerWeights::up_proj_q6k

Definition at line 276 of file model.h.

◆ up_proj_q8_0

std::vector<block_q8_0> LayerWeights::up_proj_q8_0

Definition at line 278 of file model.h.

◆ up_proj_q8k

std::vector<block_q8_K> LayerWeights::up_proj_q8k

Definition at line 286 of file model.h.

◆ v_proj

std::vector<uint16_t> LayerWeights::v_proj

Definition at line 259 of file model.h.

◆ v_proj_f32

std::vector<float> LayerWeights::v_proj_f32

Definition at line 268 of file model.h.

◆ v_proj_q4k

std::vector<block_q4_K> LayerWeights::v_proj_q4k

Definition at line 270 of file model.h.

◆ v_proj_q5k

std::vector<block_q5_K> LayerWeights::v_proj_q5k

Definition at line 273 of file model.h.

◆ v_proj_q6k

std::vector<block_q6_K> LayerWeights::v_proj_q6k

Definition at line 275 of file model.h.

◆ v_proj_q8_0

std::vector<block_q8_0> LayerWeights::v_proj_q8_0

Definition at line 277 of file model.h.

◆ v_proj_q8k

std::vector<block_q8_K> LayerWeights::v_proj_q8k

Definition at line 285 of file model.h.


The documentation for this struct was generated from the following file: