aboutsummaryrefslogtreecommitdiff
path: root/pplx_embed_mlx.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-05-31 00:39:10 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-14 08:27:03 +0200
commit27e76c88f0c1b33cba54dd31fade9b044719c8bc (patch)
tree721ff7ab955ac49794232b6c6945a80813064604 /pplx_embed_mlx.h
parent7177f3073199b31f8e99a5355bfedda446cd99ca (diff)
downloadffwd-27e76c88f0c1b33cba54dd31fade9b044719c8bc.tar.gz
ffwd-27e76c88f0c1b33cba54dd31fade9b044719c8bc.zip
server: batch contextual document inference
Diffstat (limited to 'pplx_embed_mlx.h')
-rw-r--r--pplx_embed_mlx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/pplx_embed_mlx.h b/pplx_embed_mlx.h
index b45fc8a..2b7164d 100644
--- a/pplx_embed_mlx.h
+++ b/pplx_embed_mlx.h
@@ -74,6 +74,14 @@ int pplx_mlx_embed_spans(pplx_mlx_ctx_t *ctx, const int *token_ids,
int n_tokens, const pplx_span_t *spans,
int n_spans, float *out_embeddings);
+/*
+ * Run a padded dense contextual document batch and pool every selected span.
+ * out_embeddings contains spans in document order.
+ */
+int pplx_mlx_embed_spans_batch(pplx_mlx_ctx_t *ctx,
+ const pplx_context_input_t *inputs, int batch,
+ float *out_embeddings);
+
/* Get the config (so main.c can read hidden_size etc.) */
const pplx_config_t *pplx_mlx_config(const pplx_mlx_ctx_t *ctx);