From 91c6aa07597462705a7f30ee5b97e2c7943b5616 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Tue, 29 Sep 2026 14:38:02 +0200 Subject: Remove unused checkpoint, tokenizer, and attention compatibility paths --- liblangdet/kernels.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'liblangdet/kernels.h') 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 */ -- cgit v1.3.1