ResearchPublication
BESH: an open source batch endpoint for unlocking 4x utilization of your self hosted GPU cluster
A post of October 2025 by Floris Fok and four co-authors. iFood wanted language models to write millions of personal push notifications a day, and the team built BESH, an open source batch endpoint for models on its own GPUs.

Where this comes from
This is a post on the Prosus AI Tech Blog, published on 22 October 2025. Floris Fok wrote it, and it names Mateus Aguiar, Gabriela Borges, Paul van der Boor and Madeline Duncan as its co-authors. It reports work at iFood, a food delivery platform in Latin America, and thanks the iFood and Prosus AI teams for it. What follows is from the post.
What the post asks
iFood handles over 120 million orders a month across every state in Brazil. Its team asked why push notifications still feel generic, and set out to have language models write millions of them a day, each one drawn from a person’s behavior, preferences and context at that moment. Early tests with GPT-4o went well: the messages were good, engagement went up, and they read as personal.
At iFood’s scale the plan ran into limits that smaller volumes had hidden. Costs with GPT-4o became prohibitive, and the team shared the same API with every other team in the company, so prices and performance were hard to predict. During the launch of GPT-5, almost 60% of the team’s batch jobs at an external provider were lost because they did not finish within the 24 hour window. After the team moved to a fine-tuned model of its own on Databricks, the GPUs sat mostly idle, held back by request handling, timeouts and the overhead of millions of single API calls, while costly clusters kept running as they waited for answers.
A batch endpoint of their own
Sending work in batches had served the team well with external models such as Gemini and GPT, and it wanted the same for its own fine-tuned models. When the project began, the post says, no open source counterpart of OpenAI’s batch endpoint existed for models a company hosts itself. So the team built BESH, short for Batch Endpoint for Self-Hosted models.
The reasoning is in one line of the post: “Cost of self-hosting is simple; pay per hour.” A team that pays for its GPUs by the hour saves by keeping them busy, and BESH is built to do that, with a simpler setup, at a lower cost, and with a cluster that is easier to share among several teams.
How it is built
BESH copies OpenAI’s batch endpoint as closely as it can, so that switching to it is seamless. It runs on one GPU or on eight, and a deployment starts these services.
The batch API
An OpenAI-compatible API built with FastAPI. It takes the batch files, compressed with gzip, zip or bz2 as well, puts the batches on a Redis queue and serves a simple dashboard.
Postgres and Redis
Redis hands the jobs to the workers. Postgres gathers the results and feeds the dashboard, which tracks how often jobs fail, tokens per 15 minutes and more.
The workers
Each worker takes a job from the queue, loads its jsonl file and sends the requests with an httpx client, with a semaphore to cap the connections. A deployment runs 4 to 20 of them, so the GPUs are never left waiting.
The load balancer
It sends each request to the GPU with the fewest open connections, checks their health and allows generous timeouts. Growing the system means adjusting the load balancer, and its health checks let it scale on its own.
The GPUs
Each GPU serves the model with vLLM, from its official Docker image.
Storage
Batches and databases are kept on a Docker volume, so that work can continue, and synced to S3.
What it found
- lower cost than OpenAI’s batch endpoint, at its prices of 29 August 2025
- 26x
- tokens processed in one day, BESH’s record
- 120B
- utilization in the post’s cost example, a job that runs daily and keeps the GPUs busy 20 hours of 24
- 81%
The post’s dashboard shows 64 billion tokens processed in 24 hours, steadily, with 19 thousand batches waiting and 25 thousand done in the same day. The team adds that fine-tuning a model to do the work of gpt-4.1-mini is only one part of the solution, and that since the first version it has made three major improvements to BESH, in security, scalability and stability.
The authors write that BESH turned personalization ideas that were not viable into viable ones, at the right unit economics, and that it fits into data pipelines a team already has, such as Databricks. Since it is made for bare metal, any cloud provider can run it. The code and the instructions to set it up are on GitHub.
The post
BESH: An Open Source Batch Endpoint for Unlocking 4x Utilization of Your Self Hosted GPU ClusterFloris Fok, Mateus Aguiar, Gabriela Borges, Paul van der Boor, Madeline Duncan. Prosus AI Tech Blog, 2025Authors
Floris Fok
Mateus Aguiar
Gabriela Borges
Paul van der Boor
Madeline Duncan
References
- BESH: An Open Source Batch Endpoint for Unlocking 4x Utilization of Your Self Hosted GPU ClusterFloris Fok, Mateus Aguiar, Gabriela Borges, Paul van der Boor, Madeline Duncan. Prosus AI Tech Blog, Medium, 22 October 2025
- BESH (ProsusAI/BESH)GitHub, the code the post released
- vLLMThe model server BESH runs on each GPU