Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1#pragma once2 3#include <cstdint>4#include <memory>5#include <vector>6#include <cstdio>7 8struct llama_file;9struct llama_mmap;10struct llama_mlock;11 12using llama_files = std::vector<std::unique_ptr<llama_file>>;13using llama_mmaps = std::vector<std::unique_ptr<llama_mmap>>;14using llama_mlocks = std::vector<std::unique_ptr<llama_mlock>>;15 16struct llama_file {17 llama_file(const char * fname, const char * mode, bool use_direct_io = false);18 llama_file(FILE * file);19 ~llama_file();20 21 size_t tell() const;22 size_t size() const;23 24 int file_id() const; // fileno overload25 26 void seek(size_t offset, int whence) const;27 28 void read_raw(void * ptr, size_t len);29 void read_raw_unsafe(void * ptr, size_t len);30 void read_aligned_chunk(void * dest, size_t size);31 uint32_t read_u32();32 33 void write_raw(const void * ptr, size_t len) const;34 void write_u32(uint32_t val) const;35 36 size_t read_alignment() const;37 bool has_direct_io() const;38private:39 struct impl;40 std::unique_ptr<impl> pimpl;41};42 43struct llama_mmap {44 llama_mmap(const llama_mmap &) = delete;45 llama_mmap(struct llama_file * file, size_t prefetch = (size_t) -1, bool numa = false);46 ~llama_mmap();47 48 size_t size() const;49 void * addr() const;50 51 void unmap_fragment(size_t first, size_t last);52 53 static const bool SUPPORTED;54 55private:56 struct impl;57 std::unique_ptr<impl> pimpl;58};59 60struct llama_mlock {61 llama_mlock();62 ~llama_mlock();63 64 void init(void * ptr);65 void grow_to(size_t target_size);66 67 static const bool SUPPORTED;68 69private:70 struct impl;71 std::unique_ptr<impl> pimpl;72};73 74size_t llama_path_max();75 