OSGeo-Knowledge-Embedding-Server

From OSGeo
Jump to navigation Jump to search

OSGeo-Knowledge-Embedding-Server

BGE-M3 embedding server for semantic search, running on Gallery_Container.

It provides local embeddings for Osgeo-library and other OSGeo AI/search tooling.

Model

Verified model file on osgeo7-gallery:

/home/ominiverdi/models/bge-m3-Q8_0.gguf

Model details:

  • Model family: BGE-M3
  • Upstream: BAAI
  • Quantization: Q8_0
  • File size: 606 MB
  • Vector size: 1024 dimensions
  • Multilingual: supports 100+ languages

Endpoint

The service listens on localhost only:

http://localhost:8094/embedding

Configured by Osgeo-library in:

/home/ominiverdi/github/osgeo-library/config.toml
/home/ominiverdi/github/osgeo-library/config.example.toml

Runtime

The service runs through llama.cpp / llama-server.

Startup script:

/home/ominiverdi/github/osgeo-library/servers/bge-m3-cpu.sh

The script uses:

/home/ominiverdi/llama.cpp/build/bin/llama-server
/home/ominiverdi/models/bge-m3-Q8_0.gguf

It binds to:

127.0.0.1:8094

Automatic startup

The service is started at reboot from the ominiverdi crontab:

@reboot cd ~/github/osgeo-library && nohup ./servers/bge-m3-cpu.sh >> ~/logs/bge-m3-cpu.log 2>&1 </dev/null

Related API startup entry:

@reboot ~/github/osgeo-library/servers/start-server.sh >> ~/logs/osgeo-library.log 2>&1

Operations

Check listener status:

ss -ltnp | grep 8094

Expected listener:

127.0.0.1:8094

Check process status:

pgrep -af "llama-server.*8094|bge-m3"

Check health:

curl http://127.0.0.1:8094/health

Expected result:

{"status":"ok"}

Check from Osgeo-library:

cd /home/ominiverdi/github/osgeo-library
/home/ominiverdi/github/osgeo-library/.venv/bin/python - <<'PY'
import asyncio
from doclibrary.servers.mcp import get_library_status
async def main():
    print(await get_library_status())
asyncio.run(main())
PY

Expected status includes:

Embedding server: OK
Database: OK

View logs:

tail -f /home/ominiverdi/logs/bge-m3-cpu.log

Start manually:

cd /home/ominiverdi/github/osgeo-library
nohup ./servers/bge-m3-cpu.sh >> ~/logs/bge-m3-cpu.log 2>&1 </dev/null &

Stop manually:

pkill -f "llama-server.*8094"

Consumers

Contact: ominiverdi, Lorenzo Becchi, or SAC channel.