TinyLlama.cpp 1.0
A lightweight C++ implementation of the TinyLlama language model
Loading...
Searching...
No Matches
Public Attributes | List of all members
SafeTensorsLoader::TensorInfo Struct Reference

Information about a tensor stored in the SafeTensors file(s) More...

#include <safetensors_loader.h>

Collaboration diagram for SafeTensorsLoader::TensorInfo:
Collaboration graph

Public Attributes

std::string name
 
std::string dtype
 
std::vector< size_t > shape
 
size_t data_offset
 
size_t nbytes
 
std::string shard_key
 

Detailed Description

Information about a tensor stored in the SafeTensors file(s)

Definition at line 125 of file safetensors_loader.h.

Member Data Documentation

◆ data_offset

size_t SafeTensorsLoader::TensorInfo::data_offset

Offset of tensor data relative to its shard's tensor_data_block_ptr

Definition at line 129 of file safetensors_loader.h.

Referenced by SafeTensorsLoader::get_tensor_bytes(), and SafeTensorsLoader::parse_shard_metadata().

◆ dtype

std::string SafeTensorsLoader::TensorInfo::dtype

Data type of the tensor (e.g., "F32", "F16")

Definition at line 127 of file safetensors_loader.h.

Referenced by SafeTensorsLoader::get_tensor_bytes(), and SafeTensorsLoader::parse_shard_metadata().

◆ name

std::string SafeTensorsLoader::TensorInfo::name

Name of the tensor

Definition at line 126 of file safetensors_loader.h.

Referenced by SafeTensorsLoader::parse_shard_metadata().

◆ nbytes

size_t SafeTensorsLoader::TensorInfo::nbytes

Number of bytes occupied by the tensor

Definition at line 130 of file safetensors_loader.h.

Referenced by SafeTensorsLoader::get_tensor_bytes(), and SafeTensorsLoader::parse_shard_metadata().

◆ shape

std::vector<size_t> SafeTensorsLoader::TensorInfo::shape

Shape of the tensor as a vector of dimensions

Definition at line 128 of file safetensors_loader.h.

Referenced by SafeTensorsLoader::parse_shard_metadata().

◆ shard_key

std::string SafeTensorsLoader::TensorInfo::shard_key

Key (e.g., filename) of the shard this tensor belongs to

Definition at line 131 of file safetensors_loader.h.

Referenced by SafeTensorsLoader::parse_shard_metadata().


The documentation for this struct was generated from the following file: