TinyLlama.cpp 1.0
A lightweight C++ implementation of the TinyLlama language model
Loading...
Searching...
No Matches
Public Attributes | List of all members
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_Kq_proj_q4k
 
std::vector< block_q4_Kk_proj_q4k
 
std::vector< block_q4_Kv_proj_q4k
 
std::vector< block_q4_Ko_proj_q4k
 
std::vector< block_q4_Kgate_proj_q4k
 
std::vector< block_q4_Kup_proj_q4k
 
std::vector< block_q4_Kdown_proj_q4k
 
std::vector< block_q6_Kq_proj_q6k
 
std::vector< block_q6_Kk_proj_q6k
 
std::vector< block_q6_Kv_proj_q6k
 
std::vector< block_q6_Ko_proj_q6k
 
std::vector< block_q6_Kgate_proj_q6k
 
std::vector< block_q6_Kup_proj_q6k
 
std::vector< block_q6_Kdown_proj_q6k
 
std::vector< block_q8_0q_proj_q8_0
 
std::vector< block_q8_0k_proj_q8_0
 
std::vector< block_q8_0v_proj_q8_0
 
std::vector< block_q8_0o_proj_q8_0
 
std::vector< block_q8_0gate_proj_q8_0
 
std::vector< block_q8_0up_proj_q8_0
 
std::vector< block_q8_0down_proj_q8_0
 
std::vector< block_q8_Kq_proj_q8k
 
std::vector< block_q8_Kk_proj_q8k
 
std::vector< block_q8_Kv_proj_q8k
 
std::vector< block_q8_Ko_proj_q8k
 
std::vector< block_q8_Kgate_proj_q8k
 
std::vector< block_q8_Kup_proj_q8k
 
std::vector< block_q8_Kdown_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 238 of file model.h.

Member Data Documentation

◆ down_proj

std::vector<uint16_t> LayerWeights::down_proj

Definition at line 249 of file model.h.

◆ down_proj_f32

std::vector<float> LayerWeights::down_proj_f32

Definition at line 254 of file model.h.

◆ down_proj_q4k

std::vector<block_q4_K> LayerWeights::down_proj_q4k

Definition at line 256 of file model.h.

◆ down_proj_q6k

std::vector<block_q6_K> LayerWeights::down_proj_q6k

Definition at line 258 of file model.h.

◆ down_proj_q8_0

std::vector<block_q8_0> LayerWeights::down_proj_q8_0

Definition at line 260 of file model.h.

◆ down_proj_q8k

std::vector<block_q8_K> LayerWeights::down_proj_q8k

Definition at line 262 of file model.h.

◆ gate_proj

std::vector<uint16_t> LayerWeights::gate_proj

Definition at line 247 of file model.h.

◆ gate_proj_f32

std::vector<float> LayerWeights::gate_proj_f32

Definition at line 254 of file model.h.

◆ gate_proj_q4k

std::vector<block_q4_K> LayerWeights::gate_proj_q4k

Definition at line 256 of file model.h.

◆ gate_proj_q6k

std::vector<block_q6_K> LayerWeights::gate_proj_q6k

Definition at line 258 of file model.h.

◆ gate_proj_q8_0

std::vector<block_q8_0> LayerWeights::gate_proj_q8_0

Definition at line 260 of file model.h.

◆ gate_proj_q8k

std::vector<block_q8_K> LayerWeights::gate_proj_q8k

Definition at line 262 of file model.h.

◆ input_layernorm

std::vector<uint16_t> LayerWeights::input_layernorm

Definition at line 239 of file model.h.

◆ input_layernorm_f32

std::vector<float> LayerWeights::input_layernorm_f32

Definition at line 251 of file model.h.

◆ k_proj

std::vector<uint16_t> LayerWeights::k_proj

Definition at line 243 of file model.h.

◆ k_proj_f32

std::vector<float> LayerWeights::k_proj_f32

Definition at line 253 of file model.h.

◆ k_proj_q4k

std::vector<block_q4_K> LayerWeights::k_proj_q4k

Definition at line 255 of file model.h.

◆ k_proj_q6k

std::vector<block_q6_K> LayerWeights::k_proj_q6k

Definition at line 257 of file model.h.

◆ k_proj_q8_0

std::vector<block_q8_0> LayerWeights::k_proj_q8_0

Definition at line 259 of file model.h.

◆ k_proj_q8k

std::vector<block_q8_K> LayerWeights::k_proj_q8k

Definition at line 261 of file model.h.

◆ o_proj

std::vector<uint16_t> LayerWeights::o_proj

Definition at line 245 of file model.h.

◆ o_proj_f32

std::vector<float> LayerWeights::o_proj_f32

Definition at line 253 of file model.h.

◆ o_proj_q4k

std::vector<block_q4_K> LayerWeights::o_proj_q4k

Definition at line 255 of file model.h.

◆ o_proj_q6k

std::vector<block_q6_K> LayerWeights::o_proj_q6k

Definition at line 257 of file model.h.

◆ o_proj_q8_0

std::vector<block_q8_0> LayerWeights::o_proj_q8_0

Definition at line 259 of file model.h.

◆ o_proj_q8k

std::vector<block_q8_K> LayerWeights::o_proj_q8k

Definition at line 261 of file model.h.

◆ post_attention_layernorm

std::vector<uint16_t> LayerWeights::post_attention_layernorm

Definition at line 240 of file model.h.

◆ post_attention_layernorm_f32

std::vector<float> LayerWeights::post_attention_layernorm_f32

Definition at line 252 of file model.h.

◆ q_proj

std::vector<uint16_t> LayerWeights::q_proj

Definition at line 242 of file model.h.

◆ q_proj_f32

std::vector<float> LayerWeights::q_proj_f32

Definition at line 253 of file model.h.

◆ q_proj_q4k

std::vector<block_q4_K> LayerWeights::q_proj_q4k

Definition at line 255 of file model.h.

◆ q_proj_q6k

std::vector<block_q6_K> LayerWeights::q_proj_q6k

Definition at line 257 of file model.h.

◆ q_proj_q8_0

std::vector<block_q8_0> LayerWeights::q_proj_q8_0

Definition at line 259 of file model.h.

◆ q_proj_q8k

std::vector<block_q8_K> LayerWeights::q_proj_q8k

Definition at line 261 of file model.h.

◆ up_proj

std::vector<uint16_t> LayerWeights::up_proj

Definition at line 248 of file model.h.

◆ up_proj_f32

std::vector<float> LayerWeights::up_proj_f32

Definition at line 254 of file model.h.

◆ up_proj_q4k

std::vector<block_q4_K> LayerWeights::up_proj_q4k

Definition at line 256 of file model.h.

◆ up_proj_q6k

std::vector<block_q6_K> LayerWeights::up_proj_q6k

Definition at line 258 of file model.h.

◆ up_proj_q8_0

std::vector<block_q8_0> LayerWeights::up_proj_q8_0

Definition at line 260 of file model.h.

◆ up_proj_q8k

std::vector<block_q8_K> LayerWeights::up_proj_q8k

Definition at line 262 of file model.h.

◆ v_proj

std::vector<uint16_t> LayerWeights::v_proj

Definition at line 244 of file model.h.

◆ v_proj_f32

std::vector<float> LayerWeights::v_proj_f32

Definition at line 253 of file model.h.

◆ v_proj_q4k

std::vector<block_q4_K> LayerWeights::v_proj_q4k

Definition at line 255 of file model.h.

◆ v_proj_q6k

std::vector<block_q6_K> LayerWeights::v_proj_q6k

Definition at line 257 of file model.h.

◆ v_proj_q8_0

std::vector<block_q8_0> LayerWeights::v_proj_q8_0

Definition at line 259 of file model.h.

◆ v_proj_q8k

std::vector<block_q8_K> LayerWeights::v_proj_q8k

Definition at line 261 of file model.h.


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