Skip to content

Error with embed when passing a List #2199

@davidmezzetti

Description

@davidmezzetti
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"]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions