from llama_cpp import Llama
# This works
llm = Llama(model_path="/tmp/all-MiniLM-L6-v2-Q8_0.gguf", embedding=True)
print(llm.embed(["test"]))
# This also works
import numpy as np
print(np.array([llm.embed(x) for x in ["test", "test"]]))
# This fails
llm = Llama(model_path="/tmp/all-MiniLM-L6-v2-Q8_0.gguf", embedding=True)
print(llm.embed(["test", "test"]))