Skip to main content

Verified-on-Spark patterns lifted from the ai-field-notes blog into one importable Python package.

Project description

fieldkit

Verified-on-Spark patterns lifted from the ai-field-notes blog into one importable Python package.

Every essay in ai-field-notes ends with evidence/ — a folder of working code that produced the article's numbers. After 25+ articles the same patterns kept reappearing: the same NIM client wrapper, the same chunk-embed-store dance, the same bench harness. fieldkit is what those evidence/ folders look like once the boilerplate is lifted into a real package.

The blog stays the long-form rationale. fieldkit is the pip install-able surface so you can reproduce — and extend — the work without re-pasting 80 lines of NIM-client setup per article.

Install

pip install fieldkit

For the bleeding edge between releases, install from the git tag instead:

pip install "git+https://github.com/manavsehgal/ai-field-notes.git@fieldkit/v0.1.0#subdirectory=fieldkit"

Quickstart

from fieldkit.nim import NIMClient

client = NIMClient(base_url="http://localhost:8000/v1", model="meta/llama-3.1-8b-instruct")
print(client.chat([{"role": "user", "content": "Hello, Spark."}]))

What's in v0.1.0

Module Purpose Source articles
fieldkit.capabilities Typed Python facade over spark-capabilities.json — KV cache math, weight bytes, inference envelope. kv-cache-arithmetic-at-inference, gpu-sizing-math-for-fine-tuning
fieldkit.nim OpenAI-compatible NIM client wrapper with retry, chunking, and the 8192-token context guard. nim-first-inference-dgx-spark and friends
fieldkit.rag Pipeline(embed_url, rerank_url, pgvector_dsn, generator) — ingest → retrieve → rerank → fuse. naive-rag-on-spark and friends
fieldkit.eval Bench, Judge, Trajectory — the recurring eval harness shapes. every article with a bench.py or benchmark.py
fieldkit.cli fieldkit bench rag, fieldkit feasibility <id>, fieldkit envelope <size>. discoverability

Modules deferred to v0.2: retriever, ft, guardrails, agents. To v0.3: train, observe.

Hardware

v0.1 is Spark-only. Every code path is verified on a DGX Spark (GB10, 128 GB unified memory, NIM 8B + embed NIM + pgvector co-resident). Portability to other CUDA 12.x boxes lands in v0.2+ when there's demand.

License

Apache-2.0. See LICENSE.

Links

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

fieldkit-0.2.0.tar.gz (86.0 kB view details)

Uploaded Source

Built Distribution

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

fieldkit-0.2.0-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

Details for the file fieldkit-0.2.0.tar.gz.

File metadata

  • Download URL: fieldkit-0.2.0.tar.gz
  • Upload date:
  • Size: 86.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fieldkit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d51dcd20b956920f9987979f10c9a35b145b0828e572391095f299c2700e80db
MD5 99c096dc473f2cdbae29e7fde54c5034
BLAKE2b-256 156fb3e29a03d86b2eb471d1a30f900acffd0557581dc353a26e862a41850f45

See more details on using hashes here.

File details

Details for the file fieldkit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fieldkit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 53.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fieldkit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 111fdf969dbd50149eefd8924fe376b92d71ab8e61bd1c38cbeac8f623583686
MD5 8c5244163bb89841d204be8b66bfa464
BLAKE2b-256 d23ca19ebc1c185f1195cb3c4d7e21bf098e6c11b30e4b196f9d70fa49e7ebdf

See more details on using hashes here.

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