aboutsummaryrefslogtreecommitdiff
path: root/pplx_embed.h
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-05-30 11:23:52 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-06-14 08:26:57 +0200
commitf6e959455add3260a483c89e6fb9aa214d4e6789 (patch)
treecf4ace129480645fe8e19d04e3b7688549b93be4 /pplx_embed.h
parent1a69ce474b8698ab8701119305e32c55cac7239b (diff)
downloadffwd-f6e959455add3260a483c89e6fb9aa214d4e6789.tar.gz
ffwd-f6e959455add3260a483c89e6fb9aa214d4e6789.zip
dist: load distributed layer shards selectively
Diffstat (limited to 'pplx_embed.h')
-rw-r--r--pplx_embed.h12
1 files changed, 12 insertions, 0 deletions
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);
/*