llama_cpp 0.23.10 → 0.23.11
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 +5 -0
- data/README.md +1 -1
- data/ext/llama_cpp/llama_cpp.c +27 -0
- 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: 5fc81dd7e098dace7f301394170fa517ec4d214bc41d76dbbf4b79c162ebff85
|
|
4
|
+
data.tar.gz: 8641cedea81065a2d7ced2e8db028bf8209de42312e5b3431749c19f605d5134
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cb0176fc18bb430ee7d00177a911ebe204f975ef7d2db88a79c696a1e4b3fde2ae74cc9fa34648294a552b4f026238b00572e35c9bb20b892c14e8108286557
|
|
7
|
+
data.tar.gz: f1431d0adb6348e78b62e96c96fa017dda979c282a5d5c61a164f287a6a85b3650bb83cf1206c40d0eb3387ddd9c6cab2325d6d2c12824e0ca5a7df4d9576602
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [[0.23.11](https://github.com/yoshoku/llama_cpp.rb/compare/v0.23.10...v0.23.11)] - 2026-01-24
|
|
2
|
+
|
|
3
|
+
- Change supported llama.cpp version to b7790.
|
|
4
|
+
- Add `llama_sampler_init_adaptive_p` module function to `LlamaCpp`.
|
|
5
|
+
|
|
1
6
|
## [[0.23.10](https://github.com/yoshoku/llama_cpp.rb/compare/v0.23.9...v0.23.10)] - 2026-01-10
|
|
2
7
|
|
|
3
8
|
- Change supported llama.cpp version to b7690.
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/llama_cpp)
|
|
4
4
|
[](https://github.com/yoshoku/llama_cpp.rb/blob/main/LICENSE.txt)
|
|
5
|
-
[](https://
|
|
5
|
+
[](https://gemdocs.org/gems/llama_cpp/)
|
|
6
6
|
|
|
7
7
|
llama_cpp.rb provides Ruby bindings for the [llama.cpp](https://github.com/ggerganov/llama.cpp).
|
|
8
8
|
|
data/ext/llama_cpp/llama_cpp.c
CHANGED
|
@@ -3714,6 +3714,30 @@ static VALUE rb_llama_sampler_init_penalties(VALUE self, VALUE penalty_last_n, V
|
|
|
3714
3714
|
return TypedData_Wrap_Struct(rb_cLlamaSampler, &llama_sampler_data_type, sampler);
|
|
3715
3715
|
}
|
|
3716
3716
|
|
|
3717
|
+
/**
|
|
3718
|
+
* @overload llama_sampler_init_adaptive_p(target, decay, seed)
|
|
3719
|
+
* @param [Float] target
|
|
3720
|
+
* @param [Float] decay
|
|
3721
|
+
* @param [Integer] seed
|
|
3722
|
+
* @return [LlamaSampler]
|
|
3723
|
+
*/
|
|
3724
|
+
static VALUE rb_llama_sampler_init_adaptive_p(VALUE self, VALUE target, VALUE decay, VALUE seed) {
|
|
3725
|
+
if (!RB_FLOAT_TYPE_P(target)) {
|
|
3726
|
+
rb_raise(rb_eArgError, "target must be a Float");
|
|
3727
|
+
return Qnil;
|
|
3728
|
+
}
|
|
3729
|
+
if (!RB_FLOAT_TYPE_P(decay)) {
|
|
3730
|
+
rb_raise(rb_eArgError, "decay must be a Float");
|
|
3731
|
+
return Qnil;
|
|
3732
|
+
}
|
|
3733
|
+
if (!RB_INTEGER_TYPE_P(seed)) {
|
|
3734
|
+
rb_raise(rb_eArgError, "seed must be an Integer");
|
|
3735
|
+
return Qnil;
|
|
3736
|
+
}
|
|
3737
|
+
struct llama_sampler* sampler = llama_sampler_init_adaptive_p(NUM2DBL(target), NUM2DBL(decay), NUM2UINT(seed));
|
|
3738
|
+
return TypedData_Wrap_Struct(rb_cLlamaSampler, &llama_sampler_data_type, sampler);
|
|
3739
|
+
}
|
|
3740
|
+
|
|
3717
3741
|
/**
|
|
3718
3742
|
* @overload llama_sampler_init_logit_bias(n_vocab, n_logit_bias, logit_bias)
|
|
3719
3743
|
* @param [Integer] n_vocab
|
|
@@ -5429,6 +5453,9 @@ void Init_llama_cpp(void) {
|
|
|
5429
5453
|
|
|
5430
5454
|
/* TODO: llama_sampler_init_dry */
|
|
5431
5455
|
|
|
5456
|
+
/* llama_sampler_init_adaptive_p */
|
|
5457
|
+
rb_define_module_function(rb_mLlamaCpp, "llama_sampler_init_adaptive_p", rb_llama_sampler_init_adaptive_p, 3);
|
|
5458
|
+
|
|
5432
5459
|
/* llama_sampler_init_logit_bias */
|
|
5433
5460
|
rb_define_module_function(rb_mLlamaCpp, "llama_sampler_init_logit_bias", rb_llama_sampler_init_logit_bias, 3);
|
|
5434
5461
|
|
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.23.
|
|
6
|
+
VERSION = '0.23.11'
|
|
7
7
|
|
|
8
8
|
# The supported version of llama.cpp.
|
|
9
|
-
LLAMA_CPP_VERSION = '
|
|
9
|
+
LLAMA_CPP_VERSION = 'b7790'
|
|
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.23.
|
|
4
|
+
version: 0.23.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yoshoku
|
|
@@ -33,7 +33,7 @@ metadata:
|
|
|
33
33
|
homepage_uri: https://github.com/yoshoku/llama_cpp.rb
|
|
34
34
|
source_code_uri: https://github.com/yoshoku/llama_cpp.rb
|
|
35
35
|
changelog_uri: https://github.com/yoshoku/llama_cpp.rb/blob/main/CHANGELOG.md
|
|
36
|
-
documentation_uri: https://gemdocs.org/gems/llama_cpp/0.23.
|
|
36
|
+
documentation_uri: https://gemdocs.org/gems/llama_cpp/0.23.11/
|
|
37
37
|
rubygems_mfa_required: 'true'
|
|
38
38
|
rdoc_options: []
|
|
39
39
|
require_paths:
|