Skip to content

Error with embed when passing a List #2199

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

Activity

  1. added a commit that references this issue on May 4, 2026
    90e8df9
  2. mlisovyi commented on May 5, 2026

    @mlisovyi

    Tests in #2205 seem to be failing with the same error as before (llama_decode: failed to decode, ret = -1) . @abetlen is that expected?

    Related to #2051 (same error).

  3. davidmezzetti commented on May 5, 2026

    @davidmezzetti
    Author

    Agree. That PR looked vibe coded.

  4. davidmezzetti commented on May 11, 2026

    @davidmezzetti
    Author

    Thank you 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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