@fugood/llama.node 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/bin/darwin/arm64/llama-node.node +0 -0
  2. package/bin/darwin/x64/llama-node.node +0 -0
  3. package/bin/linux/arm64/llama-node.node +0 -0
  4. package/bin/linux/x64/llama-node.node +0 -0
  5. package/bin/linux-cuda/arm64/llama-node.node +0 -0
  6. package/bin/linux-cuda/x64/llama-node.node +0 -0
  7. package/bin/linux-vulkan/arm64/llama-node.node +0 -0
  8. package/bin/linux-vulkan/x64/llama-node.node +0 -0
  9. package/bin/win32/arm64/llama-node.node +0 -0
  10. package/bin/win32/arm64/node.lib +0 -0
  11. package/bin/win32/x64/llama-node.node +0 -0
  12. package/bin/win32/x64/node.lib +0 -0
  13. package/bin/win32-vulkan/arm64/llama-node.node +0 -0
  14. package/bin/win32-vulkan/arm64/node.lib +0 -0
  15. package/bin/win32-vulkan/x64/llama-node.node +0 -0
  16. package/bin/win32-vulkan/x64/node.lib +0 -0
  17. package/package.json +1 -1
  18. package/src/llama.cpp/examples/server/server.cpp +5 -0
  19. package/src/llama.cpp/examples/tts/tts.cpp +8 -0
  20. package/src/llama.cpp/ggml/src/CMakeLists.txt +5 -1
  21. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp +1493 -12
  22. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c +31 -27
  23. package/src/llama.cpp/ggml/src/ggml-sycl/CMakeLists.txt +32 -12
  24. package/src/llama.cpp/ggml/src/ggml-sycl/common.hpp +27 -1
  25. package/src/llama.cpp/ggml/src/ggml-sycl/gemm.hpp +12 -43
  26. package/src/llama.cpp/ggml/src/ggml-sycl/ggml-sycl.cpp +6 -6
  27. package/src/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp +46 -12
  28. package/src/llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp +4 -2
  29. package/src/llama.cpp/src/llama-arch.cpp +1 -0
  30. package/src/llama.cpp/src/llama-model.cpp +65 -38
  31. package/src/llama.cpp/tests/test-backend-ops.cpp +57 -14
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fugood/llama.node",
3
3
  "access": "public",
4
- "version": "0.3.15",
4
+ "version": "0.3.16",
5
5
  "description": "An another Node binding of llama.cpp",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {
@@ -830,6 +830,11 @@ struct server_task_result_cmpl_final : server_task_result {
830
830
  ret.push_back({"timings", timings.to_json()});
831
831
  }
832
832
 
833
+ // extra fields for debugging purposes
834
+ if (verbose) {
835
+ ret["__verbose"] = to_json_non_oaicompat();
836
+ }
837
+
833
838
  return ret;
834
839
  }
835
840
  };
@@ -571,6 +571,10 @@ int main(int argc, char ** argv) {
571
571
  model_ttc = llama_init_ttc.model.get();
572
572
  ctx_ttc = llama_init_ttc.context.get();
573
573
 
574
+ if (model_ttc == nullptr || ctx_ttc == nullptr) {
575
+ return ENOENT;
576
+ }
577
+
574
578
  const llama_vocab * vocab = llama_model_get_vocab(model_ttc);
575
579
 
576
580
  // TODO: refactor in a common struct
@@ -586,6 +590,10 @@ int main(int argc, char ** argv) {
586
590
  model_cts = llama_init_cts.model.get();
587
591
  ctx_cts = llama_init_cts.context.get();
588
592
 
593
+ if (model_cts == nullptr || ctx_cts == nullptr) {
594
+ return ENOENT;
595
+ }
596
+
589
597
  std::vector<common_sampler *> smpl(n_parallel);
590
598
  for (int i = 0; i < n_parallel; ++i) {
591
599
  params.sampling.no_perf = (i != 0);
@@ -76,7 +76,11 @@ if (GGML_CCACHE)
76
76
  set(GGML_CCACHE_VARIANT sccache)
77
77
  endif()
78
78
  # TODO: should not be set globally
79
- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${GGML_CCACHE_VARIANT}")
79
+ if (GGML_SYCL AND GGML_CCACHE_FOUND AND WIN32)
80
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache compiler_type=icl")
81
+ else ()
82
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${GGML_CCACHE_VARIANT}")
83
+ endif ()
80
84
  set(ENV{CCACHE_SLOPPINESS} time_macros)
81
85
  message(STATUS "${GGML_CCACHE_VARIANT} found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
82
86
  else()