llama_cpp 0.25.4 → 0.25.6

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: 7918f80b77eb32fa218c3cd9845594eb6f882e066e600caa2af31a979f916610
4
- data.tar.gz: 2a631621308ba8206d5c27c8dad8d01b415865d99c1f632e197c4bea6ae43941
3
+ metadata.gz: fe3f4ccdf08a754d7b331a32a5c2544c672e9da31b9f5eb29e8e6503376391ab
4
+ data.tar.gz: 73d9ad537f7557232778e882edce50847333867b2b7f2b7f39420a68aeef723f
5
5
  SHA512:
6
- metadata.gz: 7429e8a0d7255b8d000fa6d2be3d346573743f8238d7fe3d29c4f6a0cdafeb17ef7f5cd6faf1dbad9272e402af1a85e924ebaec1992e2a1077cb5796b2e8521f
7
- data.tar.gz: d3eaeb4ac110955a9475aca37ac16c660e5e7780275c6861450ced9e1463478c9f7c30a8f6cc61aa22bca2cfff8a4bae1e10fd3c93e3170bb7d5e2ea1206c210
6
+ metadata.gz: ca6b8855194be0c835f4a672600fcff0e6a602afff49175c5668bd62e15c8f721c6034b1919879b56c777c77dd88f73f9e2a6f92db8397c1fe6be874d2a6e188
7
+ data.tar.gz: 5a4eab3bef52c269e355934a7e8da85cfac17e73befc2eed1a6e6eda183d21e324dac0309c33c3f296f61031e27aab315803b0fbaaf571d910440ca036dfc741
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
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
+
1
6
  ## [[0.25.4](https://github.com/yoshoku/llama_cpp.rb/compare/v0.25.3...v0.25.4)] - 2026-06-13
2
7
 
3
8
  - Change supported llama.cpp version to b9610.
@@ -1783,6 +1783,20 @@ static VALUE rb_llama_model_n_layer(VALUE self, VALUE model) {
1783
1783
  return INT2NUM(llama_model_n_layer(model_wrapper->model));
1784
1784
  }
1785
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
+
1786
1800
  /**
1787
1801
  * @overload llama_model_n_head(model)
1788
1802
  * @param [LlamaModel] model
@@ -2061,6 +2075,20 @@ static VALUE rb_llama_model_desc(VALUE self, VALUE model) {
2061
2075
  return rb_utf8_str_new_cstr(buf);
2062
2076
  }
2063
2077
 
2078
+ /**
2079
+ * @overload llama_model_ftype(model)
2080
+ * @param [LlamaModel] model
2081
+ * @return [Integer]
2082
+ */
2083
+ static VALUE rb_llama_model_ftype(VALUE self, VALUE model) {
2084
+ if (!rb_obj_is_kind_of(model, rb_cLlamaModel)) {
2085
+ rb_raise(rb_eArgError, "model must be a LlamaModel");
2086
+ return Qnil;
2087
+ }
2088
+ llama_model_wrapper* model_wrapper = get_llama_model_wrapper(model);
2089
+ return INT2NUM(llama_model_ftype(model_wrapper->model));
2090
+ }
2091
+
2064
2092
  /**
2065
2093
  * @overload llama_model_size(model)
2066
2094
  * @param [LlamaModel] model
@@ -4300,6 +4328,20 @@ static VALUE rb_llama_perf_sampler_reset(VALUE self, VALUE chain) {
4300
4328
  return Qnil;
4301
4329
  }
4302
4330
 
4331
+ /**
4332
+ * @overload llama_ftype_name(ftype)
4333
+ * @param [Integer] ftype
4334
+ * @return [String]
4335
+ */
4336
+ static VALUE rb_llama_ftype_name(VALUE self, VALUE ftype) {
4337
+ if (!RB_INTEGER_TYPE_P(ftype)) {
4338
+ rb_raise(rb_eArgError, "ftype must be an Integer");
4339
+ return Qnil;
4340
+ }
4341
+ const char* name = llama_ftype_name((enum llama_ftype)NUM2INT(ftype));
4342
+ return rb_utf8_str_new_cstr(name);
4343
+ }
4344
+
4303
4345
  /**
4304
4346
  * @overload llama_flash_attn_type_name(flash_attn_type)
4305
4347
  * @param [Integer] flash_attn_type
@@ -4446,6 +4488,9 @@ void Init_llama_cpp(void) {
4446
4488
  rb_define_const(rb_mLlamaCpp, "LLAMA_FTYPE_MOSTLY_NVFP4", INT2NUM(LLAMA_FTYPE_MOSTLY_NVFP4));
4447
4489
  rb_define_const(rb_mLlamaCpp, "LLAMA_FTYPE_MOSTLY_Q1_0", INT2NUM(LLAMA_FTYPE_MOSTLY_Q1_0));
4448
4490
  rb_define_const(rb_mLlamaCpp, "LLAMA_FTYPE_GUESSED", INT2NUM(LLAMA_FTYPE_GUESSED));
4491
+
4492
+ rb_define_module_function(rb_mLlamaCpp, "llama_ftype_name", rb_llama_ftype_name, 1);
4493
+
4449
4494
  /* llama_rope_scaling_type */
4450
4495
  /* Document-const: LlamaCpp::LLAMA_ROPE_SCALING_TYPE_UNSPECIFIED */
4451
4496
  rb_define_const(rb_mLlamaCpp, "LLAMA_ROPE_SCALING_TYPE_UNSPECIFIED", INT2NUM(LLAMA_ROPE_SCALING_TYPE_UNSPECIFIED));
@@ -5423,6 +5468,9 @@ void Init_llama_cpp(void) {
5423
5468
  /* llama_model_n_layer */
5424
5469
  rb_define_module_function(rb_mLlamaCpp, "llama_model_n_layer", rb_llama_model_n_layer, 1);
5425
5470
 
5471
+ /* llama_model_n_layer_nextn */
5472
+ rb_define_module_function(rb_mLlamaCpp, "llama_model_n_layer_nextn", rb_llama_model_n_layer_nextn, 1);
5473
+
5426
5474
  /* llama_model_n_head */
5427
5475
  rb_define_module_function(rb_mLlamaCpp, "llama_model_n_head", rb_llama_model_n_head, 1);
5428
5476
 
@@ -5461,6 +5509,9 @@ void Init_llama_cpp(void) {
5461
5509
  /* llama_model_desc */
5462
5510
  rb_define_module_function(rb_mLlamaCpp, "llama_model_desc", rb_llama_model_desc, 1);
5463
5511
 
5512
+ /* llama_model_ftype */
5513
+ rb_define_module_function(rb_mLlamaCpp, "llama_model_ftype", rb_llama_model_ftype, 1);
5514
+
5464
5515
  /* llama_model_size */
5465
5516
  rb_define_module_function(rb_mLlamaCpp, "llama_model_size", rb_llama_model_size, 1);
5466
5517
 
@@ -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.4'
6
+ VERSION = '0.25.6'
7
7
 
8
8
  # The supported version of llama.cpp.
9
- LLAMA_CPP_VERSION = 'b9610'
9
+ LLAMA_CPP_VERSION = 'b9860'
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.4
4
+ version: 0.25.6
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.4/
36
+ documentation_uri: https://gemdocs.org/gems/llama_cpp/0.25.6/
37
37
  rubygems_mfa_required: 'true'
38
38
  rdoc_options: []
39
39
  require_paths: