diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-05-30 11:11:42 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:26:52 +0200 |
| commit | 44a235498ab54ffac97b7a0be659f6da83062d3f (patch) | |
| tree | 18dbe232204a443b6406ae4455996bffd576cdb4 /pplx_embed_mlx.h | |
| parent | 10bf114474d5b79193159e5c865734362cf7abfb (diff) | |
| download | ffwd-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.h | 13 |
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. */ |
