| llama_get_embeddings | R Documentation |
Returns a matrix of shape n_outputs × n_embd containing the raw
embedding vectors for all tokens whose logits flag was set in the batch.
Only works when pooling_type == "none" (generative models or embedding
contexts without pooling). For pooled embeddings use [llama_get_embeddings_seq].
llama_get_embeddings(ctx, n_outputs)
ctx |
Context handle returned by [llama_new_context] |
n_outputs |
Number of outputs requested in the last decode call
(i.e. how many tokens had |
A numeric matrix with n_outputs rows and n_embd columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.