diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-09-29 14:38:02 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-09-29 14:38:02 +0200 |
| commit | 91c6aa07597462705a7f30ee5b97e2c7943b5616 (patch) | |
| tree | b16f686279a1f1b0691a6c0d65a544084fcc1c1e /liblangdet/kernels.h | |
| parent | 6f98fc8cf3f7cc4b9d523d16492a07d3e2aea8c9 (diff) | |
| download | langdet-91c6aa07597462705a7f30ee5b97e2c7943b5616.tar.gz langdet-91c6aa07597462705a7f30ee5b97e2c7943b5616.zip | |
Remove unused checkpoint, tokenizer, and attention compatibility paths
Diffstat (limited to 'liblangdet/kernels.h')
| -rw-r--r-- | liblangdet/kernels.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/liblangdet/kernels.h b/liblangdet/kernels.h index 1025602..95f5df0 100644 --- a/liblangdet/kernels.h +++ b/liblangdet/kernels.h @@ -23,20 +23,18 @@ void layer_norm(float *out, void softmax(float *x, int rows, int cols); void gelu_inplace(float *x, int n); -/* Attention is block-diagonal: each token attends only within its offsets span. +/* Bidirectional attention over one unpadded sequence with equal Q/K/V head counts. * Missing scratch uses the online-softmax path instead of tiled BLAS. */ -size_t bidirectional_gqa_attention_packed_scratch_bytes(const int *offsets, int batch); -void bidirectional_gqa_attention_packed_with_scratch(float *out, - const float *Q, - const float *K, - const float *V, - const int *offsets, - int batch, - int n_heads, - int n_kv_heads, - int head_dim, - float scale, - float *scratch, - size_t scratch_bytes); +size_t attention_scratch_bytes(int seq); +void attention_with_scratch(float *out, + const float *Q, + const float *K, + const float *V, + int seq, + int n_heads, + int head_dim, + float scale, + float *scratch, + size_t scratch_bytes); #endif /* KERNELS_H */ |
