diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-05-30 11:23:52 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:26:57 +0200 |
| commit | f6e959455add3260a483c89e6fb9aa214d4e6789 (patch) | |
| tree | cf4ace129480645fe8e19d04e3b7688549b93be4 /pplx_embed.h | |
| parent | 1a69ce474b8698ab8701119305e32c55cac7239b (diff) | |
| download | ffwd-f6e959455add3260a483c89e6fb9aa214d4e6789.tar.gz ffwd-f6e959455add3260a483c89e6fb9aa214d4e6789.zip | |
dist: load distributed layer shards selectively
Diffstat (limited to 'pplx_embed.h')
| -rw-r--r-- | pplx_embed.h | 12 |
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); /* |
