| llama_set_causal_attn | R Documentation |
When disabled, the model uses full (bidirectional) attention. This is useful for embedding models.
llama_set_causal_attn(ctx, causal)
ctx |
Context handle returned by [llama_new_context] |
causal |
Logical; |
No return value, called for side effects.
## Not run:
model <- llama_load_model("model.gguf")
ctx <- llama_new_context(model)
llama_set_causal_attn(ctx, FALSE) # for embeddings
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.