Checkpoints ride the SafeGraphs interchange format, and the path extension picks the layout.
A .safegraphs path is one self-describing monolith; a .safegraphs.json path is a manifest cataloging many, with every shard path resolved relative to it.
In-memory buffers hold single monoliths only.
if err := index.On(executor).Save("index.safegraphs", nil); err != nil { log.Fatal(err)}restored, err := usearch.DenseLoadRam("index.safegraphs", &usearch.DenseLoadRamConfig{Executor: executor}) if err != nil { log.Fatal(err)}defer restored.Close()monolith, err := index.SaveBuffer(arena, nil) // sized by the call itself, see Arenasserialized, err := monolith.Bytes()copied, err := usearch.DenseLoadRamBuffer(serialized, nil)
Loading creates the index, freezing its geometry from the checkpoint’s own headers. DenseMetadataRead reads that geometry without opening a shard:
metadata, err := usearch.DenseMetadataRead("index.safegraphs", nil) // a nil config reads on the calling goroutinefmt.Println(metadata.Dimensions, metadata.Metric, metadata.Quantization)
The result carries only the four fields a checkpoint froze, so ValuesPerKey and the placement stay yours to set in the load config.
Serving a checkpoint in place, rather than copying it, yields a read-only handle whose mutating verbs fail with StatusReadOnly, through a memory mapping with DenseViewRam, or from drives with DenseViewNvme:
Executor is the one the read fans out over; nil reads on the calling goroutine.
MemoryDomains
[]int32
MemoryDomains are the NUMA node IDs to place the parts on, part p loading whole into shard p modulo their count; empty derives every node the process may use.
CPUClass is the class to dispatch as; the zero value derives the CPU's own.
StructDenseMetadataDenseMetadata is the geometry and metric a checkpoint froze - everything a reader learns without opening it, and nothing a reader must choose for itself.2
ValuesPerKey is absent because it bounds a live handle's mutable state rather than anything
the serialized form carries, and the placement is absent because a checkpoint records where it
was written, never where a reader must keep it. Both stay yours to set in the load config.
Quantization is the scalar type its vectors are stored and quantized into.
Connectivity
uint
Connectivity is the connections per node the graph was built with.
DenseMetadataReadDenseMetadataRead reads a checkpoint's geometry and metric without loading it - from the manifest's summary when the path names one, so no shard is opened.