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

Method ~InferenceState

src/model.cpp:728–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728InferenceState::~InferenceState() {
729 if (_device == Device::CPU) {
730 delete[] _x;
731 delete[] _xb;
732 delete[] _xb2;
733 delete[] _hb;
734 delete[] _hb2;
735 if (_q_a != nullptr) {
736 delete[] _q_a;
737 }
738 delete[] _q;
739 delete[] _kv_a;
740 delete[] _kv_b;
741 delete[] _ropebuf;
742 delete[] _k;
743 delete[] _v;
744 delete[] _att;
745 delete[] _logits;
746 delete[] _logit_indices;
747 if (_moe_weights != nullptr) {
748 delete[] _moe_weights;
749 delete[] _active_experts;
750 delete[] _active_experts_weights;
751 }
752 delete[] _aqb;
753 }
754}
755
756Model::Model(YALMData& yalm, int context) {
757 config = std::make_shared<Config>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected