@fugood/llama.node 0.6.2 → 1.0.0-beta.1

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 (378) hide show
  1. package/CMakeLists.txt +40 -30
  2. package/README.md +4 -1
  3. package/lib/binding.js +41 -29
  4. package/lib/binding.ts +26 -25
  5. package/package.json +45 -10
  6. package/scripts/build.js +47 -0
  7. package/scripts/llama.cpp.patch +109 -0
  8. package/src/anyascii.c +22223 -0
  9. package/src/anyascii.h +42 -0
  10. package/src/tts_utils.cpp +20 -7
  11. package/src/tts_utils.h +2 -0
  12. package/bin/darwin/arm64/llama-node.node +0 -0
  13. package/bin/darwin/x64/llama-node.node +0 -0
  14. package/bin/linux/arm64/llama-node.node +0 -0
  15. package/bin/linux/x64/llama-node.node +0 -0
  16. package/bin/linux-cuda/arm64/llama-node.node +0 -0
  17. package/bin/linux-cuda/x64/llama-node.node +0 -0
  18. package/bin/linux-vulkan/arm64/llama-node.node +0 -0
  19. package/bin/linux-vulkan/x64/llama-node.node +0 -0
  20. package/bin/win32/x64/llama-node.node +0 -0
  21. package/bin/win32/x64/node.lib +0 -0
  22. package/bin/win32-vulkan/arm64/llama-node.node +0 -0
  23. package/bin/win32-vulkan/arm64/node.lib +0 -0
  24. package/bin/win32-vulkan/x64/llama-node.node +0 -0
  25. package/bin/win32-vulkan/x64/node.lib +0 -0
  26. package/patches/node-api-headers+1.1.0.patch +0 -26
  27. package/src/llama.cpp/.github/workflows/build-linux-cross.yml +0 -233
  28. package/src/llama.cpp/.github/workflows/build.yml +0 -1078
  29. package/src/llama.cpp/.github/workflows/close-issue.yml +0 -28
  30. package/src/llama.cpp/.github/workflows/docker.yml +0 -178
  31. package/src/llama.cpp/.github/workflows/editorconfig.yml +0 -29
  32. package/src/llama.cpp/.github/workflows/gguf-publish.yml +0 -44
  33. package/src/llama.cpp/.github/workflows/labeler.yml +0 -17
  34. package/src/llama.cpp/.github/workflows/python-check-requirements.yml +0 -33
  35. package/src/llama.cpp/.github/workflows/python-lint.yml +0 -30
  36. package/src/llama.cpp/.github/workflows/python-type-check.yml +0 -40
  37. package/src/llama.cpp/.github/workflows/release.yml +0 -739
  38. package/src/llama.cpp/.github/workflows/server.yml +0 -237
  39. package/src/llama.cpp/.github/workflows/winget.yml +0 -42
  40. package/src/llama.cpp/cmake/arm64-apple-clang.cmake +0 -16
  41. package/src/llama.cpp/cmake/arm64-windows-llvm.cmake +0 -16
  42. package/src/llama.cpp/cmake/build-info.cmake +0 -64
  43. package/src/llama.cpp/cmake/common.cmake +0 -35
  44. package/src/llama.cpp/cmake/git-vars.cmake +0 -22
  45. package/src/llama.cpp/cmake/x64-windows-llvm.cmake +0 -5
  46. package/src/llama.cpp/common/build-info.cpp.in +0 -4
  47. package/src/llama.cpp/docs/build.md +0 -561
  48. package/src/llama.cpp/examples/CMakeLists.txt +0 -43
  49. package/src/llama.cpp/examples/batched/CMakeLists.txt +0 -5
  50. package/src/llama.cpp/examples/batched/batched.cpp +0 -246
  51. package/src/llama.cpp/examples/chat-13B.bat +0 -57
  52. package/src/llama.cpp/examples/convert-llama2c-to-ggml/CMakeLists.txt +0 -5
  53. package/src/llama.cpp/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp +0 -941
  54. package/src/llama.cpp/examples/deprecation-warning/deprecation-warning.cpp +0 -35
  55. package/src/llama.cpp/examples/embedding/CMakeLists.txt +0 -5
  56. package/src/llama.cpp/examples/embedding/embedding.cpp +0 -323
  57. package/src/llama.cpp/examples/eval-callback/CMakeLists.txt +0 -10
  58. package/src/llama.cpp/examples/eval-callback/eval-callback.cpp +0 -194
  59. package/src/llama.cpp/examples/gen-docs/CMakeLists.txt +0 -5
  60. package/src/llama.cpp/examples/gen-docs/gen-docs.cpp +0 -83
  61. package/src/llama.cpp/examples/gguf/CMakeLists.txt +0 -5
  62. package/src/llama.cpp/examples/gguf/gguf.cpp +0 -265
  63. package/src/llama.cpp/examples/gguf-hash/CMakeLists.txt +0 -22
  64. package/src/llama.cpp/examples/gguf-hash/deps/rotate-bits/rotate-bits.h +0 -46
  65. package/src/llama.cpp/examples/gguf-hash/deps/sha1/sha1.c +0 -295
  66. package/src/llama.cpp/examples/gguf-hash/deps/sha1/sha1.h +0 -52
  67. package/src/llama.cpp/examples/gguf-hash/deps/sha256/sha256.c +0 -221
  68. package/src/llama.cpp/examples/gguf-hash/deps/sha256/sha256.h +0 -24
  69. package/src/llama.cpp/examples/gguf-hash/deps/xxhash/xxhash.c +0 -42
  70. package/src/llama.cpp/examples/gguf-hash/deps/xxhash/xxhash.h +0 -7093
  71. package/src/llama.cpp/examples/gguf-hash/gguf-hash.cpp +0 -694
  72. package/src/llama.cpp/examples/gritlm/CMakeLists.txt +0 -5
  73. package/src/llama.cpp/examples/gritlm/gritlm.cpp +0 -229
  74. package/src/llama.cpp/examples/jeopardy/questions.txt +0 -100
  75. package/src/llama.cpp/examples/llama.android/app/build.gradle.kts +0 -65
  76. package/src/llama.cpp/examples/llama.android/build.gradle.kts +0 -6
  77. package/src/llama.cpp/examples/llama.android/llama/build.gradle.kts +0 -71
  78. package/src/llama.cpp/examples/llama.android/llama/src/main/cpp/CMakeLists.txt +0 -53
  79. package/src/llama.cpp/examples/llama.android/llama/src/main/cpp/llama-android.cpp +0 -452
  80. package/src/llama.cpp/examples/llama.android/settings.gradle.kts +0 -18
  81. package/src/llama.cpp/examples/lookahead/CMakeLists.txt +0 -5
  82. package/src/llama.cpp/examples/lookahead/lookahead.cpp +0 -472
  83. package/src/llama.cpp/examples/lookup/CMakeLists.txt +0 -23
  84. package/src/llama.cpp/examples/lookup/lookup-create.cpp +0 -40
  85. package/src/llama.cpp/examples/lookup/lookup-merge.cpp +0 -47
  86. package/src/llama.cpp/examples/lookup/lookup-stats.cpp +0 -157
  87. package/src/llama.cpp/examples/lookup/lookup.cpp +0 -242
  88. package/src/llama.cpp/examples/parallel/CMakeLists.txt +0 -5
  89. package/src/llama.cpp/examples/parallel/parallel.cpp +0 -492
  90. package/src/llama.cpp/examples/passkey/CMakeLists.txt +0 -5
  91. package/src/llama.cpp/examples/passkey/passkey.cpp +0 -277
  92. package/src/llama.cpp/examples/retrieval/CMakeLists.txt +0 -5
  93. package/src/llama.cpp/examples/retrieval/retrieval.cpp +0 -304
  94. package/src/llama.cpp/examples/save-load-state/CMakeLists.txt +0 -5
  95. package/src/llama.cpp/examples/save-load-state/save-load-state.cpp +0 -246
  96. package/src/llama.cpp/examples/simple/CMakeLists.txt +0 -5
  97. package/src/llama.cpp/examples/simple/simple.cpp +0 -206
  98. package/src/llama.cpp/examples/simple-chat/CMakeLists.txt +0 -5
  99. package/src/llama.cpp/examples/simple-chat/simple-chat.cpp +0 -206
  100. package/src/llama.cpp/examples/simple-cmake-pkg/CMakeLists.txt +0 -11
  101. package/src/llama.cpp/examples/speculative/CMakeLists.txt +0 -5
  102. package/src/llama.cpp/examples/speculative/speculative.cpp +0 -644
  103. package/src/llama.cpp/examples/speculative-simple/CMakeLists.txt +0 -5
  104. package/src/llama.cpp/examples/speculative-simple/speculative-simple.cpp +0 -261
  105. package/src/llama.cpp/examples/sycl/CMakeLists.txt +0 -9
  106. package/src/llama.cpp/examples/sycl/build.sh +0 -23
  107. package/src/llama.cpp/examples/sycl/ls-sycl-device.cpp +0 -13
  108. package/src/llama.cpp/examples/sycl/run-llama2.sh +0 -27
  109. package/src/llama.cpp/examples/sycl/run-llama3.sh +0 -28
  110. package/src/llama.cpp/examples/sycl/win-build-sycl.bat +0 -33
  111. package/src/llama.cpp/examples/sycl/win-run-llama2.bat +0 -9
  112. package/src/llama.cpp/examples/sycl/win-run-llama3.bat +0 -9
  113. package/src/llama.cpp/examples/training/CMakeLists.txt +0 -5
  114. package/src/llama.cpp/examples/training/finetune.cpp +0 -96
  115. package/src/llama.cpp/ggml/cmake/GitVars.cmake +0 -22
  116. package/src/llama.cpp/ggml/cmake/common.cmake +0 -26
  117. package/src/llama.cpp/ggml/src/ggml-alloc.c +0 -1042
  118. package/src/llama.cpp/ggml/src/ggml-backend-impl.h +0 -255
  119. package/src/llama.cpp/ggml/src/ggml-backend-reg.cpp +0 -586
  120. package/src/llama.cpp/ggml/src/ggml-backend.cpp +0 -2008
  121. package/src/llama.cpp/ggml/src/ggml-blas/CMakeLists.txt +0 -87
  122. package/src/llama.cpp/ggml/src/ggml-blas/ggml-blas.cpp +0 -517
  123. package/src/llama.cpp/ggml/src/ggml-cann/CMakeLists.txt +0 -74
  124. package/src/llama.cpp/ggml/src/ggml-cann/acl_tensor.cpp +0 -179
  125. package/src/llama.cpp/ggml/src/ggml-cann/acl_tensor.h +0 -258
  126. package/src/llama.cpp/ggml/src/ggml-cann/aclnn_ops.cpp +0 -2863
  127. package/src/llama.cpp/ggml/src/ggml-cann/aclnn_ops.h +0 -1110
  128. package/src/llama.cpp/ggml/src/ggml-cann/common.h +0 -420
  129. package/src/llama.cpp/ggml/src/ggml-cann/ggml-cann.cpp +0 -2570
  130. package/src/llama.cpp/ggml/src/ggml-common.h +0 -1857
  131. package/src/llama.cpp/ggml/src/ggml-cpu/cmake/FindSIMD.cmake +0 -100
  132. package/src/llama.cpp/ggml/src/ggml-cuda/CMakeLists.txt +0 -184
  133. package/src/llama.cpp/ggml/src/ggml-cuda/vendors/cuda.h +0 -15
  134. package/src/llama.cpp/ggml/src/ggml-cuda/vendors/hip.h +0 -243
  135. package/src/llama.cpp/ggml/src/ggml-cuda/vendors/musa.h +0 -140
  136. package/src/llama.cpp/ggml/src/ggml-hip/CMakeLists.txt +0 -131
  137. package/src/llama.cpp/ggml/src/ggml-impl.h +0 -601
  138. package/src/llama.cpp/ggml/src/ggml-kompute/CMakeLists.txt +0 -166
  139. package/src/llama.cpp/ggml/src/ggml-kompute/ggml-kompute.cpp +0 -2251
  140. package/src/llama.cpp/ggml/src/ggml-metal/CMakeLists.txt +0 -120
  141. package/src/llama.cpp/ggml/src/ggml-metal/ggml-metal-impl.h +0 -622
  142. package/src/llama.cpp/ggml/src/ggml-musa/CMakeLists.txt +0 -113
  143. package/src/llama.cpp/ggml/src/ggml-opencl/CMakeLists.txt +0 -96
  144. package/src/llama.cpp/ggml/src/ggml-opencl/ggml-opencl.cpp +0 -5124
  145. package/src/llama.cpp/ggml/src/ggml-opt.cpp +0 -1037
  146. package/src/llama.cpp/ggml/src/ggml-quants.c +0 -5232
  147. package/src/llama.cpp/ggml/src/ggml-quants.h +0 -100
  148. package/src/llama.cpp/ggml/src/ggml-rpc/CMakeLists.txt +0 -9
  149. package/src/llama.cpp/ggml/src/ggml-rpc/ggml-rpc.cpp +0 -1813
  150. package/src/llama.cpp/ggml/src/ggml-sycl/CMakeLists.txt +0 -189
  151. package/src/llama.cpp/ggml/src/ggml-sycl/backend.hpp +0 -37
  152. package/src/llama.cpp/ggml/src/ggml-sycl/binbcast.cpp +0 -239
  153. package/src/llama.cpp/ggml/src/ggml-sycl/binbcast.hpp +0 -39
  154. package/src/llama.cpp/ggml/src/ggml-sycl/common.cpp +0 -83
  155. package/src/llama.cpp/ggml/src/ggml-sycl/common.hpp +0 -493
  156. package/src/llama.cpp/ggml/src/ggml-sycl/concat.cpp +0 -197
  157. package/src/llama.cpp/ggml/src/ggml-sycl/concat.hpp +0 -20
  158. package/src/llama.cpp/ggml/src/ggml-sycl/conv.cpp +0 -100
  159. package/src/llama.cpp/ggml/src/ggml-sycl/conv.hpp +0 -20
  160. package/src/llama.cpp/ggml/src/ggml-sycl/convert.cpp +0 -623
  161. package/src/llama.cpp/ggml/src/ggml-sycl/convert.hpp +0 -34
  162. package/src/llama.cpp/ggml/src/ggml-sycl/cpy.cpp +0 -701
  163. package/src/llama.cpp/ggml/src/ggml-sycl/cpy.hpp +0 -11
  164. package/src/llama.cpp/ggml/src/ggml-sycl/dequantize.hpp +0 -791
  165. package/src/llama.cpp/ggml/src/ggml-sycl/dmmv.cpp +0 -1160
  166. package/src/llama.cpp/ggml/src/ggml-sycl/dmmv.hpp +0 -27
  167. package/src/llama.cpp/ggml/src/ggml-sycl/dpct/helper.hpp +0 -2957
  168. package/src/llama.cpp/ggml/src/ggml-sycl/element_wise.cpp +0 -1536
  169. package/src/llama.cpp/ggml/src/ggml-sycl/element_wise.hpp +0 -75
  170. package/src/llama.cpp/ggml/src/ggml-sycl/gemm.hpp +0 -99
  171. package/src/llama.cpp/ggml/src/ggml-sycl/getrows.cpp +0 -311
  172. package/src/llama.cpp/ggml/src/ggml-sycl/getrows.hpp +0 -20
  173. package/src/llama.cpp/ggml/src/ggml-sycl/ggml-sycl.cpp +0 -4443
  174. package/src/llama.cpp/ggml/src/ggml-sycl/gla.cpp +0 -105
  175. package/src/llama.cpp/ggml/src/ggml-sycl/gla.hpp +0 -8
  176. package/src/llama.cpp/ggml/src/ggml-sycl/im2col.cpp +0 -136
  177. package/src/llama.cpp/ggml/src/ggml-sycl/im2col.hpp +0 -21
  178. package/src/llama.cpp/ggml/src/ggml-sycl/mmq.cpp +0 -3030
  179. package/src/llama.cpp/ggml/src/ggml-sycl/mmq.hpp +0 -33
  180. package/src/llama.cpp/ggml/src/ggml-sycl/mmvq.cpp +0 -1108
  181. package/src/llama.cpp/ggml/src/ggml-sycl/mmvq.hpp +0 -27
  182. package/src/llama.cpp/ggml/src/ggml-sycl/norm.cpp +0 -474
  183. package/src/llama.cpp/ggml/src/ggml-sycl/norm.hpp +0 -26
  184. package/src/llama.cpp/ggml/src/ggml-sycl/outprod.cpp +0 -46
  185. package/src/llama.cpp/ggml/src/ggml-sycl/outprod.hpp +0 -10
  186. package/src/llama.cpp/ggml/src/ggml-sycl/presets.hpp +0 -74
  187. package/src/llama.cpp/ggml/src/ggml-sycl/quants.hpp +0 -83
  188. package/src/llama.cpp/ggml/src/ggml-sycl/rope.cpp +0 -362
  189. package/src/llama.cpp/ggml/src/ggml-sycl/rope.hpp +0 -20
  190. package/src/llama.cpp/ggml/src/ggml-sycl/softmax.cpp +0 -264
  191. package/src/llama.cpp/ggml/src/ggml-sycl/softmax.hpp +0 -20
  192. package/src/llama.cpp/ggml/src/ggml-sycl/sycl_hw.cpp +0 -13
  193. package/src/llama.cpp/ggml/src/ggml-sycl/sycl_hw.hpp +0 -23
  194. package/src/llama.cpp/ggml/src/ggml-sycl/tsembd.cpp +0 -73
  195. package/src/llama.cpp/ggml/src/ggml-sycl/tsembd.hpp +0 -20
  196. package/src/llama.cpp/ggml/src/ggml-sycl/vecdotq.hpp +0 -1215
  197. package/src/llama.cpp/ggml/src/ggml-sycl/wkv.cpp +0 -305
  198. package/src/llama.cpp/ggml/src/ggml-sycl/wkv.hpp +0 -10
  199. package/src/llama.cpp/ggml/src/ggml-threading.cpp +0 -12
  200. package/src/llama.cpp/ggml/src/ggml-threading.h +0 -14
  201. package/src/llama.cpp/ggml/src/ggml-vulkan/CMakeLists.txt +0 -196
  202. package/src/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp +0 -10699
  203. package/src/llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders/CMakeLists.txt +0 -39
  204. package/src/llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp +0 -751
  205. package/src/llama.cpp/ggml/src/ggml.c +0 -6550
  206. package/src/llama.cpp/ggml/src/gguf.cpp +0 -1330
  207. package/src/llama.cpp/models/.editorconfig +0 -1
  208. package/src/llama.cpp/models/ggml-vocab-aquila.gguf +0 -0
  209. package/src/llama.cpp/models/ggml-vocab-baichuan.gguf +0 -0
  210. package/src/llama.cpp/models/ggml-vocab-bert-bge.gguf +0 -0
  211. package/src/llama.cpp/models/ggml-vocab-bert-bge.gguf.inp +0 -112
  212. package/src/llama.cpp/models/ggml-vocab-bert-bge.gguf.out +0 -46
  213. package/src/llama.cpp/models/ggml-vocab-chameleon.gguf.inp +0 -112
  214. package/src/llama.cpp/models/ggml-vocab-chameleon.gguf.out +0 -46
  215. package/src/llama.cpp/models/ggml-vocab-command-r.gguf +0 -0
  216. package/src/llama.cpp/models/ggml-vocab-command-r.gguf.inp +0 -112
  217. package/src/llama.cpp/models/ggml-vocab-command-r.gguf.out +0 -46
  218. package/src/llama.cpp/models/ggml-vocab-deepseek-coder.gguf +0 -0
  219. package/src/llama.cpp/models/ggml-vocab-deepseek-coder.gguf.inp +0 -112
  220. package/src/llama.cpp/models/ggml-vocab-deepseek-coder.gguf.out +0 -46
  221. package/src/llama.cpp/models/ggml-vocab-deepseek-llm.gguf +0 -0
  222. package/src/llama.cpp/models/ggml-vocab-deepseek-llm.gguf.inp +0 -112
  223. package/src/llama.cpp/models/ggml-vocab-deepseek-llm.gguf.out +0 -46
  224. package/src/llama.cpp/models/ggml-vocab-deepseek-r1-qwen.gguf.inp +0 -112
  225. package/src/llama.cpp/models/ggml-vocab-deepseek-r1-qwen.gguf.out +0 -46
  226. package/src/llama.cpp/models/ggml-vocab-falcon.gguf +0 -0
  227. package/src/llama.cpp/models/ggml-vocab-falcon.gguf.inp +0 -112
  228. package/src/llama.cpp/models/ggml-vocab-falcon.gguf.out +0 -46
  229. package/src/llama.cpp/models/ggml-vocab-gpt-2.gguf +0 -0
  230. package/src/llama.cpp/models/ggml-vocab-gpt-2.gguf.inp +0 -112
  231. package/src/llama.cpp/models/ggml-vocab-gpt-2.gguf.out +0 -46
  232. package/src/llama.cpp/models/ggml-vocab-gpt-4o.gguf.inp +0 -112
  233. package/src/llama.cpp/models/ggml-vocab-gpt-4o.gguf.out +0 -46
  234. package/src/llama.cpp/models/ggml-vocab-gpt-neox.gguf +0 -0
  235. package/src/llama.cpp/models/ggml-vocab-llama-bpe.gguf +0 -0
  236. package/src/llama.cpp/models/ggml-vocab-llama-bpe.gguf.inp +0 -112
  237. package/src/llama.cpp/models/ggml-vocab-llama-bpe.gguf.out +0 -46
  238. package/src/llama.cpp/models/ggml-vocab-llama-spm.gguf +0 -0
  239. package/src/llama.cpp/models/ggml-vocab-llama-spm.gguf.inp +0 -112
  240. package/src/llama.cpp/models/ggml-vocab-llama-spm.gguf.out +0 -46
  241. package/src/llama.cpp/models/ggml-vocab-llama4.gguf.inp +0 -112
  242. package/src/llama.cpp/models/ggml-vocab-llama4.gguf.out +0 -46
  243. package/src/llama.cpp/models/ggml-vocab-mpt.gguf +0 -0
  244. package/src/llama.cpp/models/ggml-vocab-mpt.gguf.inp +0 -112
  245. package/src/llama.cpp/models/ggml-vocab-mpt.gguf.out +0 -46
  246. package/src/llama.cpp/models/ggml-vocab-phi-3.gguf +0 -0
  247. package/src/llama.cpp/models/ggml-vocab-phi-3.gguf.inp +0 -112
  248. package/src/llama.cpp/models/ggml-vocab-phi-3.gguf.out +0 -46
  249. package/src/llama.cpp/models/ggml-vocab-pixtral.gguf.inp +0 -112
  250. package/src/llama.cpp/models/ggml-vocab-pixtral.gguf.out +0 -46
  251. package/src/llama.cpp/models/ggml-vocab-qwen2.gguf +0 -0
  252. package/src/llama.cpp/models/ggml-vocab-qwen2.gguf.inp +0 -112
  253. package/src/llama.cpp/models/ggml-vocab-qwen2.gguf.out +0 -46
  254. package/src/llama.cpp/models/ggml-vocab-refact.gguf +0 -0
  255. package/src/llama.cpp/models/ggml-vocab-refact.gguf.inp +0 -112
  256. package/src/llama.cpp/models/ggml-vocab-refact.gguf.out +0 -46
  257. package/src/llama.cpp/models/ggml-vocab-roberta-bpe.gguf.inp +0 -112
  258. package/src/llama.cpp/models/ggml-vocab-roberta-bpe.gguf.out +0 -46
  259. package/src/llama.cpp/models/ggml-vocab-starcoder.gguf +0 -0
  260. package/src/llama.cpp/models/ggml-vocab-starcoder.gguf.inp +0 -112
  261. package/src/llama.cpp/models/ggml-vocab-starcoder.gguf.out +0 -46
  262. package/src/llama.cpp/pocs/CMakeLists.txt +0 -14
  263. package/src/llama.cpp/pocs/vdot/CMakeLists.txt +0 -9
  264. package/src/llama.cpp/pocs/vdot/q8dot.cpp +0 -173
  265. package/src/llama.cpp/pocs/vdot/vdot.cpp +0 -311
  266. package/src/llama.cpp/prompts/LLM-questions.txt +0 -49
  267. package/src/llama.cpp/prompts/alpaca.txt +0 -1
  268. package/src/llama.cpp/prompts/assistant.txt +0 -31
  269. package/src/llama.cpp/prompts/chat-with-baichuan.txt +0 -4
  270. package/src/llama.cpp/prompts/chat-with-bob.txt +0 -7
  271. package/src/llama.cpp/prompts/chat-with-qwen.txt +0 -1
  272. package/src/llama.cpp/prompts/chat-with-vicuna-v0.txt +0 -7
  273. package/src/llama.cpp/prompts/chat-with-vicuna-v1.txt +0 -7
  274. package/src/llama.cpp/prompts/chat.txt +0 -28
  275. package/src/llama.cpp/prompts/dan-modified.txt +0 -1
  276. package/src/llama.cpp/prompts/dan.txt +0 -1
  277. package/src/llama.cpp/prompts/mnemonics.txt +0 -93
  278. package/src/llama.cpp/prompts/parallel-questions.txt +0 -43
  279. package/src/llama.cpp/prompts/reason-act.txt +0 -18
  280. package/src/llama.cpp/requirements/requirements-all.txt +0 -15
  281. package/src/llama.cpp/requirements/requirements-compare-llama-bench.txt +0 -2
  282. package/src/llama.cpp/requirements/requirements-convert_hf_to_gguf.txt +0 -7
  283. package/src/llama.cpp/requirements/requirements-convert_hf_to_gguf_update.txt +0 -7
  284. package/src/llama.cpp/requirements/requirements-convert_legacy_llama.txt +0 -5
  285. package/src/llama.cpp/requirements/requirements-convert_llama_ggml_to_gguf.txt +0 -1
  286. package/src/llama.cpp/requirements/requirements-convert_lora_to_gguf.txt +0 -4
  287. package/src/llama.cpp/requirements/requirements-gguf_editor_gui.txt +0 -3
  288. package/src/llama.cpp/requirements/requirements-pydantic.txt +0 -3
  289. package/src/llama.cpp/requirements/requirements-test-tokenizer-random.txt +0 -1
  290. package/src/llama.cpp/requirements/requirements-tool_bench.txt +0 -12
  291. package/src/llama.cpp/requirements.txt +0 -13
  292. package/src/llama.cpp/scripts/build-info.sh +0 -30
  293. package/src/llama.cpp/scripts/install-oneapi.bat +0 -19
  294. package/src/llama.cpp/scripts/xxd.cmake +0 -16
  295. package/src/llama.cpp/tests/CMakeLists.txt +0 -177
  296. package/src/llama.cpp/tests/get-model.cpp +0 -21
  297. package/src/llama.cpp/tests/get-model.h +0 -2
  298. package/src/llama.cpp/tests/test-arg-parser.cpp +0 -178
  299. package/src/llama.cpp/tests/test-autorelease.cpp +0 -24
  300. package/src/llama.cpp/tests/test-backend-ops.cpp +0 -4793
  301. package/src/llama.cpp/tests/test-barrier.cpp +0 -94
  302. package/src/llama.cpp/tests/test-c.c +0 -7
  303. package/src/llama.cpp/tests/test-chat-template.cpp +0 -417
  304. package/src/llama.cpp/tests/test-chat.cpp +0 -985
  305. package/src/llama.cpp/tests/test-double-float.cpp +0 -57
  306. package/src/llama.cpp/tests/test-gbnf-validator.cpp +0 -109
  307. package/src/llama.cpp/tests/test-gguf.cpp +0 -1338
  308. package/src/llama.cpp/tests/test-grammar-integration.cpp +0 -1308
  309. package/src/llama.cpp/tests/test-grammar-llguidance.cpp +0 -1201
  310. package/src/llama.cpp/tests/test-grammar-parser.cpp +0 -519
  311. package/src/llama.cpp/tests/test-json-schema-to-grammar.cpp +0 -1304
  312. package/src/llama.cpp/tests/test-llama-grammar.cpp +0 -408
  313. package/src/llama.cpp/tests/test-log.cpp +0 -39
  314. package/src/llama.cpp/tests/test-model-load-cancel.cpp +0 -27
  315. package/src/llama.cpp/tests/test-mtmd-c-api.c +0 -63
  316. package/src/llama.cpp/tests/test-opt.cpp +0 -904
  317. package/src/llama.cpp/tests/test-quantize-fns.cpp +0 -186
  318. package/src/llama.cpp/tests/test-quantize-perf.cpp +0 -365
  319. package/src/llama.cpp/tests/test-quantize-stats.cpp +0 -424
  320. package/src/llama.cpp/tests/test-regex-partial.cpp +0 -288
  321. package/src/llama.cpp/tests/test-rope.cpp +0 -262
  322. package/src/llama.cpp/tests/test-sampling.cpp +0 -399
  323. package/src/llama.cpp/tests/test-tokenizer-0.cpp +0 -312
  324. package/src/llama.cpp/tests/test-tokenizer-1-bpe.cpp +0 -155
  325. package/src/llama.cpp/tests/test-tokenizer-1-spm.cpp +0 -125
  326. package/src/llama.cpp/tools/CMakeLists.txt +0 -39
  327. package/src/llama.cpp/tools/batched-bench/CMakeLists.txt +0 -5
  328. package/src/llama.cpp/tools/batched-bench/batched-bench.cpp +0 -204
  329. package/src/llama.cpp/tools/cvector-generator/CMakeLists.txt +0 -5
  330. package/src/llama.cpp/tools/cvector-generator/completions.txt +0 -582
  331. package/src/llama.cpp/tools/cvector-generator/cvector-generator.cpp +0 -508
  332. package/src/llama.cpp/tools/cvector-generator/mean.hpp +0 -48
  333. package/src/llama.cpp/tools/cvector-generator/negative.txt +0 -4
  334. package/src/llama.cpp/tools/cvector-generator/pca.hpp +0 -315
  335. package/src/llama.cpp/tools/cvector-generator/positive.txt +0 -4
  336. package/src/llama.cpp/tools/export-lora/CMakeLists.txt +0 -5
  337. package/src/llama.cpp/tools/export-lora/export-lora.cpp +0 -434
  338. package/src/llama.cpp/tools/gguf-split/CMakeLists.txt +0 -5
  339. package/src/llama.cpp/tools/gguf-split/gguf-split.cpp +0 -583
  340. package/src/llama.cpp/tools/imatrix/CMakeLists.txt +0 -5
  341. package/src/llama.cpp/tools/imatrix/imatrix.cpp +0 -667
  342. package/src/llama.cpp/tools/llama-bench/CMakeLists.txt +0 -5
  343. package/src/llama.cpp/tools/llama-bench/llama-bench.cpp +0 -2024
  344. package/src/llama.cpp/tools/main/CMakeLists.txt +0 -5
  345. package/src/llama.cpp/tools/main/main.cpp +0 -977
  346. package/src/llama.cpp/tools/mtmd/CMakeLists.txt +0 -58
  347. package/src/llama.cpp/tools/mtmd/clip-impl.h +0 -462
  348. package/src/llama.cpp/tools/mtmd/clip.cpp +0 -4024
  349. package/src/llama.cpp/tools/mtmd/clip.h +0 -101
  350. package/src/llama.cpp/tools/mtmd/deprecation-warning.cpp +0 -22
  351. package/src/llama.cpp/tools/mtmd/miniaudio.h +0 -93468
  352. package/src/llama.cpp/tools/mtmd/mtmd-audio.cpp +0 -855
  353. package/src/llama.cpp/tools/mtmd/mtmd-audio.h +0 -62
  354. package/src/llama.cpp/tools/mtmd/mtmd-cli.cpp +0 -377
  355. package/src/llama.cpp/tools/mtmd/mtmd-helper.cpp +0 -297
  356. package/src/llama.cpp/tools/mtmd/mtmd.cpp +0 -942
  357. package/src/llama.cpp/tools/mtmd/mtmd.h +0 -362
  358. package/src/llama.cpp/tools/mtmd/requirements.txt +0 -5
  359. package/src/llama.cpp/tools/perplexity/CMakeLists.txt +0 -5
  360. package/src/llama.cpp/tools/perplexity/perplexity.cpp +0 -2063
  361. package/src/llama.cpp/tools/quantize/CMakeLists.txt +0 -6
  362. package/src/llama.cpp/tools/quantize/quantize.cpp +0 -519
  363. package/src/llama.cpp/tools/rpc/CMakeLists.txt +0 -4
  364. package/src/llama.cpp/tools/rpc/rpc-server.cpp +0 -322
  365. package/src/llama.cpp/tools/run/CMakeLists.txt +0 -16
  366. package/src/llama.cpp/tools/run/linenoise.cpp/linenoise.cpp +0 -1995
  367. package/src/llama.cpp/tools/run/linenoise.cpp/linenoise.h +0 -137
  368. package/src/llama.cpp/tools/run/run.cpp +0 -1261
  369. package/src/llama.cpp/tools/server/CMakeLists.txt +0 -51
  370. package/src/llama.cpp/tools/server/bench/requirements.txt +0 -2
  371. package/src/llama.cpp/tools/server/httplib.h +0 -10506
  372. package/src/llama.cpp/tools/server/server.cpp +0 -4966
  373. package/src/llama.cpp/tools/server/tests/requirements.txt +0 -8
  374. package/src/llama.cpp/tools/server/utils.hpp +0 -1337
  375. package/src/llama.cpp/tools/tokenize/CMakeLists.txt +0 -5
  376. package/src/llama.cpp/tools/tokenize/tokenize.cpp +0 -416
  377. package/src/llama.cpp/tools/tts/CMakeLists.txt +0 -5
  378. package/src/llama.cpp/tools/tts/tts.cpp +0 -1092
@@ -1,229 +0,0 @@
1
- #include "arg.h"
2
- #include "common.h"
3
- #include "llama.h"
4
-
5
- #include <string>
6
- #include <vector>
7
-
8
- // #define GRIT_DEBUG
9
-
10
- static std::vector<std::vector<float>> encode(llama_context * ctx, const std::vector<std::string> & sentences, const std::string & instruction) {
11
- std::vector<std::vector<float>> result;
12
-
13
- const llama_model * model = llama_get_model(ctx);
14
- const llama_vocab * vocab = llama_model_get_vocab(model);
15
-
16
- llama_batch batch = llama_batch_init(llama_n_batch(ctx), 0, 1);
17
-
18
- for (uint64_t i = 0; i < sentences.size(); i++) {
19
- common_batch_clear(batch);
20
-
21
- const std::string input_string = instruction + sentences[i];
22
-
23
- std::vector<llama_token> inputs = common_tokenize(vocab, input_string, true, false);
24
-
25
- const int32_t n_toks = inputs.size();
26
-
27
- // GritLM seems to have EOS = ""
28
- // https://github.com/ContextualAI/gritlm/blob/92025b16534712b31b3c4aaaf069350e222bd5f8/gritlm/gritlm.py#L18
29
- // inputs.push_back(llama_vocab_eos(vocab));
30
-
31
- // we want to ignore instruction tokens for mean pooling
32
- const int32_t n_inst = common_tokenize(vocab, instruction, true, false).size();
33
-
34
- #ifdef GRIT_DEBUG
35
- // debug tokens - should be matching as referenced in the GritLM sample
36
- std::for_each(inputs.begin(), inputs.end(), [&ctx](llama_token t) {
37
- std::printf("[%u:%s]", t, llama_token_to_piece(ctx, t).c_str());
38
- });
39
- std::printf("\n");
40
- #endif
41
-
42
- // add input to batch (this increments n_tokens)
43
- for (int32_t j = 0; j < n_toks; j++) {
44
- common_batch_add(batch, inputs[j], j, { 0 }, j >= n_inst);
45
- }
46
-
47
- // clear previous kv_cache values (irrelevant for embeddings)
48
- llama_kv_self_clear(ctx);
49
- llama_set_embeddings(ctx, true);
50
- llama_set_causal_attn(ctx, false);
51
-
52
- // run model
53
- llama_decode(ctx, batch);
54
-
55
- // get embedding dimensions
56
- uint64_t n_embd = llama_model_n_embd(model);
57
-
58
- // allocate embedding output
59
- std::vector<float> emb_unorm(n_embd, 0.0f);
60
-
61
- // sum up all token embeddings
62
- for (int32_t k = n_inst; k < n_toks; k++) {
63
- float * emb = llama_get_embeddings_ith(ctx, k);
64
- for (uint64_t j = 0; j < n_embd; j++) {
65
- emb_unorm[j] += emb[j];
66
- }
67
- }
68
-
69
- // divide by number of tokens (mean pooling)
70
- {
71
- const uint64_t n_sent = n_toks - n_inst;
72
-
73
- for (uint64_t j = 0; j < n_embd; j++) {
74
- emb_unorm[j] /= n_sent;
75
- }
76
- }
77
-
78
- std::vector<float> emb_norm(emb_unorm.size());
79
- common_embd_normalize(emb_unorm.data(), emb_norm.data(), n_embd, 2);
80
- result.push_back(emb_norm);
81
-
82
- #ifdef GRIT_DEBUG
83
- // print out emb_norm
84
- std::printf("embedding %ld: ", i);
85
- for (uint64_t j = 0; j < n_embd; j++) {
86
- std::printf("%.5f ", emb_norm[j]);
87
- }
88
- std::printf("\n\n");
89
- #endif
90
- }
91
-
92
- llama_batch_free(batch);
93
-
94
- return result;
95
- }
96
-
97
- static std::string generate(llama_context * ctx, llama_sampler * smpl, const std::string & prompt, bool stream) {
98
- std::string result;
99
-
100
- const llama_model * model = llama_get_model(ctx);
101
- const llama_vocab * vocab = llama_model_get_vocab(model);
102
-
103
- llama_token eos_token = llama_vocab_eos(vocab);
104
-
105
- llama_kv_self_clear(ctx);
106
- llama_set_embeddings(ctx, false);
107
- llama_set_causal_attn(ctx, true);
108
-
109
- llama_batch bat = llama_batch_init(llama_n_batch(ctx), 0, 1);
110
-
111
- std::vector<llama_token> inputs = common_tokenize(vocab, prompt, false, true);
112
- int32_t i_current_token = 0;
113
-
114
- while (true) {
115
- common_batch_clear(bat);
116
- {
117
- const int32_t n_inputs = inputs.size();
118
-
119
- for (int32_t i = 0; i < n_inputs; i++) {
120
- common_batch_add(bat, inputs[i], i_current_token++, { 0 }, i == n_inputs - 1);
121
- }
122
- }
123
- inputs.clear();
124
-
125
- llama_decode(ctx, bat);
126
-
127
- llama_token token = llama_sampler_sample(smpl, ctx, bat.n_tokens - 1);
128
-
129
- if (token == eos_token) {
130
- break;
131
- }
132
-
133
- std::string piece = common_token_to_piece(ctx, token);
134
- if (stream) {
135
- std::printf("%s", piece.c_str());
136
- std::fflush(stdout);
137
- }
138
-
139
- inputs.push_back(token);
140
-
141
- result += piece;
142
- }
143
-
144
- if (stream) {
145
- std::printf("\n");
146
- }
147
-
148
- llama_batch_free(bat);
149
-
150
- return result;
151
- }
152
-
153
- static std::string gritlm_instruction(const std::string & instruction) {
154
- return !instruction.empty() ? "<|user|>\n" + instruction + "\n<|embed|>\n" : "<|embed|>\n";
155
- }
156
-
157
- int main(int argc, char * argv[]) {
158
- common_params params;
159
-
160
- if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_COMMON)) {
161
- return 1;
162
- }
163
-
164
- common_init();
165
-
166
- llama_model_params mparams = common_model_params_to_llama(params);
167
- llama_context_params cparams = common_context_params_to_llama(params);
168
-
169
- llama_backend_init();
170
-
171
- llama_model * model = llama_model_load_from_file(params.model.path.c_str(), mparams);
172
-
173
- // create generation context
174
- llama_context * ctx = llama_init_from_model(model, cparams);
175
-
176
- auto sparams = llama_sampler_chain_default_params();
177
-
178
- sparams.no_perf = false;
179
-
180
- llama_sampler * smpl = llama_sampler_chain_init(sparams);
181
-
182
- llama_sampler_chain_add(smpl, llama_sampler_init_greedy());
183
-
184
- // ### Embedding/Representation ###
185
- // samples taken from: https://github.com/ContextualAI/gritlm#basic
186
- {
187
- const std::string instruction = "Given a scientific paper title, retrieve the paper's abstract";
188
-
189
- const std::vector<std::string> queries = {
190
- "Bitcoin: A Peer-to-Peer Electronic Cash System",
191
- "Generative Representational Instruction Tuning",
192
- };
193
-
194
- const std::vector<std::string> documents = {
195
- "A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.",
196
- "All text-based language problems can be reduced to either generation or embedding. Current models only perform well at one or the other. We introduce generative representational instruction tuning (GRIT) whereby a large language model is trained to handle both generative and embedding tasks by distinguishing between them through instructions. Compared to other open models, our resulting GritLM 7B sets a new state of the art on the Massive Text Embedding Benchmark (MTEB) and outperforms all models up to its size on a range of generative tasks. By scaling up further, GritLM 8X7B outperforms all open generative language models that we tried while still being among the best embedding models. Notably, we find that GRIT matches training on only generative or embedding data, thus we can unify both at no performance loss. Among other benefits, the unification via GRIT speeds up Retrieval-Augmented Generation (RAG) by > 60% for long documents, by no longer requiring separate retrieval and generation models. Models, code, etc. are freely available at https://github.com/ContextualAI/gritlm.",
197
- };
198
-
199
- // No need to add instruction for retrieval documents
200
- const std::vector<std::vector<float>> d_rep = encode(ctx, documents, gritlm_instruction(""));
201
- const std::vector<std::vector<float>> q_rep = encode(ctx, queries, gritlm_instruction(instruction));
202
-
203
- const int n_embd = llama_model_n_embd(model);
204
-
205
- const float cosine_sim_q0_d0 = common_embd_similarity_cos(q_rep[0].data(), d_rep[0].data(), n_embd);
206
- const float cosine_sim_q0_d1 = common_embd_similarity_cos(q_rep[0].data(), d_rep[1].data(), n_embd);
207
- const float cosine_sim_q1_d0 = common_embd_similarity_cos(q_rep[1].data(), d_rep[0].data(), n_embd);
208
- const float cosine_sim_q1_d1 = common_embd_similarity_cos(q_rep[1].data(), d_rep[1].data(), n_embd);
209
-
210
- std::printf("Cosine similarity between \"%.50s\" and \"%.50s\" is: %.3f\n", queries[0].c_str(), documents[0].c_str(), cosine_sim_q0_d0);
211
- std::printf("Cosine similarity between \"%.50s\" and \"%.50s\" is: %.3f\n", queries[0].c_str(), documents[1].c_str(), cosine_sim_q0_d1);
212
- std::printf("Cosine similarity between \"%.50s\" and \"%.50s\" is: %.3f\n", queries[1].c_str(), documents[0].c_str(), cosine_sim_q1_d0);
213
- std::printf("Cosine similarity between \"%.50s\" and \"%.50s\" is: %.3f\n", queries[1].c_str(), documents[1].c_str(), cosine_sim_q1_d1);
214
- }
215
-
216
- // ### Generation ###
217
- // GritLM models are not finetuned with system prompts, as you can just include system-like instructions together with your user instruction
218
- {
219
- const std::string prompt = "<|user|>\nPlease write me a poem about my recent hike of Mt. Fuji at midnight in the style of Shakespeare.\n<|assistant|>\n";
220
- std::string response = generate(ctx, smpl, prompt, true);
221
- }
222
-
223
- llama_sampler_free(smpl);
224
- llama_free(ctx);
225
- llama_model_free(model);
226
- llama_backend_free();
227
-
228
- return 0;
229
- }
@@ -1,100 +0,0 @@
1
- Which man born in 1932 was the son of a percussionist in the CBS radio orchestra has been nominated for 53 Oscars?
2
- What work in English Literature says: 'The mind is its own place, & in itself can make a heaven of hell, a hell of heaven. What matter where, if I be still the same'?
3
- Known for more philosophical works, he wrote the play 'La Mandragola', in which Florentines are rewarded for immoral actions?
4
- James Cook's account of a 1774 visit where records an object 'near 27 feet long, and upwards of 8 feet over the breast or shoulders'?
5
- England's 'Bloody Assizes' & a 1685 life sentence for perjury were 2 main origins of which amendment to the U.S. Constitution?
6
- Which nobel peace price winners each lived at times on Vilakazi St. in Soweto , so it claims to be the world's only street home to 2 Nobel Peace Prize winners?
7
- In 1966, the year of who's death did he share plans for an experimental prototype community in Florida?
8
- Of the 13 nations through which the Equator passes, what is the only one whose coastline borders the Caribbean Sea?
9
- Which decorative items in fashion history get their name from their origin in the port city of Strasbourg, on the border of France & Germany?
10
- What 1980's movie is based on an off-Broadway play with just 3 characters and won the Best Picture Oscar & the actors in all 3 roles were nominated?
11
- A 2012 book review for which novelist noted subjects that 'sparked his ire': capital punishment, big tobacco & 'the plight of the unjustly convicted'?
12
- A 1940 headline about what 20th Century Eponym included 'failure', 'liability when it came to offense' & 'stout hearts no match for tanks'?
13
- Over 700 years after its traditional 1252 founding date, what port city became associated with a psychological response?
14
- The success of what brand has its roots with a hydrotherapy pump its cofounder created for his son, who had arthritis?
15
- In a periodical in 1807, what American Author called New York City 'Gotham, Gotham! Most enlightened of cities'?
16
- What symbol is a rotated V in math and a feeling of some marginalized or underrepresented people in society?
17
- Monty Norman, the composer of what character's theme, said the staccato riff conveyed sexiness, mystery & ruthlessness?
18
- What American Novelist served with an airman named Yohannan in World War II & despite what readers might think, he said he enjoyed his service?
19
- In what Medieval place did one of the participants in an 1170 event say, 'Let us away, knights; he will rise no more'?
20
- At one time a province of the Roman Empire, what African country kingdom is known to Arabic scholars as Al-Maghrib Al-Aqsa, 'the far west'?
21
- Congress relented in 1890 after what prospective state said it would wait 100 years rather than come in without the women?
22
- A writer & producer of what movie said he wanted it to be like a Western or James Bond film, 'only it takes place in the 30s'?
23
- In 1898 what's been called the first blockbuster art show was devoted to which artist & put on for Queen Wilhelmina's coronation?
24
- Part of the largest contiguous land empire during the 1200s & 1300s, today what is the world's second-largest landlocked country?
25
- A 2006 book was titled 'The Poem That Changed America:' What 'Fifty Years Later'?
26
- Backed by 14,000 troops, who invaded England to restore, in his words, its 'religion, laws, and liberties'?
27
- After its completion in the late 19th c., what was landmark was called 'a truly tragic street lamp' & a 'high & skinny pyramid of iron ladders'?
28
- The busiest passenger port in the U.K., what shares its name with a capital of one of the original 13 states?
29
- This man made lists, perhaps to cope with depression; a set of lists he published in 1852 made whose name synonymous with a type of book?
30
- An 1869 presidential pardon was granted to which man, due in part to a plea by the Medical Society of Harford County, Maryland?
31
- Letters, pocket knives, C rations & steel helmets are among the tangible items referred to in the title of what American literature modern war classic?
32
- What nonfiction book has the line, 'The discovery of America…opened up fresh ground for the rising bourgeoisie'?
33
- A radical Republican championed what 1875 act but the Supreme Court struck it down in 1883; a new version was passed 81 years later?
34
- Whose brothers, Castor & Pollux, saved her after Theseus stole her away as a kid; a larger force would seek her later in life?
35
- Once Africa's largest country in area, what African Country dropped to third in 2011 when a portion of it declared independence?
36
- The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned?
37
- For a special 1970s cookbook, who provided one simple recipe–a can of Campbell's tomato soup & 2 cans of milk?
38
- Thought to descend from people of Southeast Asia, the Chamorro make up what U.S. territory’s largest ethnic group?
39
- In office from 2022, the president of what country has taken so many foreign trips a play on his name is 'Ferdinand Magellan Jr.'?
40
- In 1939 which writer lived on Toulouse Street in the French Quarter & chose the professional name that bonded him to the South?
41
- What National Park is named for a river indigenous people called Mi tse a-da-zi, translated by French-speaking trappers as 'Pierre Jaune'?
42
- In 2010 who introduced the 4-point shot, 35 feet from the basket?
43
- Losses over Asia in the 1960s led to the establishment of the program known as what at a San Diego naval base in 1969?
44
- A craft that visited what was named for Giotto, based on the story that 680 years earlier, the painter depicted it as the Star of Bethlehem?
45
- In World War I, 'Cistern' & 'reservoir' were suggested names for what secret invention, but the British preferred this less clumsy monosyllable?
46
- Until 1806, some German nobles included among their honors the title of 'Elector' for their role in selecting this personage?
47
- In 1904, wearing a harness, actress Nina Boucicault became the first to play what character onstage?
48
- Alphabetically the first German city in encyclopedias, what was also the first one taken by the Allies in World War II?
49
- This Sanskrit word referring to a spoken word or phrase comes from a word for 'to think'?
50
- 1917's 'Elements of Trench Warfare' said what Old West invention was 'difficult to destroy' & 'difficult to get through'?
51
- Mimi Reinhard, who never learned to type using more than 2 fingers, produced what in World War II with 1,100 names, including hers?
52
- Poseidon carried off the maiden Theophane & turned her into a ewe; their offspring was the source of what mythical object?
53
- Published in 2011, P.D. James' final novel, 'Death Comes to Pemberley', was a sequel to what novel from 200 years earlier?
54
- 5 U.S. states have 6-letter names; only which 2 west of the Mississippi River border each other?
55
- Originally relating to a story of suffering, what word now more commonly refers to strong emotion of any kind?
56
- The 2007 biopic called 'La Môme' in France, meaning 'The Kid', was released in the U.S. under what other French title?
57
- Returning home in 1493, Columbus stopped in the Azores at an island with what name, also something he'd lost off the Haiti coast?
58
- Pskov & Nizhny Novgorod are 2 of the cities that have a fortress called what?
59
- In the 1950s the New York Times said what author 'is writing about all lust' & his lecherous narrator 'is all of us'?
60
- At the winter solstice, the sun is in Sagittarius; it once appeared in what constellation, giving a geographic feature its name?
61
- Mike Post combined the sound of a slamming jail door, an anvil & 100 men stomping on a floor for what television series that debuted in 1990?
62
- Like Sir Thomas More, 3 16th century English queens are buried at what British location?
63
- In 1692 Increase Mather wrote, 'It were better that ten suspected' of these who 'escape, than that one innocent person be condemned'?
64
- The Geography Mnemonic Mimal, sometimes said to be the silhouette of a chef or elf, stands for Minnesota, Iowa, Missouri, and what other 2 states?
65
- What was first sold in 1908, at a price equivalent to about $27,000 today?
66
- The name of what author dead since 2013 now appears on books written by a former U.S. marshal & a former Apache helicopter pilot?
67
- The artwork once known in France as 'la tapisserie de la Reine Mathilde' is better known as what?
68
- In 2022 which pop star became the first woman to have a Billboard Top 10 album in 5 decades starting with the 1980s?
69
- In one 19th century translation, what female classic tale character 'perceived the dawn of day and ceased' speaking nearly 1,000 times?
70
- Ironically, though what company founded in the 1860s is Moore County, Tennessee's largest employer, Moore is a dry county?
71
- After a 1789 event, who wrote, 'My first determination was to seek a supply of…water at Tofoa, & afterwards to sail for Tongataboo'?
72
- Laurence Olivier & Ernest Borgnine were considered for the lead role & Sergio Leone to direct for what film that turned 50 in 2022?
73
- Until a 1903 secession, what country's contiguous territory spanned 2 continents?
74
- Early in her career which foreign-born author translated romance novels into Spanish, often changing the dialogue to make the heroines smarter?
75
- Saying it was stolen by Napoleon, self-styled Italian patriot Vincenzo Peruggia took what in 1911?
76
- Continuing a downward trend, in July 2022 what US body of water was at 27% capacity, its lowest level since 1937 when it was first being filled?
77
- Each morning which goddess began her ride in her chariot across the sky ahead of her brother Sol, or Helios?
78
- Until the Civil War, the Jan. 8 date of what American battle of dubious military importance but big morale value was a national holiday?
79
- Which children's book title character is told 'By the time you are real, most of your hair has been loved off your eyes drop out & you get shabby'?
80
- In a TV reunion over 40 years in the making, Dolly Parton appeared as an angel named Agnes in the final episode of what comedy in 2022?
81
- In an 1847 American poem what character sees her town of Grand-Pré burned, but finally reunites with her beau for a kiss before his death?
82
- In 2001 who published a book called 'Banging Your Head Against a Brick Wall'; in 2002, 'Existencilism'?
83
- The title object of what childrens book 'never looked more beautiful each strand held dozens of bright drops of early morning dew'?
84
- The shouts of excited children at a 1946 holiday parade are said to have inspired what perennial classic song favorite?
85
- Unable to make what candies perfectly round, the confectioner embraced this flawed name for the product?
86
- What country is home to 58 UNESCO World Heritage Sites, more than any other country; the sites include a volcano & a lagoon?
87
- What action movie's last line is 'If this is their idea of Christmas, I gotta be here for New Years'?
88
- Only 3 presidents have married while in office— John Tyler was the first & which one was the last?
89
- Demonstrating the dignity & humanity of Black Americans, who sat for 160 known photographs, the most of any American in the 19th century?
90
- Originally, which Latin 3-word phrase referred to when a doctor or apothecary substituted one medicine for another?
91
- The 1975 premiere of what movie comedy advertised free coconuts for the first thousand in the audience?
92
- A cocktail, an island & a WWII venture originally called 'Development of Substitute Materials' all bear what name?
93
- Which US President was sworn in twice as President within 2 years, first by his father & then later by a former U.S. President?
94
- A 1609 story in which an exiled king of Bulgaria creates a sea palace with his magic may have inspired the plot of what play?
95
- In 2009, during a 20th anniversary celebration, what landmark was called 'an edifice of fear. On Nov. 9, it became a place of joy'?
96
- Among what world capital's nicknames are the 'City of Classical Music' &, possibly in honor of a famous resident from 1860 to 1938, the 'City of Dreams'?
97
- Now meaning someone with nocturnal habits, what catches a sleeping dove in Shakespeare's 'Lucrece'?
98
- The stars on what country's flag represent states, 26 of them; unlike the USA's, its 'federal district' gets its own 27th star?
99
- What father was the only man among the 13 plaintiffs in a US class-action case filed in 1951?
100
- Reversing the story of what heroine she created, childrens author Patricia Maclachlan was born on the prairie but spent much of her life in New England?
@@ -1,65 +0,0 @@
1
- plugins {
2
- id("com.android.application")
3
- id("org.jetbrains.kotlin.android")
4
- }
5
-
6
- android {
7
- namespace = "com.example.llama"
8
- compileSdk = 34
9
-
10
- defaultConfig {
11
- applicationId = "com.example.llama"
12
- minSdk = 33
13
- targetSdk = 34
14
- versionCode = 1
15
- versionName = "1.0"
16
-
17
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18
- vectorDrawables {
19
- useSupportLibrary = true
20
- }
21
- }
22
-
23
- buildTypes {
24
- release {
25
- isMinifyEnabled = false
26
- proguardFiles(
27
- getDefaultProguardFile("proguard-android-optimize.txt"),
28
- "proguard-rules.pro"
29
- )
30
- }
31
- }
32
- compileOptions {
33
- sourceCompatibility = JavaVersion.VERSION_1_8
34
- targetCompatibility = JavaVersion.VERSION_1_8
35
- }
36
- kotlinOptions {
37
- jvmTarget = "1.8"
38
- }
39
- buildFeatures {
40
- compose = true
41
- }
42
- composeOptions {
43
- kotlinCompilerExtensionVersion = "1.5.1"
44
- }
45
- }
46
-
47
- dependencies {
48
-
49
- implementation("androidx.core:core-ktx:1.12.0")
50
- implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
51
- implementation("androidx.activity:activity-compose:1.8.2")
52
- implementation(platform("androidx.compose:compose-bom:2023.08.00"))
53
- implementation("androidx.compose.ui:ui")
54
- implementation("androidx.compose.ui:ui-graphics")
55
- implementation("androidx.compose.ui:ui-tooling-preview")
56
- implementation("androidx.compose.material3:material3")
57
- implementation(project(":llama"))
58
- testImplementation("junit:junit:4.13.2")
59
- androidTestImplementation("androidx.test.ext:junit:1.1.5")
60
- androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
61
- androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
62
- androidTestImplementation("androidx.compose.ui:ui-test-junit4")
63
- debugImplementation("androidx.compose.ui:ui-tooling")
64
- debugImplementation("androidx.compose.ui:ui-test-manifest")
65
- }
@@ -1,6 +0,0 @@
1
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
- plugins {
3
- id("com.android.application") version "8.2.0" apply false
4
- id("org.jetbrains.kotlin.android") version "1.9.0" apply false
5
- id("com.android.library") version "8.2.0" apply false
6
- }
@@ -1,71 +0,0 @@
1
- plugins {
2
- id("com.android.library")
3
- id("org.jetbrains.kotlin.android")
4
- }
5
-
6
- android {
7
- namespace = "android.llama.cpp"
8
- compileSdk = 34
9
-
10
- defaultConfig {
11
- minSdk = 33
12
-
13
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
14
- consumerProguardFiles("consumer-rules.pro")
15
- ndk {
16
- // Add NDK properties if wanted, e.g.
17
- // abiFilters += listOf("arm64-v8a")
18
- }
19
- externalNativeBuild {
20
- cmake {
21
- arguments += "-DLLAMA_CURL=OFF"
22
- arguments += "-DLLAMA_BUILD_COMMON=ON"
23
- arguments += "-DGGML_LLAMAFILE=OFF"
24
- arguments += "-DCMAKE_BUILD_TYPE=Release"
25
- cppFlags += listOf()
26
- arguments += listOf()
27
-
28
- cppFlags("")
29
- }
30
- }
31
- }
32
-
33
- buildTypes {
34
- release {
35
- isMinifyEnabled = false
36
- proguardFiles(
37
- getDefaultProguardFile("proguard-android-optimize.txt"),
38
- "proguard-rules.pro"
39
- )
40
- }
41
- }
42
- externalNativeBuild {
43
- cmake {
44
- path("src/main/cpp/CMakeLists.txt")
45
- version = "3.22.1"
46
- }
47
- }
48
- compileOptions {
49
- sourceCompatibility = JavaVersion.VERSION_1_8
50
- targetCompatibility = JavaVersion.VERSION_1_8
51
- }
52
- kotlinOptions {
53
- jvmTarget = "1.8"
54
- }
55
-
56
- packaging {
57
- resources {
58
- excludes += "/META-INF/{AL2.0,LGPL2.1}"
59
- }
60
- }
61
- }
62
-
63
- dependencies {
64
-
65
- implementation("androidx.core:core-ktx:1.12.0")
66
- implementation("androidx.appcompat:appcompat:1.6.1")
67
- implementation("com.google.android.material:material:1.11.0")
68
- testImplementation("junit:junit:4.13.2")
69
- androidTestImplementation("androidx.test.ext:junit:1.1.5")
70
- androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
71
- }
@@ -1,53 +0,0 @@
1
- # For more information about using CMake with Android Studio, read the
2
- # documentation: https://d.android.com/studio/projects/add-native-code.html.
3
- # For more examples on how to use CMake, see https://github.com/android/ndk-samples.
4
-
5
- # Sets the minimum CMake version required for this project.
6
- cmake_minimum_required(VERSION 3.22.1)
7
-
8
- # Declares the project name. The project name can be accessed via ${ PROJECT_NAME},
9
- # Since this is the top level CMakeLists.txt, the project name is also accessible
10
- # with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level
11
- # build script scope).
12
- project("llama-android")
13
-
14
- #include(FetchContent)
15
- #FetchContent_Declare(
16
- # llama
17
- # GIT_REPOSITORY https://github.com/ggml-org/llama.cpp
18
- # GIT_TAG master
19
- #)
20
-
21
- # Also provides "common"
22
- #FetchContent_MakeAvailable(llama)
23
-
24
- # Creates and names a library, sets it as either STATIC
25
- # or SHARED, and provides the relative paths to its source code.
26
- # You can define multiple libraries, and CMake builds them for you.
27
- # Gradle automatically packages shared libraries with your APK.
28
- #
29
- # In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define
30
- # the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME}
31
- # is preferred for the same purpose.
32
- #
33
-
34
- #load local llama.cpp
35
- add_subdirectory(../../../../../../ build-llama)
36
-
37
- # In order to load a library into your app from Java/Kotlin, you must call
38
- # System.loadLibrary() and pass the name of the library defined here;
39
- # for GameActivity/NativeActivity derived applications, the same library name must be
40
- # used in the AndroidManifest.xml file.
41
- add_library(${CMAKE_PROJECT_NAME} SHARED
42
- # List C/C++ source files with relative paths to this CMakeLists.txt.
43
- llama-android.cpp)
44
-
45
- # Specifies libraries CMake should link to your target library. You
46
- # can link libraries from various origins, such as libraries defined in this
47
- # build script, prebuilt third-party libraries, or Android system libraries.
48
- target_link_libraries(${CMAKE_PROJECT_NAME}
49
- # List libraries link to the target library
50
- llama
51
- common
52
- android
53
- log)