llama_cpp 0.20.2 → 0.20.3
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 +7 -0
- data/ext/llama_cpp/llama_cpp.c +5 -5
- data/lib/llama_cpp/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23b27d58fb2f7b948a0862df53c9c523981ebde95a1193bfb9b575c5717daa37
|
4
|
+
data.tar.gz: fc3c5a7d01d96a55cd36f55f730742517f101f3593e2d0d4249b30f8a08c6053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cb14dc2cf2d82d15256efa76bc1c89021f152845ecfdea3e3a2aaa4ca01e497c8c2621fa3263415ab988225e9c5e7f87b1658ef6800db66c499b2b73b228162
|
7
|
+
data.tar.gz: 8597474f6f983b0514c6d9644d7d6d68775b39533b4c0488960acbecbfc4d0ef6d98f205dc331623c7bf1e6b4e5083fec3d2f879d4b6c2fbc154fb10f9b0ecd1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [[0.20.3](https://github.com/yoshoku/llama_cpp.rb/compare/v0.20.2...v0.20.3)] - 2025-06-14
|
2
|
+
|
3
|
+
- Change supported llama.cpp version to b5650
|
4
|
+
- Add `data` argument to `llama_memory_clear` module function.
|
5
|
+
- Fix llama_memory_t wrapper by removing unnecessary struct keyword and pointer symbol.
|
6
|
+
|
7
|
+
|
1
8
|
## [[0.20.2](https://github.com/yoshoku/llama_cpp.rb/compare/v0.20.1...v0.20.2)] - 2025-06-07
|
2
9
|
|
3
10
|
- Change supported llama.cpp version to b5600
|
data/ext/llama_cpp/llama_cpp.c
CHANGED
@@ -1905,14 +1905,14 @@ static VALUE rb_llama_adapter_lora_free(VALUE self, VALUE adapter) {
|
|
1905
1905
|
|
1906
1906
|
/* llama_memory_t wrapper */
|
1907
1907
|
typedef struct {
|
1908
|
-
|
1908
|
+
llama_memory_t memory;
|
1909
1909
|
} llama_memory_t_wrapper;
|
1910
1910
|
|
1911
1911
|
static void llama_memory_t_wrapper_free(void *ptr) {
|
1912
1912
|
llama_memory_t_wrapper* memory_wrapper = (llama_memory_t_wrapper*)ptr;
|
1913
1913
|
if (memory_wrapper) {
|
1914
1914
|
if (memory_wrapper->memory != NULL) {
|
1915
|
-
llama_memory_clear(memory_wrapper->memory);
|
1915
|
+
llama_memory_clear(memory_wrapper->memory, true);
|
1916
1916
|
memory_wrapper->memory = NULL;
|
1917
1917
|
}
|
1918
1918
|
}
|
@@ -1947,13 +1947,13 @@ static llama_memory_t_wrapper* get_llama_memory_t_wrapper(VALUE self) {
|
|
1947
1947
|
return data;
|
1948
1948
|
}
|
1949
1949
|
|
1950
|
-
static VALUE rb_llama_memory_clear(VALUE self, VALUE memory) {
|
1950
|
+
static VALUE rb_llama_memory_clear(VALUE self, VALUE memory, VALUE data) {
|
1951
1951
|
if (!rb_obj_is_kind_of(memory, rb_cLlamaMemoryT)) {
|
1952
1952
|
rb_raise(rb_eArgError, "memory must be a LlamaMemoryT");
|
1953
1953
|
return Qnil;
|
1954
1954
|
}
|
1955
1955
|
llama_memory_t_wrapper* memory_wrapper = get_llama_memory_t_wrapper(memory);
|
1956
|
-
llama_memory_clear(memory_wrapper->memory);
|
1956
|
+
llama_memory_clear(memory_wrapper->memory, RTEST(data) ? true : false);
|
1957
1957
|
RB_GC_GUARD(memory);
|
1958
1958
|
return Qnil;
|
1959
1959
|
}
|
@@ -5110,7 +5110,7 @@ void Init_llama_cpp(void) {
|
|
5110
5110
|
rb_define_alloc_func(rb_cLlamaMemoryT, llama_memory_t_wrapper_alloc);
|
5111
5111
|
|
5112
5112
|
/* llama_memory_clear */
|
5113
|
-
rb_define_module_function(rb_mLlamaCpp, "llama_memory_clear", rb_llama_memory_clear,
|
5113
|
+
rb_define_module_function(rb_mLlamaCpp, "llama_memory_clear", rb_llama_memory_clear, 2);
|
5114
5114
|
|
5115
5115
|
/* llama_memory_seq_rm */
|
5116
5116
|
rb_define_module_function(rb_mLlamaCpp, "llama_memory_seq_rm", rb_llama_memory_seq_rm, 4);
|
data/lib/llama_cpp/version.rb
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
# llama_cpp.rb provides Ruby bindings for the llama.cpp.
|
4
4
|
module LlamaCpp
|
5
5
|
# The version of llama_cpp.rb you install.
|
6
|
-
VERSION = '0.20.
|
6
|
+
VERSION = '0.20.3'
|
7
7
|
|
8
8
|
# The supported version of llama.cpp.
|
9
|
-
LLAMA_CPP_VERSION = '
|
9
|
+
LLAMA_CPP_VERSION = 'b5650'
|
10
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: llama_cpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '0'
|
51
51
|
requirements: []
|
52
|
-
rubygems_version: 3.6.
|
52
|
+
rubygems_version: 3.6.9
|
53
53
|
specification_version: 4
|
54
54
|
summary: Ruby bindings for the llama.cpp.
|
55
55
|
test_files: []
|