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

Function llama_set_param

smallthinker/src/llama-context.cpp:1972–1986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1970//
1971
1972static void llama_set_param(struct ggml_tensor * tensor, llama_opt_param_filter param_filter, void * userdata) {
1973 if (!tensor || tensor->type != GGML_TYPE_F32) {
1974 return;
1975 }
1976 if (!param_filter(tensor, userdata)) {
1977 return;
1978 }
1979 if (strcmp(tensor->name, "token_embd.weight") == 0) {
1980 return; // FIXME
1981 }
1982 if (strcmp(tensor->name, "rope_freqs.weight") == 0) {
1983 return; // FIXME
1984 }
1985 ggml_set_param(tensor);
1986}
1987
1988void llama_context::opt_init(struct llama_model * model, struct llama_opt_params lopt_params) {
1989 GGML_ASSERT(!opt_ctx);

Callers 1

opt_initMethod · 0.85

Calls 1

ggml_set_paramFunction · 0.50

Tested by

no test coverage detected