Skip to content

Commit

Permalink
feat: add LLAMA_POOLING_TYPE_LAST constant
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Jun 22, 2024
1 parent e453ee5 commit 138ba89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/llama_cpp/dummy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ module LLaMACpp # rubocop:disable Metrics/ModuleLength
# LLaMA pooling type.
LLAMA_POOLING_TYPE_CLS = 2

# LLaMA pooling type.
LLAMA_POOLING_TYPE_LAST = 3

# LLaMA split mode: single GPU.
LLAMA_SPLIT_MODE_NONE = 0

Expand Down
1 change: 1 addition & 0 deletions ext/llama_cpp/llama_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3572,6 +3572,7 @@ extern "C" void Init_llama_cpp(void) {
rb_define_const(rb_mLLaMACpp, "LLAMA_POOLING_TYPE_NONE", INT2NUM(LLAMA_POOLING_TYPE_NONE));
rb_define_const(rb_mLLaMACpp, "LLAMA_POOLING_TYPE_MEAN", INT2NUM(LLAMA_POOLING_TYPE_MEAN));
rb_define_const(rb_mLLaMACpp, "LLAMA_POOLING_TYPE_CLS", INT2NUM(LLAMA_POOLING_TYPE_CLS));
rb_define_const(rb_mLLaMACpp, "LLAMA_POOLING_TYPE_LAST", INT2NUM(LLAMA_POOLING_TYPE_LAST));

rb_define_const(rb_mLLaMACpp, "LLAMA_SPLIT_MODE_NONE", INT2NUM(LLAMA_SPLIT_MODE_NONE));
rb_define_const(rb_mLLaMACpp, "LLAMA_SPLIT_MODE_LAYER", INT2NUM(LLAMA_SPLIT_MODE_LAYER));
Expand Down
1 change: 1 addition & 0 deletions sig/llama_cpp.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ module LLaMACpp
LLAMA_POOLING_TYPE_NONE: Integer
LLAMA_POOLING_TYPE_MEAN: Integer
LLAMA_POOLING_TYPE_CLS: Integer
LLAMA_POOLING_TYPE_LAST: Integer

LLAMA_SPLIT_MODE_NONE: Integer
LLAMA_SPLIT_MODE_LAYER: Integer
Expand Down

0 comments on commit 138ba89

Please sign in to comment.