class
Llama::Embedder
- Llama::Embedder
- Reference
- Object
Overview
Safe sentence embeddings over a dedicated embeddings-only context.
Included Modules
Defined in:
llama/embedder.crConstructors
Instance Method Summary
- #close : Nil
- #closed? : Bool
- #dimension : Int32
- #embed(text : String, normalize : Bool = false) : Array(Float32)
-
#embed_all(texts : Enumerable(String), normalize : Bool = false) : Array(Array(Float32))
Embeds inputs in native multi-sequence batches while preserving input order.
- #finalize
- #free : Nil
- #to_unsafe
Constructor Detail
def self.new(model : Model, pooling : Pooling = Pooling::Mean, max_sequences : UInt32 = 8_u32, context_options : ContextOptions = ContextOptions.new)
#
Instance Method Detail
def embed_all(texts : Enumerable(String), normalize : Bool = false) : Array(Array(Float32))
#
Embeds inputs in native multi-sequence batches while preserving input order.