From e00becb643b3a99de16462b3a032717a93b983d9 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Wed, 17 Jun 2026 01:21:41 +0200 Subject: all: accept F16 safetensors weights (widen to F32 at load) --- src/internal.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index b3c2aa0..c1429de 100644 --- a/src/internal.h +++ b/src/internal.h @@ -7,6 +7,10 @@ typedef struct { safetensor_dtype_t dtype; const void *data; + /* 0: data is a borrowed view into the safetensors mmap (F32/BF16, the common + * case). 1: data is a heap buffer owned by the model and freed on unload. + * Set when an F16 tensor is widened to F32 at load (no fused F16 kernel). */ + int owned; } embed_weight_ref_t; typedef struct { -- cgit v1.3.1