char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
0754b7b6f
char/aliceai-t5-moe
1#include "llama-io.h" 2 3#include <vector> 4 5void llama_io_write_i::write_string (const std::string & str ) { 6uint32_t str_size = str .size (); 7 8write (& str_size ,sizeof (str_size )); 9write (str .data (),str_size ); 10} 11 12void llama_io_read_i::read_string (std::string & str ) { 13uint32_t str_size ; 14read (& str_size ,sizeof (str_size )); 15 16 std::vector < char > buf (str_size ); 17read (buf .data (),str_size ); 18 19str .assign (buf .data (),str_size ); 20}