Skip to content

Cookies

We use cookies to enhance your experience. Learn more

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.

Four tall cream paper rectangles standing side by side on periwinkle paper, each filled almost to the top with small indigo squares, and to their left a loose scatter of small indigo squares, one of them red.

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. The GPUs

    Each GPU serves the model with vLLM, from its official Docker image.

  6. 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%
Fok, Aguiar, Borges, van der Boor and Duncan, Prosus AI Tech Blog, October 2025

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, 2025

Authors

  • Floris Fok

  • Mateus Aguiar

  • Gabriela Borges

  • Paul van der Boor

  • Madeline Duncan

References

  1. 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
  2. BESH (ProsusAI/BESH)GitHub, the code the post released
  3. vLLMThe model server BESH runs on each GPU

Keep reading

  • Publication

    One model for the whole home page

    A shopping app’s home page is filled by many recommenders, each tuned for its own slot. This model writes one page per person, per meal moment: the title, the subtitle and what to show. In a live test on one slot it brought 137% more orders from that list.

  • Publication

    New robots, old tricks: teaching robots to speak AI

    A post of November 2026 on a year of wiring Darwin, the Prosus humanoid robot. Five parts spoke five protocols, and the post asks what a robot should tell an AI agent about its actions before the agent can use it.

  • Method

    Meet the large commerce model

    Language models learn from text. Magnet Decision learns from what people search for, look at, buy and come back for. Here’s how it’s built.