|
liblloyal 1.0.0
Composable primitives for llama.cpp inference
|
Classes | |
| struct | BatchGuard |
| RAII guard for automatic batch cleanup Ensures llama_batch_free is called even if exceptions occur. More... | |
Functions | |
| void | apply_l2_normalize (std::vector< float > &vec) |
| Apply L2 normalization to embedding vector (in-place) | |
Apply L2 normalization to embedding vector (in-place)
L2 normalization produces unit vectors required for cosine similarity: cosine_sim(a, b) = dot(normalize(a), normalize(b))
Definition at line 139 of file embedding.hpp.