rpi: tg — кэш векторов (npz) и служба tg-embed: поиск ~6 с вместо ~40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gilfanovr
2026-10-18 20:01:45 +03:00
co-authored by Claude Opus 5.5
parent 48c129615f
commit 3bdb75d465
4 changed files with 114 additions and 12 deletions
@@ -0,0 +1,17 @@
[Unit]
Description=Telegram-поиск: модель эмбеддингов в памяти (векторы запросов tg search/report за доли секунды)
[Service]
User=astra
Group=astra
# сокет /run/tg-embed/embed.sock, только astra (0700 каталог, 0600 сокет)
RuntimeDirectory=tg-embed
RuntimeDirectoryMode=0700
ExecStart=/opt/tg-export/venv/bin/python /opt/tg-export/tgrag.py serve
Restart=on-failure
RestartSec=30
Nice=5
MemoryMax=1500M
[Install]
WantedBy=multi-user.target