aboutsummaryrefslogtreecommitdiff
path: root/pplx_embed_mlx.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-05-30 11:11:42 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-14 08:26:52 +0200
commit44a235498ab54ffac97b7a0be659f6da83062d3f (patch)
tree18dbe232204a443b6406ae4455996bffd576cdb4 /pplx_embed_mlx.h
parent10bf114474d5b79193159e5c865734362cf7abfb (diff)
downloadffwd-44a235498ab54ffac97b7a0be659f6da83062d3f.tar.gz
ffwd-44a235498ab54ffac97b7a0be659f6da83062d3f.zip
dist: add distributed layer-slice foundation
Diffstat (limited to 'pplx_embed_mlx.h')
-rw-r--r--pplx_embed_mlx.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pplx_embed_mlx.h b/pplx_embed_mlx.h
index 9c0af9d..1ec6fab 100644
--- a/pplx_embed_mlx.h
+++ b/pplx_embed_mlx.h
@@ -46,6 +46,19 @@ int pplx_mlx_embed_batch(pplx_mlx_ctx_t *ctx, const pplx_input_t *inputs,
int batch, float *out_embeddings);
/*
+ * MLX equivalent of pplx_model_forward_slice_batch().
+ *
+ * Hidden states cross the API boundary as packed float32 rows even though MLX
+ * executes a padded dense batch internally.
+ */
+int pplx_mlx_forward_slice_batch(pplx_mlx_ctx_t *ctx,
+ const pplx_input_t *inputs, int batch,
+ const float *input_states,
+ int layer_start, int layer_end,
+ int apply_final_norm,
+ float *out_states);
+
+/*
* Run one contextual sequence and pool selected token spans.
* Returns 0 on success, -1 on error.
*/