class

GS::MASt3R::SafetensorsLoader

Inherits Reference < Object

Safetensors file reader with mmap support (like llama.cpp)

Constructors

new(path : String)
Source

Instance methods

finalize
Source
load_all(device : Tensor::Device = Tensor::Device::CPU) : Hash(String, Tensor)

Load all tensors

Source
load_by_prefix(prefix : String, device : Tensor::Device = Tensor::Device::CPU) : Hash(String, Tensor)

Load multiple tensors by prefix (e.g., "encoder.layer.0")

Source
load_tensor(name : String, device : Tensor::Device = Tensor::Device::CPU) : Tensor

Load a single tensor by name

Source
loaded_names
Source
path
Source
tensor_info(name : String) : TensorInfo | Nil

Get tensor info by name

Source
tensor_names

List all tensor names

Source
tensors
Source