dspy-parallel

Installation
SKILL.md

Run LM Calls in Parallel with dspy.Parallel

Guide the user through using DSPy's Parallel module to execute multiple LM calls concurrently. dspy.Parallel is the built-in way to speed up batch processing and fan-out patterns without writing threading code yourself.

What is dspy.Parallel

dspy.Parallel takes a list of (module, inputs) pairs and executes them concurrently using a thread pool. It handles threading, progress bars, error limits, and timeouts so you don't have to.

Use it when you have:

  • A batch of inputs to run through the same module (classify 500 tickets, summarize 100 articles)
  • Multiple independent modules to run on the same input (sentiment + topics + entities at once)
  • Any set of LM calls that don't depend on each other

If call B depends on the result of call A, those two calls must be sequential. Everything else can be parallel.

Step 1 — Clarify the use case

Before writing code, ask:

Installs
7
GitHub Stars
11
First Seen
Mar 17, 2026
dspy-parallel — lebsral/dspy-programming-not-prompting-lms-skills