Skip to content

huggingface: batching in huggingface pipeline #31533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TheAnkurGoswami
Copy link
Contributor

@TheAnkurGoswami TheAnkurGoswami commented Jun 8, 2025

This PR introduces true batching support for Hugging Face pipelines.
The previous implementation simulated batching by launching multiple parallel calls using ContextThreadPoolExecutor - a pattern more suited for API-based workloads reference code.

With this update, batches are now processed natively through Hugging Face models/pipelines running on local GPUs, enabling more efficient and performant execution.

Copy link

vercel bot commented Jun 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jun 8, 2025 6:32pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. langchain Related to the langchain package labels Jun 8, 2025
Copy link

codspeed-hq bot commented Jun 8, 2025

CodSpeed Walltime Performance Report

Merging #31533 will not alter performance

Comparing TheAnkurGoswami:hf-pipeline-batching (96d6483) with master (ece9e31)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

Copy link

codspeed-hq bot commented Jun 8, 2025

CodSpeed Instrumentation Performance Report

Merging #31533 will not alter performance

Comparing TheAnkurGoswami:hf-pipeline-batching (96d6483) with master (ece9e31)

Summary

✅ 13 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
langchain Related to the langchain package size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant