[GH-ISSUE #10429] Regression: "runtime error: slice bounds out of range [:-1]" when using /api/embed with bge-m3 embedding model in 0.6.7-rc0 (works in 0.6.6) #32615

Closed
opened 2026-04-22 14:07:06 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Seven-94 on GitHub (Apr 27, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10429

What is the issue?

Hi,

I encountered a regression when upgrading from Ollama 0.6.6 to 0.6.7-rc0 on macOS. When using the bge-m3 embedding model with the /api/embed endpoint (triggered via OpenWebUI’s web search feature), Ollama consistently crashes and returns a 500 error. Downgrading back to 0.6.6 resolves the issue.

Steps to reproduce:

Install Ollama 0.6.7-rc0 on macOS.

Pull and use the bge-m3 embedding model.

Use an application (e.g. OpenWebUI) that sends POST requests to /api/embed for batch embeddings.

Observe the error and crash.

Additional context:

The error only appears with Ollama 0.6.7-rc0.

Downgrading to 0.6.6 fixes the issue.

The embedding model used is bge-m3.

The error occurs regardless of input, immediately on calling /api/embed.

Let me know if you need more details or a minimal reproduction!

Thanks for your work on Ollama.

Relevant log output

025/04/27 19:19:26 [Recovery] 2025/04/27 - 19:19:26 panic recovered:
runtime error: slice bounds out of range [:-1]
/Users/runner/hostedtoolcache/go/1.24.0/x64/src/runtime/panic.go:141 (0x10419d8d7)
/Users/runner/work/ollama/ollama/server/routes.go:459 (0x104c25bcb)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047b170b)
/Users/runner/work/ollama/ollama/server/routes.go:1135 (0x104c2d2af)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047be1f7)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x1047be1dc)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047bd5a3)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0x1047bd584)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047bca43)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x1047bc5cc)
/Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x1047bc20f)
/Users/runner/hostedtoolcache/go/1.24.0/x64/src/net/http/server.go:2822 (0x10448fed3)
/Users/runner/hostedtoolcache/go/1.24.0/x64/src/net/http/server.go:3301 (0x1044abbbb)
/Users/runner/hostedtoolcache/go/1.24.0/x64/src/net/http/server.go:2102 (0x10448caeb)
/Users/runner/hostedtoolcache/go/1.24.0/x64/src/runtime/asm_arm64.s:1223 (0x1041de153)

[GIN] 2025/04/27 - 19:19:26 | 500 |  985.468875ms |       127.0.0.1 | POST     "/api/embed"
time=2025-04-27T19:19:26.681+02:00 level=WARN source=ggml.go:152 msg="key not found" key=general.alignment default=32
^C[GIN] 2025/04/27 - 19:19:29 | 500 |  2.931280791s |       127.0.0.1 | POST     "/api/chat"

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.6.7rc0

Originally created by @Seven-94 on GitHub (Apr 27, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10429 ### What is the issue? Hi, I encountered a regression when upgrading from Ollama 0.6.6 to 0.6.7-rc0 on macOS. When using the bge-m3 embedding model with the /api/embed endpoint (triggered via OpenWebUI’s web search feature), Ollama consistently crashes and returns a 500 error. Downgrading back to 0.6.6 resolves the issue. Steps to reproduce: Install Ollama 0.6.7-rc0 on macOS. Pull and use the bge-m3 embedding model. Use an application (e.g. OpenWebUI) that sends POST requests to /api/embed for batch embeddings. Observe the error and crash. Additional context: The error only appears with Ollama 0.6.7-rc0. Downgrading to 0.6.6 fixes the issue. The embedding model used is bge-m3. The error occurs regardless of input, immediately on calling /api/embed. Let me know if you need more details or a minimal reproduction! Thanks for your work on Ollama. ### Relevant log output ```shell 025/04/27 19:19:26 [Recovery] 2025/04/27 - 19:19:26 panic recovered: runtime error: slice bounds out of range [:-1] /Users/runner/hostedtoolcache/go/1.24.0/x64/src/runtime/panic.go:141 (0x10419d8d7) /Users/runner/work/ollama/ollama/server/routes.go:459 (0x104c25bcb) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047b170b) /Users/runner/work/ollama/ollama/server/routes.go:1135 (0x104c2d2af) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047be1f7) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x1047be1dc) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047bd5a3) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 (0x1047bd584) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1047bca43) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x1047bc5cc) /Users/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x1047bc20f) /Users/runner/hostedtoolcache/go/1.24.0/x64/src/net/http/server.go:2822 (0x10448fed3) /Users/runner/hostedtoolcache/go/1.24.0/x64/src/net/http/server.go:3301 (0x1044abbbb) /Users/runner/hostedtoolcache/go/1.24.0/x64/src/net/http/server.go:2102 (0x10448caeb) /Users/runner/hostedtoolcache/go/1.24.0/x64/src/runtime/asm_arm64.s:1223 (0x1041de153) [GIN] 2025/04/27 - 19:19:26 | 500 | 985.468875ms | 127.0.0.1 | POST "/api/embed" time=2025-04-27T19:19:26.681+02:00 level=WARN source=ggml.go:152 msg="key not found" key=general.alignment default=32 ^C[GIN] 2025/04/27 - 19:19:29 | 500 | 2.931280791s | 127.0.0.1 | POST "/api/chat" ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.6.7rc0
GiteaMirror added the bug label 2026-04-22 14:07:06 -05:00
Author
Owner

@MHugonKaliop commented on GitHub (May 5, 2025):

I have the same issue with 0.6.6 version

I use another embedding model unclemusclez/jina-embeddings-v2-base-code:latest

<!-- gh-comment-id:2850784023 --> @MHugonKaliop commented on GitHub (May 5, 2025): I have the same issue with 0.6.6 version I use another embedding model unclemusclez/jina-embeddings-v2-base-code:latest
Author
Owner

@MHugonKaliop commented on GitHub (May 5, 2025):

Actually, with 0.6.7 (I was missing a version), it seems good now

<!-- gh-comment-id:2850931363 --> @MHugonKaliop commented on GitHub (May 5, 2025): Actually, with 0.6.7 (I was missing a version), it seems good now
Author
Owner

@Seven-94 commented on GitHub (May 6, 2025):

Yes, the problem has been solved with the latest version.

<!-- gh-comment-id:2854733505 --> @Seven-94 commented on GitHub (May 6, 2025): Yes, the problem has been solved with the latest version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#32615