llama_cpp 0.0.6 → 0.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/ext/llama_cpp/extconf.rb +9 -0
- data/ext/llama_cpp/llama_cpp.cpp +762 -36
- data/ext/llama_cpp/src/ggml-cuda.h +11 -4
- data/ext/llama_cpp/src/ggml-opencl.c +398 -0
- data/ext/llama_cpp/src/ggml-opencl.h +24 -0
- data/ext/llama_cpp/src/ggml.c +1957 -909
- data/ext/llama_cpp/src/ggml.h +696 -627
- data/ext/llama_cpp/src/{llama_util.h → llama-util.h} +91 -12
- data/ext/llama_cpp/src/llama.cpp +755 -159
- data/ext/llama_cpp/src/llama.h +85 -34
- data/lib/llama_cpp/client.rb +174 -0
- data/lib/llama_cpp/version.rb +2 -2
- data/lib/llama_cpp.rb +43 -11
- data/sig/llama_cpp.rbs +53 -3
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4058abcb7afa897554fc75bb368caeea0e77429e01fb5f3a1949191c50f4de5
|
4
|
+
data.tar.gz: 9929e94c02b5d9c21379a9275f08668e835f91d3d7be3570a2da9ab4ecbe6ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab267defd1769e7bf4599da199f50a7c5cc2355d2281ab7fd2ccd1a5ef196b716350cf8df9522a9185d02c8c3ad6a5d0f46f271fad0951440ab9b3fab4019932
|
7
|
+
data.tar.gz: 16727a2ac2c68f7913749b656c26523e9eee0118b69ff06bbc0935f899eac1874f16395d9e72ed2caa853e9c61fb9f614ad5913fca623e356aa249308b2f3dda
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,28 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [[0.1.0](https://github.com/yoshoku/llama_cpp.rb/compare/v0.0.7...v0.1.0)] - 2023-05-20
|
4
|
+
|
5
|
+
**Breaking Changes**
|
6
|
+
|
7
|
+
- Bump bundled llama.cpp from master-11d9023 to master-173d0e6.
|
8
|
+
- Support new API.
|
9
|
+
|
10
|
+
## [[0.0.7](https://github.com/yoshoku/llama_cpp.rb/compare/v0.0.6...v0.0.7)] - 2023-04-29
|
11
|
+
|
12
|
+
- Bump bundled llama.cpp from master-12b5900 to master-11d9023.
|
13
|
+
- Add Client class.
|
14
|
+
- Add model file type constants.
|
15
|
+
- Add getter and setter methods of use_mmap to ContextParams.
|
16
|
+
- Add empty? method to Context.
|
17
|
+
- Add clblast config option:
|
18
|
+
```
|
19
|
+
$ gem install llama_cpp -- --with-clblast
|
20
|
+
```
|
21
|
+
|
3
22
|
## [[0.0.6](https://github.com/yoshoku/llama_cpp.rb/compare/v0.0.5...v0.0.6)] - 2023-04-22
|
4
23
|
|
5
24
|
- Bump bundled llama.cpp from master-315a95a to master-12b5900.
|
6
|
-
- Add model file type constants
|
25
|
+
- Add model file type constants.
|
7
26
|
- Add `model_quantize` module function to LLaMACpp.
|
8
27
|
- Add cublas config option:
|
9
28
|
```
|
data/ext/llama_cpp/extconf.rb
CHANGED
@@ -5,6 +5,8 @@ require 'mkmf'
|
|
5
5
|
abort 'libstdc++ is not found.' unless have_library('stdc++')
|
6
6
|
|
7
7
|
$srcs = %w[ggml.c llama.cpp llama_cpp.cpp]
|
8
|
+
$srcs << 'ggml-opencl.c' if with_config('clblast')
|
9
|
+
|
8
10
|
$CFLAGS << ' -w'
|
9
11
|
$CXXFLAGS << ' -std=c++11'
|
10
12
|
$INCFLAGS << ' -I$(srcdir)/src'
|
@@ -34,6 +36,13 @@ if with_config('cublas')
|
|
34
36
|
$objs = %w[ggml-cuda.o ggml.o llama.o llama_cpp.o]
|
35
37
|
end
|
36
38
|
|
39
|
+
if with_config('clblast')
|
40
|
+
abort 'libclblast is not found.' unless have_library('clblast')
|
41
|
+
abort 'libOpenCL is not found.' unless have_library('OpenCL')
|
42
|
+
|
43
|
+
$CFLAGS << ' -DGGML_USE_CLBLAST'
|
44
|
+
end
|
45
|
+
|
37
46
|
UNAME_M = RbConfig::CONFIG['build_cpu'] || RbConfig::CONFIG['host_cpu'] || RbConfig::CONFIG['target_cpu']
|
38
47
|
|
39
48
|
# rubocop:disable Layout/LineLength
|