llama_cpp 0.25.3 → 0.25.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b76e55acb48ffab518744a7afa4e60d16b716e596afd0bf73dd56859c399b2f
4
- data.tar.gz: 26a29e928885236d6061920f5a21bd1cb9c7d33c0599554a17b363dc9276b55d
3
+ metadata.gz: 296538eab4510402549d3a71d548ff8e5430772a71e739f6ef047b9fd92f488a
4
+ data.tar.gz: e0b4d0f0803d2f843f41a53a0783455fedf93606a641a5a1f5b2323f703b2eb3
5
5
  SHA512:
6
- metadata.gz: a332b1753028f192f70ab8a8144795989fd616ad4ad30d86b0cd44d6faa8aa7842b7dcb4cd8f4b2a0c1c50140b2d69593948a575fc3c3650899b4c52eb99519b
7
- data.tar.gz: 9c4ed8bec9ebddc469f92dde6f477b85747c5b4c6a3db0f532e592bedbe4413c48ca0847a589809fc68ffed006ba05c93b7672aafd6bda3e27f83dfdd46781ff
6
+ metadata.gz: 1a1c912c558c4eeea92085b59d32ec811cdaeee8e63a8099abd55fc43f7ad5f6cb88d389324f2148a0820db4f0e844a64c76736c67f8ea1f17049df6f4b1e51f
7
+ data.tar.gz: ccb5eb8ab97ebb569f87b6eccda6cc37b4f1c5e55acf424d0d74fdbdb329c1d5f299b6c193c0516e20bd577356dc861fc7b6a2bfaee624f46307e683d7cdea44
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [[0.25.5](https://github.com/yoshoku/llama_cpp.rb/compare/v0.25.4...v0.25.5)] - 2026-06-27
2
+
3
+ - Change supported llama.cpp version to b9820.
4
+ - Add `llama_model_n_layer_nextn` module function to `LlamaCpp`.
5
+
6
+ ## [[0.25.4](https://github.com/yoshoku/llama_cpp.rb/compare/v0.25.3...v0.25.4)] - 2026-06-13
7
+
8
+ - Change supported llama.cpp version to b9610.
9
+ - Add `n_outputs_max` accessor to `LlamaContextParams`.
10
+
1
11
  ## [[0.25.3](https://github.com/yoshoku/llama_cpp.rb/compare/v0.25.2...v0.25.3)] - 2026-05-24
2
12
 
3
13
  - Add `llama_model_chat_template` module function to `LlamaCpp`.
@@ -663,6 +663,17 @@ static VALUE llama_context_params_set_n_rs_seq(VALUE self, VALUE n_rs_seq) {
663
663
  return n_rs_seq;
664
664
  }
665
665
 
666
+ static VALUE llama_context_params_get_n_outputs_max(VALUE self) {
667
+ struct llama_context_params* data = get_llama_context_params(self);
668
+ return UINT2NUM(data->n_outputs_max);
669
+ }
670
+
671
+ static VALUE llama_context_params_set_n_outputs_max(VALUE self, VALUE n_outputs_max) {
672
+ struct llama_context_params* data = get_llama_context_params(self);
673
+ data->n_outputs_max = NUM2UINT(n_outputs_max);
674
+ return n_outputs_max;
675
+ }
676
+
666
677
  static VALUE llama_context_params_get_n_threads(VALUE self) {
667
678
  struct llama_context_params* data = get_llama_context_params(self);
668
679
  return INT2NUM(data->n_threads);
@@ -1772,6 +1783,20 @@ static VALUE rb_llama_model_n_layer(VALUE self, VALUE model) {
1772
1783
  return INT2NUM(llama_model_n_layer(model_wrapper->model));
1773
1784
  }
1774
1785
 
1786
+ /**
1787
+ * @overload llama_model_n_layer_nextn(model)
1788
+ * @param [LlamaModel] model
1789
+ * @return [Integer]
1790
+ */
1791
+ static VALUE rb_llama_model_n_layer_nextn(VALUE self, VALUE model) {
1792
+ if (!rb_obj_is_kind_of(model, rb_cLlamaModel)) {
1793
+ rb_raise(rb_eArgError, "model must be a LlamaModel");
1794
+ return Qnil;
1795
+ }
1796
+ llama_model_wrapper* model_wrapper = get_llama_model_wrapper(model);
1797
+ return INT2NUM(llama_model_n_layer_nextn(model_wrapper->model));
1798
+ }
1799
+
1775
1800
  /**
1776
1801
  * @overload llama_model_n_head(model)
1777
1802
  * @param [LlamaModel] model
@@ -4814,6 +4839,17 @@ void Init_llama_cpp(void) {
4814
4839
  * @return [Integer]
4815
4840
  */
4816
4841
  rb_define_method(rb_cLlamaContextParams, "n_rs_seq=", RUBY_METHOD_FUNC(llama_context_params_set_n_rs_seq), 1);
4842
+ /**
4843
+ * Document-method: n_outputs_max
4844
+ * @return [Integer]
4845
+ */
4846
+ rb_define_method(rb_cLlamaContextParams, "n_outputs_max", RUBY_METHOD_FUNC(llama_context_params_get_n_outputs_max), 0);
4847
+ /**
4848
+ * Document-method: n_outputs_max=
4849
+ * @param [Integer] n_outputs_max
4850
+ * @return [Integer]
4851
+ */
4852
+ rb_define_method(rb_cLlamaContextParams, "n_outputs_max=", RUBY_METHOD_FUNC(llama_context_params_set_n_outputs_max), 1);
4817
4853
  /**
4818
4854
  * Document-method: n_threads
4819
4855
  * @return [Integer]
@@ -5066,6 +5102,7 @@ void Init_llama_cpp(void) {
5066
5102
 
5067
5103
  /* TODO: struct llama_sampler_seq_config * samplers */
5068
5104
  /* TODO: size_t n_samplers */
5105
+ /* TODO: struct llama_context * ctx_other */
5069
5106
 
5070
5107
  /**
5071
5108
  * Document-method: kv_unified=
@@ -5400,6 +5437,9 @@ void Init_llama_cpp(void) {
5400
5437
  /* llama_model_n_layer */
5401
5438
  rb_define_module_function(rb_mLlamaCpp, "llama_model_n_layer", rb_llama_model_n_layer, 1);
5402
5439
 
5440
+ /* llama_model_n_layer_nextn */
5441
+ rb_define_module_function(rb_mLlamaCpp, "llama_model_n_layer_nextn", rb_llama_model_n_layer_nextn, 1);
5442
+
5403
5443
  /* llama_model_n_head */
5404
5444
  rb_define_module_function(rb_mLlamaCpp, "llama_model_n_head", rb_llama_model_n_head, 1);
5405
5445
 
@@ -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.25.3'
6
+ VERSION = '0.25.5'
7
7
 
8
8
  # The supported version of llama.cpp.
9
- LLAMA_CPP_VERSION = 'b9290'
9
+ LLAMA_CPP_VERSION = 'b9820'
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.25.3
4
+ version: 0.25.5
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.25.3/
36
+ documentation_uri: https://gemdocs.org/gems/llama_cpp/0.25.5/
37
37
  rubygems_mfa_required: 'true'
38
38
  rdoc_options: []
39
39
  require_paths:
@@ -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: 4.0.10
52
+ rubygems_version: 4.0.13
53
53
  specification_version: 4
54
54
  summary: Ruby bindings for the llama.cpp.
55
55
  test_files: []