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

Method forward

src/model.cpp:874–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872}
873
874void Model::forward(InferenceState& s, int token, int pos, InferenceMode mode) {
875 if (s.device() != _device) {
876 std::cerr << "FATAL: inference state device mismatch" << std::endl;
877 assert(false);
878 return;
879 }
880 if (_device == Device::CPU) {
881 _forward_cpu(s, token, pos, mode);
882 }
883}
884
885double Model::active_bytes(size_t pos) const {
886 double bytes_per_weight = bits_per_weight(config->weight_quant, config->block_size[0] * config->block_size[1]) / 8.0;

Callers 3

run_completionFunction · 0.80
run_perplexityFunction · 0.80
run_passkeyFunction · 0.80

Calls 1

deviceMethod · 0.80

Tested by

no test coverage detected