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

Class QTensor

src/codec.h:107–120  ·  view source on GitHub ↗

Tensor with quantization metadata.

Source from the content-addressed store, hash-verified

105
106// Tensor with quantization metadata.
107struct QTensor {
108 Quant quant = Quant::F32;
109 std::array<int, 4> shape = {0, 0, 0, 0};
110 void* data = nullptr; // not managed by QTensor
111 size_t size = 0; // size in bytes
112
113 QTensor() = default;
114 QTensor(Quant quant, std::array<int, 4> shape, void* data, size_t size) : quant(quant), shape(shape), data(data), size(size) {}
115 QTensor(const QTensor& other) = default;
116 static QTensor from_codec_tensor(const Tensor& tensor, Quant weight_quant, std::array<int, 4> shape, const int debug_line);
117
118 size_t ndim() const;
119 size_t n_elements() const;
120};
121
122struct YALMData {
123 json metadata;

Callers 2

ffn_cpuFunction · 0.85
BlockMLAMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected