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

Function ggml_opt_default_params

ggml.c:18874–18943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18872}
18873
18874struct ggml_opt_params ggml_opt_default_params(enum ggml_opt_type type) {
18875 struct ggml_opt_params result;
18876
18877 switch (type) {
18878 case GGML_OPT_ADAM:
18879 {
18880 result = (struct ggml_opt_params) {
18881 .type = GGML_OPT_ADAM,
18882 .graph_size = GGML_DEFAULT_GRAPH_SIZE,
18883 .n_threads = 1, // FIXME: GGML_DEFAULT_N_THREADS ?
18884 .past = 0,
18885 .delta = 1e-5f,
18886
18887 .max_no_improvement = 100,
18888
18889 .print_forward_graph = true,
18890 .print_backward_graph = true,
18891
18892 .n_gradient_accumulation = 1,
18893
18894 .adam = {
18895 .n_iter = 10000,
18896 .sched = 1.000f,
18897 .decay = 0.0f,
18898 .decay_min_ndim = 2,
18899 .alpha = 0.001f,
18900 .beta1 = 0.9f,
18901 .beta2 = 0.999f,
18902 .eps = 1e-8f,
18903 .eps_f = 1e-5f,
18904 .eps_g = 1e-3f,
18905 .gclip = 0.0f,
18906 },
18907 };
18908 } break;
18909 case GGML_OPT_LBFGS:
18910 {
18911 result = (struct ggml_opt_params) {
18912 .type = GGML_OPT_LBFGS,
18913 .graph_size = GGML_DEFAULT_GRAPH_SIZE,
18914 .n_threads = 1,
18915 .past = 0,
18916 .delta = 1e-5f,
18917
18918 .max_no_improvement = 0,
18919
18920 .print_forward_graph = true,
18921 .print_backward_graph = true,
18922
18923 .n_gradient_accumulation = 1,
18924
18925 .lbfgs = {
18926 .m = 6,
18927 .n_iter = 100,
18928 .max_linesearch = 20,
18929
18930 .eps = 1e-5f,
18931 .ftol = 1e-4f,

Callers 5

mainFunction · 0.50
init_train_stateFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by 1

mainFunction · 0.40