From f6e959455add3260a483c89e6fb9aa214d4e6789 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Sat, 30 May 2026 11:23:52 +0200 Subject: dist: load distributed layer shards selectively --- pplx_embed.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pplx_embed.h') diff --git a/pplx_embed.h b/pplx_embed.h index 1a2479d..6a159de 100644 --- a/pplx_embed.h +++ b/pplx_embed.h @@ -67,6 +67,18 @@ typedef struct { * Returns NULL on error. */ pplx_model_t *pplx_model_load(const char *model_dir); + +/* + * Load one contiguous transformer layer range for distributed execution. + * + * layer_start is inclusive and layer_end is exclusive. A range beginning at + * zero also loads the token embedding table. A range ending at n_layers also + * loads the final RMSNorm. Safetensors remain mmap-backed, so unselected + * weights are not touched. + */ +pplx_model_t *pplx_model_load_slice(const char *model_dir, + int layer_start, int layer_end); + void pplx_model_free(pplx_model_t *model); /* -- cgit v1.3.1