MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ~server_context

Method ~server_context

smallthinker/tools/server/server.cpp:1890–1908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1888 oaicompat_parser_options oai_parser_opt;
1889
1890 ~server_context() {
1891 mtmd_free(mctx);
1892
1893 // Clear any sampling context
1894 for (server_slot & slot : slots) {
1895 common_sampler_free(slot.smpl);
1896 slot.smpl = nullptr;
1897
1898 llama_free(slot.ctx_dft);
1899 slot.ctx_dft = nullptr;
1900
1901 common_speculative_free(slot.spec);
1902 slot.spec = nullptr;
1903
1904 llama_batch_free(slot.batch_spec);
1905 }
1906
1907 llama_batch_free(batch);
1908 }
1909
1910 bool load_model(const common_params & params) {
1911 SRV_INF("loading model '%s'\n", params.model.path.c_str());

Callers

nothing calls this directly

Calls 5

mtmd_freeFunction · 0.85
common_sampler_freeFunction · 0.85
common_speculative_freeFunction · 0.85
llama_freeFunction · 0.50
llama_batch_freeFunction · 0.50

Tested by

no test coverage detected