llama_cpp 0.14.2 → 0.14.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 +6 -0
- data/ext/llama_cpp/llama_cpp.cpp +60 -0
- data/lib/llama_cpp/version.rb +2 -2
- data/sig/llama_cpp.rbs +2 -0
- data/vendor/tmp/llama.cpp/Makefile +20 -3
- data/vendor/tmp/llama.cpp/ggml-alloc.c +7 -3
- data/vendor/tmp/llama.cpp/ggml-backend-impl.h +5 -0
- data/vendor/tmp/llama.cpp/ggml-backend.c +154 -124
- data/vendor/tmp/llama.cpp/ggml-backend.h +4 -4
- data/vendor/tmp/llama.cpp/ggml-cuda.cu +8741 -8691
- data/vendor/tmp/llama.cpp/ggml-cuda.h +6 -15
- data/vendor/tmp/llama.cpp/ggml-kompute.cpp +1 -0
- data/vendor/tmp/llama.cpp/ggml-metal.m +34 -11
- data/vendor/tmp/llama.cpp/ggml-metal.metal +260 -28
- data/vendor/tmp/llama.cpp/ggml-quants.c +25 -13
- data/vendor/tmp/llama.cpp/ggml-sycl.cpp +237 -78
- data/vendor/tmp/llama.cpp/ggml-sycl.h +6 -1
- data/vendor/tmp/llama.cpp/ggml-vulkan.cpp +7 -0
- data/vendor/tmp/llama.cpp/ggml.c +98 -16
- data/vendor/tmp/llama.cpp/llama.cpp +382 -42
- data/vendor/tmp/llama.cpp/llama.h +19 -4
- metadata +3 -3
@@ -388,6 +388,7 @@ extern "C" {
|
|
388
388
|
LLAMA_API int32_t llama_n_vocab (const struct llama_model * model);
|
389
389
|
LLAMA_API int32_t llama_n_ctx_train(const struct llama_model * model);
|
390
390
|
LLAMA_API int32_t llama_n_embd (const struct llama_model * model);
|
391
|
+
LLAMA_API int32_t llama_n_layer (const struct llama_model * model);
|
391
392
|
|
392
393
|
// Get the model's RoPE frequency scaling factor
|
393
394
|
LLAMA_API float llama_rope_freq_scale_train(const struct llama_model * model);
|
@@ -435,10 +436,24 @@ extern "C" {
|
|
435
436
|
// Returns 0 on success
|
436
437
|
LLAMA_API int32_t llama_model_apply_lora_from_file(
|
437
438
|
const struct llama_model * model,
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
439
|
+
const char * path_lora,
|
440
|
+
float scale,
|
441
|
+
const char * path_base_model,
|
442
|
+
int32_t n_threads);
|
443
|
+
|
444
|
+
// Apply a loaded control vector to a llama_context, or if data is NULL, clear
|
445
|
+
// the currently loaded vector.
|
446
|
+
// n_embd should be the size of a single layer's control, and data should point
|
447
|
+
// to an n_embd x n_layers buffer starting from layer 1.
|
448
|
+
// il_start and il_end are the layer range the vector should apply to (both inclusive)
|
449
|
+
// See llama_control_vector_load in common to load a control vector.
|
450
|
+
LLAMA_API int32_t llama_control_vector_apply(
|
451
|
+
struct llama_context * lctx,
|
452
|
+
const float * data,
|
453
|
+
size_t len,
|
454
|
+
int32_t n_embd,
|
455
|
+
int32_t il_start,
|
456
|
+
int32_t il_end);
|
442
457
|
|
443
458
|
//
|
444
459
|
// KV cache
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: llama_cpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: llama_cpp.rb provides Ruby bindings for the llama.cpp.
|
14
14
|
email:
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
96
|
+
rubygems_version: 3.5.3
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Ruby bindings for the llama.cpp.
|