Skip to content

GPU passthrough for Ollama + embedding benchmark vs. the current CPU-bound setup #4327

Description

@JSONbored

Part of #4325.

Context

src/review/rag.ts's embedding path currently runs against CPU-only Ollama inference, which has been measured to take considerably longer per batch than is comfortable under load, contributing to embedding timeouts and general resource contention with the rest of the review pipeline. The new host's GPU is provisioned specifically to fix this. nomic-embed-text (the current embedding model) is small — this is not a "does the GPU have enough VRAM" question, it's a "is passthrough actually wired correctly and does it measurably help" question.

Requirements

  • NVIDIA Container Toolkit (or equivalent) installed on the new host so docker run --gpus all actually reaches the card — confirm with nvidia-smi both on the host and inside a test container before touching the real ollama service.
  • docker-compose.yml's ollama service updated (locally, on the new host only) to request the GPU device.
  • Pull the same model (nomic-embed-text) the current host runs; do not change models as part of this issue.
  • Benchmark: same batch size, same repo's chunk set, GPU vs. the current CPU host's measured latency — record both, not just the new number.
  • Re-validate the embed batch size setting (if in use) against the new hardware — a batch size tuned for CPU contention may be needlessly conservative on GPU; this issue should record a recommendation, not necessarily change the shipped default.

Deliverables

  • nvidia-smi confirms GPU visibility inside a test container
  • ollama service on the new host running model inference on GPU, confirmed via nvidia-smi showing utilization during an embed call (not falling back to CPU silently)
  • Before/after latency numbers for the same embedding workload (CPU on the current host vs. GPU on the new host)
  • A recorded recommendation for the embed batch size on the new hardware
  • Compose changes for this stay local to the new host during the parallel-run window — no repo commit until cutover is decided (this issue is infrastructure config, not application code)

Expected outcome

Confirmed, measured, faster embedding throughput on the new host with no silent CPU fallback, and a data-backed batch-size recommendation instead of a guess.

Effort

M

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions