aboutsummaryrefslogtreecommitdiff
path: root/embed.c
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-06-15 10:40:44 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-15 10:40:44 +0200
commit6fd890a6ba42f9bd4683fc2ccd6243872b163e67 (patch)
tree035881de454f05ab86e1859364d16290e9f791e8 /embed.c
parent07d3b036de430fb86935e029ca03bcf6011a02e1 (diff)
downloadffwd-6fd890a6ba42f9bd4683fc2ccd6243872b163e67.tar.gz
ffwd-6fd890a6ba42f9bd4683fc2ccd6243872b163e67.zip
late: add CUDA late-interaction rerank path (GPU encode, host MaxSim)
Diffstat (limited to 'embed.c')
-rw-r--r--embed.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/embed.c b/embed.c
index 56a9381..645660c 100644
--- a/embed.c
+++ b/embed.c
@@ -906,6 +906,16 @@ int embed_late_model_token_dim(const embed_late_model_t *model) {
return model ? model->token_dim : 0;
}
+/* Internal (embed_internal.h): expose the base model and projection so GPU
+ * backends can upload them to device without seeing struct embed_late_model. */
+embed_model_t *embed_late_model_base(const embed_late_model_t *model) {
+ return model ? model->base : NULL;
+}
+
+const embed_weight_ref_t *embed_late_model_projection(const embed_late_model_t *model) {
+ return model ? &model->projection : NULL;
+}
+
int embed_late_model_encode_tokens(const embed_late_model_t *model,
embed_late_workspace_t *ws,
const int *token_ids,