MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / require_f32_tensor

Method require_f32_tensor

src/framework/assets/tensor_source.cpp:435–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433 }
434 if (data.bytes.size() % sizeof(float) != 0) {
435 throw std::runtime_error("BNB NF4 F32 tensor byte size mismatch: " + data.metadata.name);
436 }
437 std::vector<float> values(data.bytes.size() / sizeof(float));
438 std::memcpy(values.data(), data.bytes.data(), data.bytes.size());
439 return values;
440}
441
442struct BnbNf4QuantState {
443 std::vector<int64_t> shape;
444 int64_t blocksize = 0;

Callers 15

read_f32_tensor_valuesFunction · 0.80
read_f32_tensor_valuesFunction · 0.80
require_channel_paramFunction · 0.80
load_from_directoryMethod · 0.80
read_f32_tensor_valuesFunction · 0.80
load_layer_weightsFunction · 0.80
load_blockFunction · 0.80
load_encoderFunction · 0.80
load_decoderFunction · 0.80
load_connectorFunction · 0.80
load_layer_weightsFunction · 0.80

Calls 2

shape_from_dimsFunction · 0.85
require_f32Function · 0.85

Tested by 4

run_caseFunction · 0.64
run_waveform_caseFunction · 0.64
run_caseFunction · 0.64
run_caseFunction · 0.64