[GH-ISSUE #300] Local embeddings with sentence transformers #175

Closed
opened 2026-02-22 18:18:14 -05:00 by yindo · 7 comments
Owner

Originally created by @Ananderz on GitHub (Oct 27, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/300

Hi,

I saw that there are local LLM:s in the roadmap. It won't make much sense if you don't also use local sentecetransformers (MTEB) like instructor or e5.

I would suggest to have this looked into before local LLM:s because you could potentially use an API endpoint for local LLM:s

Originally created by @Ananderz on GitHub (Oct 27, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/300 Hi, I saw that there are local LLM:s in the roadmap. It won't make much sense if you don't also use local sentecetransformers (MTEB) like instructor or e5. I would suggest to have this looked into before local LLM:s because you could potentially use an API endpoint for local LLM:s
yindo added the enhancement label 2026-02-22 18:18:14 -05:00
yindo closed this issue 2026-02-22 18:18:14 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 27, 2023):

We would like to explore this option but will not block LLM inferencing with this, we will just have OpenAI embeddings be the only option for non-embedder services (all LLM options except OpenAI & Azure).

So phase one is any LLM selection for inferencing with no option for embedding engine selection.

Then we add more Embedding engine selection when we can find a normalized interface for it. It would be a massive pain to do sentence transformation and each embedding engine has a different API. Most are running HF models it seems

Do you know of any services that normalize the embedding API like LiteLLM does for LLM inferencing?

@timothycarambat commented on GitHub (Oct 27, 2023): We would like to explore this option but will not block LLM inferencing with this, we will just have OpenAI embeddings be the only option for non-embedder services (all LLM options except OpenAI & Azure). So phase one is any LLM selection for inferencing with no option for embedding engine selection. Then we add more Embedding engine selection when we can find a normalized interface for it. It would be a massive pain to do sentence transformation and each embedding engine has a different API. Most are running HF models it seems Do you know of any services that normalize the embedding API like LiteLLM does for LLM inferencing?
Author
Owner

@krrishdholakia commented on GitHub (Oct 30, 2023):

hey @timothycarambat litellm supports the huggingface text embedding inference api which should help here

@krrishdholakia commented on GitHub (Oct 30, 2023): hey @timothycarambat litellm supports the huggingface text embedding inference api which should help here
Author
Owner

@timothycarambat commented on GitHub (Oct 30, 2023):

hey @timothycarambat litellm supports the huggingface text embedding inference api which should help here

Indeed, I saw this, but it also requires us to move our backend to python or run the proxy server to have that interface available

@timothycarambat commented on GitHub (Oct 30, 2023): > hey @timothycarambat litellm supports the huggingface text embedding inference api which should help here Indeed, I saw this, but it also requires us to move our backend to python or run the proxy server to have that interface available
Author
Owner

@krrishdholakia commented on GitHub (Oct 30, 2023):

Would just be an add to the docker-compose I believe:

version: '3.9'

name: anythingllm

networks:
  anything-llm:
    driver: bridge

services:
  anything-llm:
    container_name: anything-llm
    image: anything-llm:latest
    platform: linux/amd64
    build:
      context: ../.
      dockerfile: ./docker/Dockerfile
      args:
        ARG_UID: ${UID}
        ARG_GID: ${GID}
    volumes:
      - "../server/storage:/app/server/storage"
      - "../collector/hotdir/:/app/collector/hotdir"
      - "../collector/outputs/:/app/collector/outputs"
    user: "${UID}:${GID}"
    ports:
      - "3001:3001"
    env_file:
      - .env
    networks:
      - anything-llm
    extra_hosts:
      - "host.docker.internal:host-gateway"
litellm:
    image: ghcr.io/berriai/litellm:latest
    ports:
      - '8000:8000'
    environment:
      - PORT=8000
      - OPENAI_API_KEY=your-api-key
@krrishdholakia commented on GitHub (Oct 30, 2023): Would just be an add to the docker-compose I believe: ```Dockerfile version: '3.9' name: anythingllm networks: anything-llm: driver: bridge services: anything-llm: container_name: anything-llm image: anything-llm:latest platform: linux/amd64 build: context: ../. dockerfile: ./docker/Dockerfile args: ARG_UID: ${UID} ARG_GID: ${GID} volumes: - "../server/storage:/app/server/storage" - "../collector/hotdir/:/app/collector/hotdir" - "../collector/outputs/:/app/collector/outputs" user: "${UID}:${GID}" ports: - "3001:3001" env_file: - .env networks: - anything-llm extra_hosts: - "host.docker.internal:host-gateway" litellm: image: ghcr.io/berriai/litellm:latest ports: - '8000:8000' environment: - PORT=8000 - OPENAI_API_KEY=your-api-key ```
Author
Owner

@timothycarambat commented on GitHub (Nov 14, 2023):

resolved by https://github.com/Mintplex-Labs/anything-llm/pull/361

@timothycarambat commented on GitHub (Nov 14, 2023): resolved by https://github.com/Mintplex-Labs/anything-llm/pull/361
yindo changed title from Local embeddings with sentence transformers to [GH-ISSUE #300] Local embeddings with sentence transformers 2026-06-05 14:33:53 -04:00
Author
Owner

@ghost commented on GitHub (Oct 30, 2023):

hey @timothycarambat litellm supports the huggingface text embedding inference api which should help here

<!-- gh-comment-id:1786004206 --> @ghost commented on GitHub (Oct 30, 2023): hey @timothycarambat litellm supports the huggingface text embedding inference api which should help here
Author
Owner

@ghost commented on GitHub (Oct 30, 2023):

Would just be an add to the docker-compose I believe:

version: '3.9'

name: anythingllm

networks:
  anything-llm:
    driver: bridge

services:
  anything-llm:
    container_name: anything-llm
    image: anything-llm:latest
    platform: linux/amd64
    build:
      context: ../.
      dockerfile: ./docker/Dockerfile
      args:
        ARG_UID: ${UID}
        ARG_GID: ${GID}
    volumes:
      - "../server/storage:/app/server/storage"
      - "../collector/hotdir/:/app/collector/hotdir"
      - "../collector/outputs/:/app/collector/outputs"
    user: "${UID}:${GID}"
    ports:
      - "3001:3001"
    env_file:
      - .env
    networks:
      - anything-llm
    extra_hosts:
      - "host.docker.internal:host-gateway"
litellm:
    image: ghcr.io/berriai/litellm:latest
    ports:
      - '8000:8000'
    environment:
      - PORT=8000
      - OPENAI_API_KEY=your-api-key
<!-- gh-comment-id:1786222013 --> @ghost commented on GitHub (Oct 30, 2023): Would just be an add to the docker-compose I believe: ```Dockerfile version: '3.9' name: anythingllm networks: anything-llm: driver: bridge services: anything-llm: container_name: anything-llm image: anything-llm:latest platform: linux/amd64 build: context: ../. dockerfile: ./docker/Dockerfile args: ARG_UID: ${UID} ARG_GID: ${GID} volumes: - "../server/storage:/app/server/storage" - "../collector/hotdir/:/app/collector/hotdir" - "../collector/outputs/:/app/collector/outputs" user: "${UID}:${GID}" ports: - "3001:3001" env_file: - .env networks: - anything-llm extra_hosts: - "host.docker.internal:host-gateway" litellm: image: ghcr.io/berriai/litellm:latest ports: - '8000:8000' environment: - PORT=8000 - OPENAI_API_KEY=your-api-key ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#175