MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / llama_set_param

Function llama_set_param

subprojects/llama.cpp/src/llama-context.cpp:2734–2748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2732//
2733
2734static void llama_set_param(struct ggml_tensor * tensor, llama_opt_param_filter param_filter, void * userdata) {
2735 if (!tensor || tensor->type != GGML_TYPE_F32) {
2736 return;
2737 }
2738 if (!param_filter(tensor, userdata)) {
2739 return;
2740 }
2741 if (strcmp(tensor->name, "token_embd.weight") == 0) {
2742 return; // FIXME
2743 }
2744 if (strcmp(tensor->name, "rope_freqs.weight") == 0) {
2745 return; // FIXME
2746 }
2747 ggml_set_param(tensor);
2748}
2749
2750void llama_context::opt_init(struct llama_model * model, struct llama_opt_params lopt_params) {
2751 GGML_ASSERT(!opt_ctx);

Callers 1

opt_initMethod · 0.85

Calls 1

ggml_set_paramFunction · 0.85

Tested by

no test coverage detected