Skip to content

LLM call batching and multithreading#266

Open
radu-gheorghe wants to merge 5 commits into
SeaseLtd:dataset-generatorfrom
radu-gheorghe:dataset-generator-llm-batching
Open

LLM call batching and multithreading#266
radu-gheorghe wants to merge 5 commits into
SeaseLtd:dataset-generatorfrom
radu-gheorghe:dataset-generator-llm-batching

Conversation

@radu-gheorghe
Copy link
Copy Markdown

This PR includes #265 (which includes #264).

It adds performance/cost improvements by supporting batching: when we evaluate N results from a query, we break that N into micro-batches (of configurable size) and send them to the LLM at once. You'd typically need a clearer prompt and possibly even a better model, but in my experience, it pays off. Because a good prompt might get quite big.

Side-effect: the prompt is now configurable (for the batch case at least).

We can also parallelize both generating queries from docs and generating judgments from query-doc pairs.

Both features are opt-in. Previous behavior is pretty much as it used to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant