Skip to content

Commit 8a96113

Browse files
committed
Fixed embeddings typos
1 parent 3f34700 commit 8a96113

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ To generate embeddings, use the `LlamaEmbedding` class. It automatically configu
758758
```python
759759
from llama_cpp.llama_embedding import LlamaEmbedding
760760

761-
# Initialize the model (automatically sets embedding=True)
761+
# Initialize the model (automatically sets embeddings=True)
762762
llm = LlamaEmbedding(model_path="path/to/bge-m3.gguf", n_gpu_layers=-1)
763763

764764
# 1. Simple usage (OpenAI-compatible format)

llama_cpp/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ def embed(
11181118

11191119
if self.context_params.embeddings is False:
11201120
raise RuntimeError(
1121-
"Llama model must be created with embedding=True to call this method"
1121+
"Llama model must be created with embeddings=True to call this method"
11221122
)
11231123

11241124
if self.verbose:

llama_cpp/llama_embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class LlamaEmbedding(Llama):
2828
Inherits from the base Llama class but is optimized for vector operations.
2929
3030
Key Features:
31-
1. Auto-configuration: Automatically sets embedding=True.
31+
1. Auto-configuration: Automatically sets embeddings=True.
3232
2. Streaming Batch: Handles massive datasets without OOM (Out Of Memory).
3333
3. Native Reranking Support: Specifically handles `LLAMA_POOLING_TYPE_RANK` models (like BGE-Reranker). /
3434
It correctly identifies classification heads to output scalar relevance scores instead of high-dimensional vectors.

tests/test_llama.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ def test_real_llama_embeddings(llama_cpp_model_path):
232232
n_threads=multiprocessing.cpu_count(),
233233
n_threads_batch=multiprocessing.cpu_count(),
234234
logits_all=False,
235-
swa_full=True,
235+
embeddings=True,
236236
kv_unified=True,
237-
embedding=True
237+
swa_full=True,
238238
)
239239
# Smoke test for now
240240
model.embed("Hello World")

0 commit comments

Comments
 (0)