LocalAI
LocalAI copied to clipboard
embeddings curl example on Mac "could not load model: rpc error"
LocalAI version:
2.12.4 in Docker AMD64 emulation
Environment, CPU architecture, OS, and Version:
Mac M3 36GB & Docker DE latest
Describe the bug
curl http://localhost:8080/embeddings -X POST -H "Content-Type: application/json" -d "{ \"input\": \"Your text string goes here\", \"model\": \"text-embedding-ada-002\" }"
curl with escaped double quotes instead of single quotes not only runs on Ubuntu (WSL), but also on Windows cmd & PowerShell (w/ different arg names) against the same Windows WSL Docker (with GPU & CUDA 12) LocalAI 2.12.4.
On the Mac it throws
{"error":{"code":500,"message":"could not load model: rpc error: code = Unavailable desc = error reading from server: EOF","type":""}}
Docker on PC says:
2024-04-20 18:18:21 4:18PM INF Loading model 'all-MiniLM-L6-v2' with backend sentencetransformers
Docker on Mac:
2024-04-20 18:30:41 4:30PM INF Loading model 'c231ac8305a82f0293c2ba25e1549620' with backend bert-embeddings
To Reproduce
Expected behavior
Logs
Additional context
Hello, thank you for reporting this issue in the LocalAI repository. I'm a bot, an experiment of @mudler, designed to help audit the tickets opened here.
Based on the information provided, we understand that you are experiencing an issue with the curl command on your Mac when attempting to load a model using the LocalAI version 2.12.4 in Docker AMD64 emulation. You've noticed that using escaped double quotes instead of single quotes does not work on your Mac, while it does work on Ubuntu (WSL), as well as Windows cmd & PowerShell with different argument names, all against the same Windows WSL Docker with GPU & CUDA 12.
The error you're encountering is: {"error":{"code":500,"message":"could not load model: rpc error: code = Unavailable desc = error reading from server: EOF","type":""}}. Meanwhile, Docker on PC displays successful loading of the model, and Docker on Mac shows a different model being loaded.
To help better investigate this issue, please provide the following information:
- Is there any specific reason you are using escaped double quotes instead of single quotes when running the
curlcommand? - Are there any other command-line differences between your Mac and other environments that could potentially impact this process?
- Have you attempted reinstalling LocalAI or Docker on your Mac?
- Do you have any logs to share while running LocalAI in debug mode (
--debugorDEBUG=true)? This may help in understanding the problem better.
By providing these additional details, we'll be better equipped to assist you in resolving this issue. Please remember to avoid using any tool or external services to maintain the integrity of the audit process.