Skip to main content

Ballast: pull a quantized knowledge corpus and ground any local model — OpenAI proxy + MCP server over a CC0 Wikidata artifact.

Project description

ballast

Pull a quantized knowledge corpus and ground any local model. Works with Ollama and every OpenAI-compatible or MCP-capable client.

uvx openballast pull --level 3
uvx openballast serve

(Or pip install openballast and use the ballast command.)

  • Ollama users: point your client's base URL at http://localhost:11435/v1 instead of http://localhost:11434/v1 — done. Every chat request is grounded with corpus facts before your model sees it. No tool calling needed, works with any model size.

  • MCP users (Claude Desktop, LM Studio, Cline, Goose): add to your MCP config:

    { "ballast": { "command": "uvx", "args": ["openballast", "mcp"] } }
    
  • Smoke test:

    uvx openballast lookup "Where was Douglas Adams born?"
    

What you're downloading

Ballast T0: 25.4M entities and 197M facts from Wikidata (CC0), quantized into nested levels — pick your knowledge size like you pick a GGUF quant:

level download on disk contains
L0 52 MB 0.2 GB top 0.5% most notable entities
L1 92 MB 0.35 GB top 1%
L2 159 MB 0.6 GB top 2%
L3 265 MB 1.0 GB top 4%
L4 427 MB 1.6 GB top 8%
L5 691 MB 2.6 GB top 16%
L6 1.1 GB 4.2 GB top 32%
L7 2.2 GB 9.2 GB everything

Levels are nested: pull --level 5 after pull --level 3 downloads only the new buckets. Everything runs offline after the pull — no network at answer time.

Measured effect (details: thesis): a 2B model + ~180 MB of ballast exceeds a 12B model's factual accuracy; hallucination on factual probes drops ~3×.

Commands

ballast pull  --level 3      # download / upgrade the corpus
ballast serve                # OpenAI grounding proxy :11435 + MCP http :11436
ballast mcp                  # MCP on stdio (for client configs)
ballast lookup "question"    # print the evidence blocks for a question
ballast status               # installed levels and sizes

BALLAST_HOME overrides the storage location (default ~/.ballast).

How it works

serve intercepts POST /v1/chat/completions, mines entity mentions from your last message, resolves them against the local corpus (normalized label/alias match), and prepends the matching facts as a system message. Everything else — including streaming — passes through untouched. The MCP server exposes the same three tools (resolve, evidence, lookup) as the hosted demo endpoint (mcp.openballast.org).

Apache-2.0. Corpus data: CC0 (Wikidata contributors).

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

openballast-0.1.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

openballast-0.1.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file openballast-0.1.1.tar.gz.

File metadata

  • Download URL: openballast-0.1.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openballast-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b41eb2a28b0ddf07fb5fcd7a43976cd75568fef602154c6bdf0d2d756f21c7e5
MD5 14a43475dc869740175995cfefb18b2e
BLAKE2b-256 1239cd259db6c531931120f20f6f43f7a58532b6731d9a5fbbada09f9e63b39a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openballast-0.1.1.tar.gz:

Publisher: publish.yml on OpenBallast/ballast-cli

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

File details

Details for the file openballast-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: openballast-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openballast-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e99e3d7b5cf972bf9c157d2958ff670e05e8e5fbc0348f3cac443d7d16cbbf3a
MD5 05647cac23b7848575afcd754b8ac380
BLAKE2b-256 061c30de41198a08818133382e7b5a8c56f26fc1983d15cfe72734341c623557

See more details on using hashes here.

Provenance

The following attestation bundles were made for openballast-0.1.1-py3-none-any.whl:

Publisher: publish.yml on OpenBallast/ballast-cli

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