@fugood/llama.node 0.0.1-alpha.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.
- package/CMakeLists.txt +85 -0
- package/README.md +56 -0
- package/bin/darwin/arm64/llama-node.node +0 -0
- package/bin/darwin/x64/llama-node.node +0 -0
- package/bin/linux/arm64/llama-node.node +0 -0
- package/bin/linux/x64/llama-node.node +0 -0
- package/bin/win32/arm64/llama-node.node +0 -0
- package/bin/win32/arm64/node.lib +0 -0
- package/bin/win32/x64/llama-node.node +0 -0
- package/bin/win32/x64/node.lib +0 -0
- package/lib/binding.js +13 -0
- package/lib/binding.ts +57 -0
- package/lib/index.js +24 -0
- package/lib/index.ts +13 -0
- package/package.json +65 -0
- package/src/addons.cpp +506 -0
- package/src/llama.cpp/CMakeLists.txt +1320 -0
- package/src/llama.cpp/build.zig +172 -0
- package/src/llama.cpp/cmake/FindSIMD.cmake +100 -0
- package/src/llama.cpp/common/CMakeLists.txt +87 -0
- package/src/llama.cpp/common/base64.hpp +392 -0
- package/src/llama.cpp/common/common.cpp +2949 -0
- package/src/llama.cpp/common/common.h +324 -0
- package/src/llama.cpp/common/console.cpp +501 -0
- package/src/llama.cpp/common/console.h +19 -0
- package/src/llama.cpp/common/grammar-parser.cpp +440 -0
- package/src/llama.cpp/common/grammar-parser.h +29 -0
- package/src/llama.cpp/common/json-schema-to-grammar.cpp +764 -0
- package/src/llama.cpp/common/json-schema-to-grammar.h +4 -0
- package/src/llama.cpp/common/json.hpp +24766 -0
- package/src/llama.cpp/common/log.h +724 -0
- package/src/llama.cpp/common/ngram-cache.cpp +282 -0
- package/src/llama.cpp/common/ngram-cache.h +94 -0
- package/src/llama.cpp/common/sampling.cpp +353 -0
- package/src/llama.cpp/common/sampling.h +147 -0
- package/src/llama.cpp/common/stb_image.h +8396 -0
- package/src/llama.cpp/common/train.cpp +1513 -0
- package/src/llama.cpp/common/train.h +233 -0
- package/src/llama.cpp/examples/CMakeLists.txt +52 -0
- package/src/llama.cpp/examples/baby-llama/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/baby-llama/baby-llama.cpp +1640 -0
- package/src/llama.cpp/examples/batched/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/batched/batched.cpp +262 -0
- package/src/llama.cpp/examples/batched-bench/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/batched-bench/batched-bench.cpp +261 -0
- package/src/llama.cpp/examples/beam-search/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/beam-search/beam-search.cpp +188 -0
- package/src/llama.cpp/examples/benchmark/CMakeLists.txt +6 -0
- package/src/llama.cpp/examples/benchmark/benchmark-matmult.cpp +275 -0
- package/src/llama.cpp/examples/convert-llama2c-to-ggml/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp +936 -0
- package/src/llama.cpp/examples/embedding/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/embedding/embedding.cpp +211 -0
- package/src/llama.cpp/examples/eval-callback/CMakeLists.txt +9 -0
- package/src/llama.cpp/examples/eval-callback/eval-callback.cpp +195 -0
- package/src/llama.cpp/examples/export-lora/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/export-lora/export-lora.cpp +462 -0
- package/src/llama.cpp/examples/finetune/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/finetune/finetune.cpp +1861 -0
- package/src/llama.cpp/examples/gbnf-validator/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/gbnf-validator/gbnf-validator.cpp +132 -0
- package/src/llama.cpp/examples/gguf/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/gguf/gguf.cpp +256 -0
- package/src/llama.cpp/examples/gguf-split/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/gguf-split/gguf-split.cpp +553 -0
- package/src/llama.cpp/examples/gritlm/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/gritlm/gritlm.cpp +215 -0
- package/src/llama.cpp/examples/imatrix/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/imatrix/imatrix.cpp +655 -0
- package/src/llama.cpp/examples/infill/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/infill/infill.cpp +767 -0
- package/src/llama.cpp/examples/jeopardy/questions.txt +100 -0
- package/src/llama.cpp/examples/llama-bench/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/llama-bench/llama-bench.cpp +1286 -0
- package/src/llama.cpp/examples/llama.android/app/src/main/cpp/CMakeLists.txt +50 -0
- package/src/llama.cpp/examples/llama.android/app/src/main/cpp/llama-android.cpp +443 -0
- package/src/llama.cpp/examples/llava/CMakeLists.txt +37 -0
- package/src/llama.cpp/examples/llava/clip.cpp +2027 -0
- package/src/llama.cpp/examples/llava/clip.h +85 -0
- package/src/llama.cpp/examples/llava/llava-cli.cpp +309 -0
- package/src/llama.cpp/examples/llava/llava.cpp +426 -0
- package/src/llama.cpp/examples/llava/llava.h +50 -0
- package/src/llama.cpp/examples/llava/requirements.txt +3 -0
- package/src/llama.cpp/examples/lookahead/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/lookahead/lookahead.cpp +485 -0
- package/src/llama.cpp/examples/lookup/CMakeLists.txt +23 -0
- package/src/llama.cpp/examples/lookup/lookup-create.cpp +41 -0
- package/src/llama.cpp/examples/lookup/lookup-merge.cpp +47 -0
- package/src/llama.cpp/examples/lookup/lookup-stats.cpp +160 -0
- package/src/llama.cpp/examples/lookup/lookup.cpp +258 -0
- package/src/llama.cpp/examples/main/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/main/main.cpp +957 -0
- package/src/llama.cpp/examples/main-cmake-pkg/CMakeLists.txt +33 -0
- package/src/llama.cpp/examples/parallel/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/parallel/parallel.cpp +427 -0
- package/src/llama.cpp/examples/passkey/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/passkey/passkey.cpp +302 -0
- package/src/llama.cpp/examples/perplexity/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/perplexity/perplexity.cpp +1943 -0
- package/src/llama.cpp/examples/quantize/CMakeLists.txt +6 -0
- package/src/llama.cpp/examples/quantize/quantize.cpp +423 -0
- package/src/llama.cpp/examples/quantize-stats/CMakeLists.txt +6 -0
- package/src/llama.cpp/examples/quantize-stats/quantize-stats.cpp +424 -0
- package/src/llama.cpp/examples/retrieval/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/retrieval/retrieval.cpp +350 -0
- package/src/llama.cpp/examples/save-load-state/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/save-load-state/save-load-state.cpp +246 -0
- package/src/llama.cpp/examples/server/CMakeLists.txt +40 -0
- package/src/llama.cpp/examples/server/bench/requirements.txt +2 -0
- package/src/llama.cpp/examples/server/httplib.h +9465 -0
- package/src/llama.cpp/examples/server/server.cpp +3826 -0
- package/src/llama.cpp/examples/server/tests/requirements.txt +6 -0
- package/src/llama.cpp/examples/server/utils.hpp +653 -0
- package/src/llama.cpp/examples/simple/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/simple/simple.cpp +183 -0
- package/src/llama.cpp/examples/speculative/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/speculative/speculative.cpp +614 -0
- package/src/llama.cpp/examples/sycl/CMakeLists.txt +9 -0
- package/src/llama.cpp/examples/sycl/ls-sycl-device.cpp +13 -0
- package/src/llama.cpp/examples/tokenize/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/tokenize/tokenize.cpp +42 -0
- package/src/llama.cpp/examples/train-text-from-scratch/CMakeLists.txt +5 -0
- package/src/llama.cpp/examples/train-text-from-scratch/train-text-from-scratch.cpp +1252 -0
- package/src/llama.cpp/ggml-alloc.c +985 -0
- package/src/llama.cpp/ggml-alloc.h +76 -0
- package/src/llama.cpp/ggml-backend-impl.h +141 -0
- package/src/llama.cpp/ggml-backend.c +2099 -0
- package/src/llama.cpp/ggml-backend.h +233 -0
- package/src/llama.cpp/ggml-common.h +1853 -0
- package/src/llama.cpp/ggml-cuda.h +43 -0
- package/src/llama.cpp/ggml-impl.h +265 -0
- package/src/llama.cpp/ggml-kompute.cpp +2006 -0
- package/src/llama.cpp/ggml-kompute.h +46 -0
- package/src/llama.cpp/ggml-metal.h +66 -0
- package/src/llama.cpp/ggml-mpi.c +216 -0
- package/src/llama.cpp/ggml-mpi.h +39 -0
- package/src/llama.cpp/ggml-opencl.cpp +2301 -0
- package/src/llama.cpp/ggml-opencl.h +36 -0
- package/src/llama.cpp/ggml-quants.c +12678 -0
- package/src/llama.cpp/ggml-quants.h +133 -0
- package/src/llama.cpp/ggml-sycl.cpp +17882 -0
- package/src/llama.cpp/ggml-sycl.h +49 -0
- package/src/llama.cpp/ggml-vulkan-shaders.hpp +69849 -0
- package/src/llama.cpp/ggml-vulkan.cpp +6442 -0
- package/src/llama.cpp/ggml-vulkan.h +29 -0
- package/src/llama.cpp/ggml.c +21819 -0
- package/src/llama.cpp/ggml.h +2403 -0
- package/src/llama.cpp/llama.cpp +17468 -0
- package/src/llama.cpp/llama.h +1117 -0
- package/src/llama.cpp/pocs/CMakeLists.txt +12 -0
- package/src/llama.cpp/pocs/vdot/CMakeLists.txt +9 -0
- package/src/llama.cpp/pocs/vdot/q8dot.cpp +172 -0
- package/src/llama.cpp/pocs/vdot/vdot.cpp +310 -0
- package/src/llama.cpp/prompts/LLM-questions.txt +49 -0
- package/src/llama.cpp/prompts/alpaca.txt +1 -0
- package/src/llama.cpp/prompts/assistant.txt +31 -0
- package/src/llama.cpp/prompts/chat-with-baichuan.txt +4 -0
- package/src/llama.cpp/prompts/chat-with-bob.txt +7 -0
- package/src/llama.cpp/prompts/chat-with-qwen.txt +1 -0
- package/src/llama.cpp/prompts/chat-with-vicuna-v0.txt +7 -0
- package/src/llama.cpp/prompts/chat-with-vicuna-v1.txt +7 -0
- package/src/llama.cpp/prompts/chat.txt +28 -0
- package/src/llama.cpp/prompts/dan-modified.txt +1 -0
- package/src/llama.cpp/prompts/dan.txt +1 -0
- package/src/llama.cpp/prompts/mnemonics.txt +93 -0
- package/src/llama.cpp/prompts/parallel-questions.txt +43 -0
- package/src/llama.cpp/prompts/reason-act.txt +18 -0
- package/src/llama.cpp/requirements/requirements-convert-hf-to-gguf.txt +3 -0
- package/src/llama.cpp/requirements/requirements-convert-llama-ggml-to-gguf.txt +1 -0
- package/src/llama.cpp/requirements/requirements-convert-lora-to-ggml.txt +2 -0
- package/src/llama.cpp/requirements/requirements-convert-persimmon-to-gguf.txt +2 -0
- package/src/llama.cpp/requirements/requirements-convert.txt +5 -0
- package/src/llama.cpp/requirements.txt +12 -0
- package/src/llama.cpp/scripts/gen-build-info-cpp.cmake +24 -0
- package/src/llama.cpp/scripts/xxd.cmake +16 -0
- package/src/llama.cpp/sgemm.cpp +999 -0
- package/src/llama.cpp/sgemm.h +12 -0
- package/src/llama.cpp/tests/CMakeLists.txt +78 -0
- package/src/llama.cpp/tests/get-model.cpp +21 -0
- package/src/llama.cpp/tests/get-model.h +2 -0
- package/src/llama.cpp/tests/test-autorelease.cpp +24 -0
- package/src/llama.cpp/tests/test-backend-ops.cpp +2266 -0
- package/src/llama.cpp/tests/test-c.c +7 -0
- package/src/llama.cpp/tests/test-chat-template.cpp +107 -0
- package/src/llama.cpp/tests/test-double-float.cpp +57 -0
- package/src/llama.cpp/tests/test-grad0.cpp +1606 -0
- package/src/llama.cpp/tests/test-grammar-integration.cpp +243 -0
- package/src/llama.cpp/tests/test-grammar-parser.cpp +250 -0
- package/src/llama.cpp/tests/test-json-schema-to-grammar.cpp +899 -0
- package/src/llama.cpp/tests/test-llama-grammar.cpp +402 -0
- package/src/llama.cpp/tests/test-model-load-cancel.cpp +27 -0
- package/src/llama.cpp/tests/test-opt.cpp +181 -0
- package/src/llama.cpp/tests/test-quantize-fns.cpp +185 -0
- package/src/llama.cpp/tests/test-quantize-perf.cpp +363 -0
- package/src/llama.cpp/tests/test-rope.cpp +221 -0
- package/src/llama.cpp/tests/test-sampling.cpp +301 -0
- package/src/llama.cpp/tests/test-tokenizer-0-falcon.cpp +187 -0
- package/src/llama.cpp/tests/test-tokenizer-0-llama.cpp +190 -0
- package/src/llama.cpp/tests/test-tokenizer-1-bpe.cpp +123 -0
- package/src/llama.cpp/tests/test-tokenizer-1-llama.cpp +111 -0
- package/src/llama.cpp/unicode-data.cpp +1651 -0
- package/src/llama.cpp/unicode-data.h +16 -0
- package/src/llama.cpp/unicode.cpp +277 -0
- package/src/llama.cpp/unicode.h +28 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
For each kanji character, write a Markdown‐formatted mnemonic that uses its keyword and the keyword of all its components.
|
|
2
|
+
|
|
3
|
+
Kanji: 欠 (lack of)
|
|
4
|
+
Components: 𠂊 (hook claw), 人 (person)
|
|
5
|
+
Mnemonic: This **person** is a pirate. He lost his hand to a crocodile many years ago. Nowadays, the ***lack of*** a hand does not bother him too much. In fact, the **hook claw** that replaces it is the mark of a true pirate, so he is quite proud of it!
|
|
6
|
+
|
|
7
|
+
Kanji: 類 (kind (of something))
|
|
8
|
+
Components: 米 (rice), 大 (large), 頁 (page)
|
|
9
|
+
Mnemonic: The waiter at a Chinese restaurant hands you a **large** menu. Each **page** has all ***kinds*** of **rice** on offer!
|
|
10
|
+
|
|
11
|
+
Kanji: 燃 (burn)
|
|
12
|
+
Components: 火 (fire), 然 (sort of thing)
|
|
13
|
+
Mnemonic: ***Burning*** things up with **fire** is just my **sort of thing**. (Spoken like a true pyromaniac.)
|
|
14
|
+
|
|
15
|
+
Kanji: 頂 (top of)
|
|
16
|
+
Components: 丁 (street), 頁 (page)
|
|
17
|
+
Mnemonic: To be at the ***top of*** your game, you need both practical knowledge (**street** smarts) and theoretical knowledge (having read many **pages**).
|
|
18
|
+
|
|
19
|
+
Kanji: 険 (risky and steep)
|
|
20
|
+
Components: 阝 (small village), 㑒 (consensus)
|
|
21
|
+
Mnemonic: Everyone agrees (there is **consensus**) that the path to the **small village** is ***risky and steep***.
|
|
22
|
+
|
|
23
|
+
Kanji: 困 (distressed)
|
|
24
|
+
Components: 囗 (closed box), 木 (tree)
|
|
25
|
+
Mnemonic: You would feel ***distressed*** too if you were a **tree** trapped in a **closed box**! I have no place to grow!
|
|
26
|
+
|
|
27
|
+
Kanji: 頭 (head)
|
|
28
|
+
Components: 豆 (bean), 頁 (page)
|
|
29
|
+
Mnemonic: What do you have in that ***head*** of yours? A **bean** for a brain? Go read more **pages** and become more knowledgeable about the world!
|
|
30
|
+
|
|
31
|
+
Kanji: 確 (certain)
|
|
32
|
+
Components: 石 (stone), 冖 (roof without a chimney), 隹 (old bird)
|
|
33
|
+
Mnemonic: An **old bird** has made a nest on your **roof**. What do you do? You call Misaka from a <cite>A ***Certain*** Scientific Railgun</cite> to get rid of it, of course! But she doesn’t really want to vaporize the poor thing, so she just throws a **stone** to scare it away. (What was the point of calling her, then‽)
|
|
34
|
+
|
|
35
|
+
Kanji: 魚 (fish)
|
|
36
|
+
Components: 𠂊 (hook claw), 田 (rice field), 灬 (fire sparks)
|
|
37
|
+
Mnemonic: Catch ***fish*** with a **hook**, collect rice from the **rice field**, cook them with **fire**… And my meal is ready!
|
|
38
|
+
|
|
39
|
+
Kanji: 警 (to police (something))
|
|
40
|
+
Components: 敬 (respect), 言 (say)
|
|
41
|
+
Mnemonic: ***To police something*** is to make people **respect** what the law **says**.
|
|
42
|
+
|
|
43
|
+
Kanji: 筆 (writing brush)
|
|
44
|
+
Components: 竹 (bamboo), 聿 (brush)
|
|
45
|
+
Mnemonic: A traditional ***writing brush*** is a **brush** made of **bamboo**.
|
|
46
|
+
|
|
47
|
+
Kanji: 獄 (prison)
|
|
48
|
+
Components: 犭 (animal), 言 (say), 犬 (dog)
|
|
49
|
+
Mnemonic: In ***prison***, like in the **animal** kingdom, only the toughest survive. You have to watch what you **say**. It’s a **dog**‐eat‐dog world.
|
|
50
|
+
|
|
51
|
+
Kanji: 新 (new)
|
|
52
|
+
Components: 立 (standing up), 木 (tree), 斤 (axe)
|
|
53
|
+
Mnemonic: In order for a ***new*** construction to be made, an empty lot is needed. If there are any **trees** **standing up**, they must be cut down with an **axe**.
|
|
54
|
+
|
|
55
|
+
Kanji: 怪 (suspicious)
|
|
56
|
+
Components: 忄 (weak heart), 圣 (sacred)
|
|
57
|
+
Mnemonic: That painting of the **Sacred** **Heart** of Jesus looks ***suspicious***. I think it might be a forgery.
|
|
58
|
+
|
|
59
|
+
Kanji: 温 (warm (to the touch))
|
|
60
|
+
Components: 氵 (water drops), 日 (sun), 皿 (dish)
|
|
61
|
+
Mnemonic: If you leave **water** on a **dish** in the **sun**, it will get ***warm***.
|
|
62
|
+
|
|
63
|
+
Kanji: 階 (floor (of a building))
|
|
64
|
+
Components: 阝 (small village), 皆 (all)
|
|
65
|
+
Mnemonic: It might be a **small village**, but, despite that, **all** of its buildings have many ***floors***. It’s a village of skyscrapers!
|
|
66
|
+
|
|
67
|
+
Kanji: 多 (many)
|
|
68
|
+
Components: 夕 (evening (before sunset)), 夕 (evening (before sunset))
|
|
69
|
+
Mnemonic: Two **evenings** in a day would be one too ***many***.
|
|
70
|
+
|
|
71
|
+
Kanji: 別 (separate)
|
|
72
|
+
Components: 口 (mouth), 万 (ten thousand), 刂 (knife)
|
|
73
|
+
Mnemonic: Tom Six is at it again. For his next flick, he wants to stitch together **ten thousand** people, **mouth**‐to‐anus. One of the most graphic and disturbing scenes will feature one of the victims using a **knife** to ***separate*** perself.
|
|
74
|
+
|
|
75
|
+
Kanji: 並 (line up)
|
|
76
|
+
Components: 䒑 (antlers on a wall), 业 (runway)
|
|
77
|
+
Mnemonic: In order to land a plane you have to ***line up*** properly with the **runway**. The things that look like **antlers** at the end of the runway are the control towers; you should follow their instructions.
|
|
78
|
+
|
|
79
|
+
Kanji: 姿 (figure)
|
|
80
|
+
Components: 次 (next), 女 (woman)
|
|
81
|
+
Mnemonic: The **next** **woman** that I date will have a perfect **figure**. Because I’m done with 3D women—it will *literally* be an anime figure!
|
|
82
|
+
|
|
83
|
+
Kanji: 実 (real)
|
|
84
|
+
Components: 宀 (roof with a chimney), 𡗗 (three people)
|
|
85
|
+
Mnemonic: Living under a **roof with a chimney** with **three people** (a wife and two children)—a happy family life—is not something I could have ever imagined. It does not feel ***real***.
|
|
86
|
+
|
|
87
|
+
Kanji: 謝 (apologize)
|
|
88
|
+
Components: 言 (say), 射 (shoot)
|
|
89
|
+
Mnemonic: **Shot** first, ***apologize*** (**say** you are sorry) later.
|
|
90
|
+
|
|
91
|
+
Kanji: 提 (propose)
|
|
92
|
+
Components: 扌 (left hand), 是 (go with)
|
|
93
|
+
Mnemonic:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
What do you know about Hobbits?
|
|
2
|
+
What is quantum field theory?
|
|
3
|
+
Why did the chicken cross the road?
|
|
4
|
+
Who is the president of the United States?
|
|
5
|
+
How do I run CMake on MacOS?
|
|
6
|
+
Do you agree that C++ is a really finicky language compared with Python3?
|
|
7
|
+
Is it a good idea to invest in technology?
|
|
8
|
+
Do you like Wagner's Ring?
|
|
9
|
+
Do you think this file input option is really neat?
|
|
10
|
+
What should we all do about climate change?
|
|
11
|
+
Is time-travel possible within the laws of current physics?
|
|
12
|
+
Is it like anything to be a bat?
|
|
13
|
+
Once the chicken has crossed the road, does it try to go back?
|
|
14
|
+
Who is the greatest of all musical composers?
|
|
15
|
+
What is art?
|
|
16
|
+
Is there life elsewhere in the universe?
|
|
17
|
+
What is intelligence?
|
|
18
|
+
What is the difference between knowledge and intelligence?
|
|
19
|
+
Will religion ever die?
|
|
20
|
+
Do we understand ourselves?
|
|
21
|
+
What is the best way to cook eggs?
|
|
22
|
+
If you cannot see things, on what basis do you evaluate them?
|
|
23
|
+
Explain the role of the np junction in photovoltaic cells?
|
|
24
|
+
Is professional sport a good or bad influence on human behaviour?
|
|
25
|
+
Is capital punishment immoral?
|
|
26
|
+
Should we care about other people?
|
|
27
|
+
Who are you?
|
|
28
|
+
Which sense would you surrender if you could?
|
|
29
|
+
Was Henry Ford a hero or a villain?
|
|
30
|
+
Do we need leaders?
|
|
31
|
+
What is nucleosynthesis?
|
|
32
|
+
Who is the greatest scientist of all time?
|
|
33
|
+
Who first observed what came to be known as the photovoltaic effect?
|
|
34
|
+
What is nuclear fusion and why does it release energy?
|
|
35
|
+
Can you know that you exist?
|
|
36
|
+
What is an exoplanet?
|
|
37
|
+
Do you like cream?
|
|
38
|
+
What is the difference?
|
|
39
|
+
Can I know that I exist while I'm dreaming that I'm Descartes?
|
|
40
|
+
Who said "I didn't know I thought that until I heard myself saying it"?
|
|
41
|
+
Does anything really matter?
|
|
42
|
+
Can you explain the unreasonable effectiveness of mathematics?
|
|
43
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
You run in a loop of Thought, Action, Observation.
|
|
2
|
+
At the end of the loop either Answer or restate your Thought and Action.
|
|
3
|
+
Use Thought to describe your thoughts about the question you have been asked.
|
|
4
|
+
Use Action to run one of these actions available to you:
|
|
5
|
+
- calculate[python math expression]
|
|
6
|
+
Observation will be the result of running those actions
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Question: What is 4 * 7 / 3?
|
|
10
|
+
Thought: Do I need to use an action? Yes, I use calculate to do math
|
|
11
|
+
Action: calculate[4 * 7 / 3]
|
|
12
|
+
Observation: 9.3333333333
|
|
13
|
+
Thought: Do I need to use an action? No, have the result
|
|
14
|
+
Answer: The calculate tool says it is 9.3333333333
|
|
15
|
+
Question: What is capital of france?
|
|
16
|
+
Thought: Do I need to use an action? No, I know the answer
|
|
17
|
+
Answer: Paris is the capital of France
|
|
18
|
+
Question:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-r ./requirements-convert.txt
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These requirements include all dependencies for all top-level python scripts
|
|
2
|
+
# for llama.cpp. Avoid adding packages here directly.
|
|
3
|
+
#
|
|
4
|
+
# Package versions must stay compatible across all top-level python scripts.
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
-r ./requirements/requirements-convert.txt
|
|
8
|
+
|
|
9
|
+
-r ./requirements/requirements-convert-hf-to-gguf.txt
|
|
10
|
+
-r ./requirements/requirements-convert-llama-ggml-to-gguf.txt
|
|
11
|
+
-r ./requirements/requirements-convert-lora-to-ggml.txt
|
|
12
|
+
-r ./requirements/requirements-convert-persimmon-to-gguf.txt
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
include(${CMAKE_CURRENT_SOURCE_DIR}/scripts/build-info.cmake)
|
|
2
|
+
|
|
3
|
+
set(TEMPLATE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/common/build-info.cpp.in")
|
|
4
|
+
set(OUTPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/common/build-info.cpp")
|
|
5
|
+
|
|
6
|
+
# Only write the build info if it changed
|
|
7
|
+
if(EXISTS ${OUTPUT_FILE})
|
|
8
|
+
file(READ ${OUTPUT_FILE} CONTENTS)
|
|
9
|
+
string(REGEX MATCH "LLAMA_COMMIT = \"([^\"]*)\";" _ ${CONTENTS})
|
|
10
|
+
set(OLD_COMMIT ${CMAKE_MATCH_1})
|
|
11
|
+
string(REGEX MATCH "LLAMA_COMPILER = \"([^\"]*)\";" _ ${CONTENTS})
|
|
12
|
+
set(OLD_COMPILER ${CMAKE_MATCH_1})
|
|
13
|
+
string(REGEX MATCH "LLAMA_BUILD_TARGET = \"([^\"]*)\";" _ ${CONTENTS})
|
|
14
|
+
set(OLD_TARGET ${CMAKE_MATCH_1})
|
|
15
|
+
if (
|
|
16
|
+
NOT OLD_COMMIT STREQUAL BUILD_COMMIT OR
|
|
17
|
+
NOT OLD_COMPILER STREQUAL BUILD_COMPILER OR
|
|
18
|
+
NOT OLD_TARGET STREQUAL BUILD_TARGET
|
|
19
|
+
)
|
|
20
|
+
configure_file(${TEMPLATE_FILE} ${OUTPUT_FILE})
|
|
21
|
+
endif()
|
|
22
|
+
else()
|
|
23
|
+
configure_file(${TEMPLATE_FILE} ${OUTPUT_FILE})
|
|
24
|
+
endif()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CMake equivalent of `xxd -i ${INPUT} ${OUTPUT}`
|
|
2
|
+
# Usage: cmake -DINPUT=examples/server/public/index.html -DOUTPUT=examples/server/index.html.hpp -P scripts/xxd.cmake
|
|
3
|
+
|
|
4
|
+
SET(INPUT "" CACHE STRING "Input File")
|
|
5
|
+
SET(OUTPUT "" CACHE STRING "Output File")
|
|
6
|
+
|
|
7
|
+
get_filename_component(filename "${INPUT}" NAME)
|
|
8
|
+
string(REGEX REPLACE "\\.|-" "_" name "${filename}")
|
|
9
|
+
|
|
10
|
+
file(READ "${INPUT}" hex_data HEX)
|
|
11
|
+
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," hex_sequence "${hex_data}")
|
|
12
|
+
|
|
13
|
+
string(LENGTH ${hex_data} hex_len)
|
|
14
|
+
math(EXPR len "${hex_len} / 2")
|
|
15
|
+
|
|
16
|
+
file(WRITE "${OUTPUT}" "unsigned char ${name}[] = {${hex_sequence}};\nunsigned int ${name}_len = ${len};\n")
|