Skip to main content

DSPy with litellm replaced by litelm and numpy made optional

Project description

dspy-lite

DSPy with litellm replaced by litelm and numpy made optional.

What this is

  • Same DSPy 3.1.3 -- signatures, modules (Predict, CoT, ReAct), optimizers (Bootstrap, MIPRO, SIMBA, GEPA, GRPO)
  • litellm (100k+ LOC, 70+ transitive deps) replaced by litelm (2.6k LOC, 2 deps)
  • numpy moved from core dep to optional [embeddings] extra
  • 88% smaller install (25 MB vs 213 MB, 30 packages vs 72)
  • Unaffected by the litellm supply chain compromise (CVE-2026-33634) — zero litellm code or dependencies

Install

pip install dspy-lite

With provider extras:

pip install dspy-lite[anthropic]     # Anthropic
pip install dspy-lite[bedrock]       # AWS Bedrock
pip install dspy-lite[embeddings]    # numpy for embeddings
pip install dspy-lite[all]           # everything

Usage

import dspy

lm = dspy.LM("openai/gpt-4o-mini")
dspy.configure(lm=lm)

predict = dspy.Predict("question -> answer")
result = predict(question="What is DSPy?")
print(result.answer)

Everything from DSPy works -- the import is still import dspy.

What changed from DSPy

DSPy dspy-lite
LM routing litellm (34 MB, 201k LOC) litelm (87 KB, 2.6k LOC)
numpy core dep (60 MB) optional [embeddings]
Install size 213 MB, 72 packages 25 MB, 30 packages
API unchanged unchanged

Documentation

Full DSPy documentation: dspy.ai

License

MIT (inherited from DSPy)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dspy_lite-3.1.3.post7.tar.gz (266.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dspy_lite-3.1.3.post7-py3-none-any.whl (330.4 kB view details)

Uploaded Python 3

File details

Details for the file dspy_lite-3.1.3.post7.tar.gz.

File metadata

  • Download URL: dspy_lite-3.1.3.post7.tar.gz
  • Upload date:
  • Size: 266.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dspy_lite-3.1.3.post7.tar.gz
Algorithm Hash digest
SHA256 711ae75018e5c0400ff99045d53e4b595ef7a3de4c658681b2b423c086428b51
MD5 5860f8b6b5ac54efe90ffd228d5956d7
BLAKE2b-256 84cb30d4d80e732597f77dc843fa3c2edc55e93302289a060b956b9b3b3e7047

See more details on using hashes here.

Provenance

The following attestation bundles were made for dspy_lite-3.1.3.post7.tar.gz:

Publisher: publish.yml on kennethwolters/dspy-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dspy_lite-3.1.3.post7-py3-none-any.whl.

File metadata

  • Download URL: dspy_lite-3.1.3.post7-py3-none-any.whl
  • Upload date:
  • Size: 330.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dspy_lite-3.1.3.post7-py3-none-any.whl
Algorithm Hash digest
SHA256 37b219f41e1ba29a746358353cf87b0123727cc849c4f3a3ff7d58a8c2f1a2f0
MD5 9f9b9d29cc7bad7b668267ba4fb93f83
BLAKE2b-256 b69c30c34f1750da4f728df155ae24f884c731423fdfab5e7969503ef2198e74

See more details on using hashes here.

Provenance

The following attestation bundles were made for dspy_lite-3.1.3.post7-py3-none-any.whl:

Publisher: publish.yml on kennethwolters/dspy-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page