]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
sync : llama.cpp (#0)
authorGeorgi Gerganov <redacted>
Sun, 25 Feb 2024 17:58:06 +0000 (19:58 +0200)
committerGeorgi Gerganov <redacted>
Sun, 25 Feb 2024 17:58:06 +0000 (19:58 +0200)
examples/common-ggml.cpp
scripts/sync-llama.last
tests/test2.c
tests/test3.c

index f1c7f6ef1874e8fedb9e1472a70d86e2fb5bea45..7a3607546837bb9a60099f9662b53ad1afe57777 100644 (file)
@@ -65,6 +65,7 @@ bool ggml_common_quantize_0(
         case GGML_FTYPE_MOSTLY_IQ2_XXS:
         case GGML_FTYPE_MOSTLY_IQ2_XS:
         case GGML_FTYPE_MOSTLY_IQ3_XXS:
+        case GGML_FTYPE_MOSTLY_IQ3_S:
         case GGML_FTYPE_MOSTLY_IQ1_S:
         case GGML_FTYPE_MOSTLY_IQ4_NL:
                 {
@@ -199,6 +200,7 @@ bool ggml_common_quantize_0(
                 case GGML_TYPE_IQ2_XXS:
                 case GGML_TYPE_IQ2_XS:
                 case GGML_TYPE_IQ3_XXS:
+                case GGML_TYPE_IQ3_S:
                 case GGML_TYPE_IQ1_S:
                 case GGML_TYPE_IQ4_NL:
                 case GGML_TYPE_COUNT:
index f3be4198e9c7dc5e8facfae3ef8d7509edafcddd..9d75d02c048b83748f886fe09517215088e6ed2f 100644 (file)
@@ -1 +1 @@
-96633eeca1265ed03e57230de54032041c58f9cd
+f1a98c52546d009f742bdec2154c2a314ea950a6
index 839e3e6de91d6b874606e0637d34925ec6ff6dda..fb29a9fa846c7e927b153a5febbb3cfe2db76fcb 100644 (file)
@@ -20,10 +20,10 @@ int main(int argc, const char ** argv) {
         .no_alloc   = false,
     };
 
-    //struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_ADAM);
+    //struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_TYPE_ADAM);
     //opt_params.adam.alpha = 0.01f;
 
-    struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_LBFGS);
+    struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_TYPE_LBFGS);
 
     // original threads: 8
     int nthreads = 8;
@@ -79,7 +79,7 @@ int main(int argc, const char ** argv) {
         printf("t0 = %f\n", ggml_get_f32_1d(t0, 0));
         printf("t1 = %f\n", ggml_get_f32_1d(t1, 0));
 
-        GGML_ASSERT(res == GGML_OPT_OK);
+        GGML_ASSERT(res == GGML_OPT_RESULT_OK);
 
         GGML_ASSERT(is_close(ggml_get_f32_1d(t0, 0),  5.0f, 1e-3f));
         GGML_ASSERT(is_close(ggml_get_f32_1d(t1, 0), 10.0f, 1e-3f));
@@ -110,7 +110,7 @@ int main(int argc, const char ** argv) {
 
         enum ggml_opt_result res = ggml_opt(NULL, opt_params, f);
 
-        GGML_ASSERT(res == GGML_OPT_OK);
+        GGML_ASSERT(res == GGML_OPT_RESULT_OK);
         GGML_ASSERT(is_close(ggml_get_f32_1d(t0, 0),  5.0f, 1e-2f));
         GGML_ASSERT(is_close(ggml_get_f32_1d(t1, 0), 10.0f, 1e-2f));
     }
@@ -131,7 +131,7 @@ int main(int argc, const char ** argv) {
 
         enum ggml_opt_result res = ggml_opt(NULL, opt_params, f);
 
-        GGML_ASSERT(res == GGML_OPT_OK);
+        GGML_ASSERT(res == GGML_OPT_RESULT_OK);
         GGML_ASSERT(is_close(ggml_get_f32_1d(f,  0), 0.0f, 1e-3f));
         GGML_ASSERT(is_close(ggml_get_f32_1d(t0, 0), 0.0f, 1e-3f));
         GGML_ASSERT(is_close(ggml_get_f32_1d(t1, 0), 0.0f, 1e-3f));
@@ -169,7 +169,7 @@ int main(int argc, const char ** argv) {
 
         enum ggml_opt_result res = ggml_opt(NULL, opt_params, f);
 
-        GGML_ASSERT(res == GGML_OPT_OK);
+        GGML_ASSERT(res == GGML_OPT_RESULT_OK);
         GGML_ASSERT(is_close(ggml_get_f32_1d(f,  0), 0.0f, 1e-3f));
         GGML_ASSERT(is_close(ggml_get_f32_1d(t0, 0), 1.0f, 1e-3f));
         GGML_ASSERT(is_close(ggml_get_f32_1d(t1, 0), 3.0f, 1e-3f));
index b92d6233dcaadbbce8db236e69ce124e0e59e154..12aac708416f6c47bff6371d2732140088dc4ee3 100644 (file)
@@ -15,8 +15,8 @@ int main(int argc, const char ** argv) {
         .no_alloc   = false,
     };
 
-    //struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_ADAM);
-    struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_LBFGS);
+    //struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_TYPE_ADAM);
+    struct ggml_opt_params opt_params = ggml_opt_default_params(GGML_OPT_TYPE_LBFGS);
 
     opt_params.n_threads = (argc > 1) ? atoi(argv[1]) : 8;
 
@@ -68,7 +68,7 @@ int main(int argc, const char ** argv) {
 
         enum ggml_opt_result res = ggml_opt(NULL, opt_params, f);
 
-        GGML_ASSERT(res == GGML_OPT_OK);
+        GGML_ASSERT(res == GGML_OPT_RESULT_OK);
 
         // print results
         for (int i = 0; i < 16; i++) {