File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ struct gpt_params {
86
86
87
87
ggml_numa_strategy numa = GGML_NUMA_STRATEGY_DISABLED;
88
88
89
- llama_rope_scaling_type rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_UNSPECIFIED;
90
- llama_pooling_type pooling_type = LLAMA_POOLING_TYPE_UNSPECIFIED; // pooling type for embeddings
89
+ enum llama_rope_scaling_type rope_scaling_type = LLAMA_ROPE_SCALING_TYPE_UNSPECIFIED;
90
+ enum llama_pooling_type pooling_type = LLAMA_POOLING_TYPE_UNSPECIFIED; // pooling type for embeddings
91
91
92
92
// // sampling parameters
93
93
struct llama_sampling_params sparams;
Original file line number Diff line number Diff line change @@ -15599,6 +15599,10 @@ enum llama_rope_type llama_rope_type(const struct llama_model * model) {
15599
15599
return LLAMA_ROPE_TYPE_NONE;
15600
15600
}
15601
15601
15602
+ enum llama_pooling_type llama_pooling_type(const struct llama_context * ctx) {
15603
+ return ctx->cparams.pooling_type;
15604
+ }
15605
+
15602
15606
int32_t llama_n_vocab(const struct llama_model * model) {
15603
15607
return model->hparams.n_vocab;
15604
15608
}
Original file line number Diff line number Diff line change @@ -390,8 +390,10 @@ extern "C" {
390
390
LLAMA_API uint32_t llama_n_ubatch (const struct llama_context * ctx);
391
391
LLAMA_API uint32_t llama_n_seq_max (const struct llama_context * ctx);
392
392
393
- LLAMA_API enum llama_vocab_type llama_vocab_type (const struct llama_model * model);
394
- LLAMA_API enum llama_rope_type llama_rope_type (const struct llama_model * model);
393
+ LLAMA_API enum llama_pooling_type llama_pooling_type (const struct llama_context * ctx);
394
+
395
+ LLAMA_API enum llama_vocab_type llama_vocab_type (const struct llama_model * model);
396
+ LLAMA_API enum llama_rope_type llama_rope_type (const struct llama_model * model);
395
397
396
398
LLAMA_API int32_t llama_n_vocab (const struct llama_model * model);
397
399
LLAMA_API int32_t llama_n_ctx_train (const struct llama_model * model);
You can’t perform that action at this time.
0 commit comments