Skip to content

Commit 6ef43ba

Browse files
authored
make public
1 parent a1b1018 commit 6ef43ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/llama.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,12 @@ extern "C" {
506506
// Get the model's RoPE frequency scaling factor
507507
LLAMA_API float llama_model_rope_freq_scale_train(const struct llama_model * model);
508508

509+
// Returns the number of classifier outputs (only valid for classifier models)
510+
LLAMA_API uint32_t llama_model_n_cls_out(const struct llama_model * model);
511+
512+
// Returns label of classifier output by index (<n_cls_out). Returns nullptr if no label provided
513+
LLAMA_API const char * llama_model_get_classifier_label_by_index(const struct llama_model * model, uint32_t i);
514+
509515
LLAMA_API enum llama_vocab_type llama_vocab_type(const struct llama_vocab * vocab);
510516

511517
LLAMA_API int32_t llama_vocab_n_tokens(const struct llama_vocab * vocab);
@@ -912,7 +918,7 @@ extern "C" {
912918

913919
// Get the embeddings for a sequence id
914920
// Returns NULL if pooling_type is LLAMA_POOLING_TYPE_NONE
915-
// when pooling_type == LLAMA_POOLING_TYPE_RANK, returns float[1] with the rank of the sequence
921+
// when pooling_type == LLAMA_POOLING_TYPE_RANK, returns float[i] with the rank(s) of the sequence
916922
// otherwise: float[n_embd] (1-dimensional)
917923
LLAMA_API float * llama_get_embeddings_seq(struct llama_context * ctx, llama_seq_id seq_id);
918924

0 commit comments

Comments
 (0)