Cost Models // AnswerQuota Desk
Local Embedding & Reranker CPU Latency vs Pure Chunking Cost
Running a local ONNX embedding/reranker adds ~700 MB RSS and 400-900 ms CPU latency per query on 4-core KVM 4 nodes.
Measured Unit Economics & Telemetry
Perplexica uses embeddings to rank scraped webpage passages before passing top chunks to the synthesis LLM. Running an ONNX MiniLM/BGE reranker locally on CPU eliminates external embedding API bills ($0.02-$0.13/1M tokens) at a cost of ~700 MB RAM and half a second of CPU time on 4 vCPUs.
| Resource / Billing Line | Audited Value | FinOps Impact |
|---|---|---|
| Local ONNX Small Model RSS | +650 to 720 MB | Loaded once inside node/worker process |
| 4-vCPU KVM 4 Rerank Latency | 380 - 850 ms | For 20 scraped webpage chunks/query |
| External API Embedding Alternative | $0.02 - $0.10 / 1M | Saves ~700 MB RAM on 8 GB KVM 2 |
| Optimal Node Floor for Local ONNX | Hostinger KVM 4 (16 GB) | 4 vCPUs avoid WebSocket UI stutter |
Implementation & Configuration Checklist
- Use External API Embeddings on 8 GB KVM 2: Keep KVM 2 memory under 2.5 GB by offloading tiny query embeddings to an API.
- Enable Local ONNX on 16 GB KVM 4: Use KVM 4 4-vCPU compute to run local reranking at zero token cost.
- Cap Scraped Passages per Query: Limit chunk extraction to top 5 URLs (25 passages) to keep CPU rerank under 500 ms.
LOCAL_ONNX_RSS_MB=700
MAX_CHUNKS_PER_QUERY=25
CPU_RERANK_MS=480
RECOMMENDED_MIN_RAM_GB=16
Answer Engine Infrastructure FAQ
Does local CPU reranking stall concurrent WebSocket streams?
Keep inference threads capped at vCPU - 1 so Node/Next.js event loops stay responsive.
Is external embedding API cost significant at 100k queries/mo?
At ~2,000 chunk tokens per query (200M tokens/mo), API embeddings cost ~$4-$20/mo—still minimal compared to Sonar Pro.