MCPcopy Create free account
hub / github.com/andrewkchan/deepseek.cpp / load

Method load

src/debug.cpp:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20template <typename T>
21std::vector<T> BinaryDumper::load(const std::string& filename) {
22 std::ifstream file(filename, std::ios::binary);
23 if (!file) return {};
24
25 // Read count
26 size_t count;
27 file.read(reinterpret_cast<char*>(&count), sizeof(count));
28
29 // Read T data
30 std::vector<T> data(count);
31 file.read(reinterpret_cast<char*>(data.data()), count * sizeof(T));
32
33 if (!file.good()) return {};
34 return data;
35}
36
37template std::vector<float> BinaryDumper::load(const std::string&);
38template std::vector<f16_t> BinaryDumper::load(const std::string&);

Callers 2

load_tokensFunction · 0.80
convert.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected