Transformers serve refactor: API server split into its own process for speed
LysandreJik · x · 2026-11-28
Hugging Face's transformers team merged PR #50927, refactoring the serve API server so it no longer bottlenecks the model loop. Tested on H100 and an M2 MacBook. Key changes: the API server now runs in its own process beside the model; tokenization moved to a separate thread off the event loop; streamed events are generated from a template; one message per step instead of per token; and --api-server-count allows multiple API servers (single-model only for now). Previously the HTTP server and GPU loop shared a process and blocked each other. The team says a Rust API server is the fallback if it ever becomes the bottleneck again, and faster generation overall is next.
More from coding & agent
- Dead man's switch idea: agent checks local papers for your obituary daily via cron — p_e_cooper · 2026-11-28
- Brute-forcing intelligence-bound problems with 100+ DeepSeek agents and one coordinator — zack_overflow · 2026-11-28
- Dev shares an agent prompt that forces AI to question your architecture from scratch — kevinkern · 2026-11-28
- Gemini 4 Neon may be the best model now, but the harness is still Gemini's biggest problem — JeremyNguyenPhD · 2026-11-28
- Dev won't touch new products without an MCP endpoint on the free plan — handotdev · 2026-11-28
- Developer benchmarks LLMs per agent seat in real finance app: Sol 6.2 solo beats 9x pricier multi-model stacks — kevinkern · 2026-11-28