How Hugging Face Inference Endpoints, Jobs, and Buckets Power Search on Papers with Code
huggingface ·
The article explains how Hugging Face rebuilt search for Papers with Code as a hybrid retrieval system. It combines PostgreSQL full-text search with dense semantic embeddings stored in pgvector, merging results using reciprocal rank fusion. The architecture separates offline corpus building from online query serving. Hugging Face Jobs provide burstable GPU compute to embed over 110,000 papers, with artifacts stored in Storage Buckets as the durable handoff. Hugging Face Inference Endpoints embed user queries at request time using the same pinned Qwen3-Embedding-0.6B model with 256-dimensional vectors. The system falls back to lexical search if the endpoint is cold, busy, or unhealthy, and it uses a strict versioned embedding contract to ensure consistency. Lessons learned include separating throughput work from latency-sensitive work, making storage the explicit contract, pinning model revisions, designing for cold starts, and using smaller vectors for efficiency.
huggingface