Loading...
Searching...
No Matches
grouped_query_attention_layer.h File Reference

Go to the source code of this file.

Classes

struct  opennn::GroupedQueryAttentionOperator
 
class  opennn::GroupedQueryAttention
 

Namespaces

namespace  opennn
 

Functions

void opennn::rotary_build_tables (TensorView &, TensorView &, Index sequence_length, Index rotary_dim, float base)
 
void opennn::rotary_forward (const TensorView &, const TensorView &, const TensorView &, TensorView &, Index head_dim, Index rotary_dim, Index position_offset)
 
void opennn::grouped_attention_forward (const TensorView &query, const TensorView &key, const TensorView &value, TensorView &output, Index n_query_heads, Index n_kv_heads, Index head_dim, bool causal, float scale, Index query_position_offset=0, float *decode_partials=nullptr, const int *position_device=nullptr)
 
Index opennn::grouped_attention_decode_scratch_floats (Index n_query_heads, Index head_dim)
 
void opennn::qk_rope_cache_append (const TensorView &qkv_row, const TensorView &q_norm_weight, const TensorView &k_norm_weight, const TensorView &cos_table, const TensorView &sin_table, TensorView &q_out, TensorView &key_cache, TensorView &value_cache, Index n_query_heads, Index n_kv_heads, Index head_dim, float epsilon, const int *position_device)
 
void opennn::qk_norm_forward (const TensorView &input, const TensorView &weight, TensorView &output, Index head_dim, float epsilon)