diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-09-29 13:11:00 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-09-29 13:11:00 +0200 |
| commit | 37cbaef9ceb828c667da8f398027ba5415ee7475 (patch) | |
| tree | 6103e92a9030766e78a35df00f7a1155d0d0ecf5 /libffwd/model_types.h | |
| parent | cf7d8169ec12cb3adf90d4ff78b3257e74985302 (diff) | |
| download | langdet-37cbaef9ceb828c667da8f398027ba5415ee7475.tar.gz langdet-37cbaef9ceb828c667da8f398027ba5415ee7475.zip | |
Rename CPU library API and sources to langdet
Diffstat (limited to 'libffwd/model_types.h')
| -rw-r--r-- | libffwd/model_types.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/libffwd/model_types.h b/libffwd/model_types.h deleted file mode 100644 index 447b653..0000000 --- a/libffwd/model_types.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef FFWD_MODEL_TYPES_H -#define FFWD_MODEL_TYPES_H - -#include "ffwd.h" -#include "safetensors.h" - -typedef struct { - const float *wq; - const float *wk; - const float *wv; - const float *wo; - const float *q_bias; - const float *k_bias; - const float *v_bias; - const float *o_bias; - const float *input_norm; - const float *attn_ln_bias; - const float *up_proj; - const float *ffn_inter_bias; - const float *down_proj; - const float *ffn_out_bias; - const float *post_attn_norm; - const float *ffn_ln_bias; -} ffwd_layer_t; - -typedef struct { - const float *embed_tokens; - ffwd_layer_t *layers; - const float *position_embeddings; - const float *token_type_embeddings; - const float *ffwd_ln_w; - const float *ffwd_ln_b; -} ffwd_weights_t; - -struct ffwd_model { - ffwd_config_t config; - ffwd_weights_t weights; - /* All weight pointers borrow this mapping until model teardown. */ - multi_safetensors_t *safetensors; -}; - -struct ffwd_workspace { - const ffwd_model_t *model; - int buf_seq_cap; - float *x; - float *q; - float *k; - float *v; - float *attn_out; - float *proj_out; - float *ffn_up; - float *attn_scores; - size_t attn_scores_bytes; -}; - -#endif /* FFWD_MODEL_TYPES_H */ |
