TinyLlama.cpp 1.0
A lightweight C++ implementation of the TinyLlama language model
Loading...
Searching...
No Matches
Classes
safetensors_loader.h File Reference

SafeTensors format loader for efficient tensor loading, supporting single and sharded models. More...

#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <functional>
#include <future>
#include <map>
#include <memory>
#include <mutex>
#include <nlohmann/json.hpp>
#include <queue>
#include <stdexcept>
#include <string>
#include <thread>
#include <vector>
#include <filesystem>
#include "logger.h"
Include dependency graph for safetensors_loader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Shard
 Represents a memory-mapped SafeTensors file (shard). More...
 
class  SafeTensorsLoader
 Main class for loading tensors from SafeTensors format files (single or sharded) More...
 
struct  SafeTensorsLoader::TensorInfo
 Information about a tensor stored in the SafeTensors file(s) More...
 
class  ThreadPool
 Thread pool for parallel tensor loading operations. More...
 

Detailed Description

SafeTensors format loader for efficient tensor loading, supporting single and sharded models.

Definition in file safetensors_loader.h.