Skip to main content

Functions for Prototyping, QOL and Sanity checking

Project description

Grimmerie

A spellbook for Python.

Grimmerie is a collection of high-level utilities (“spells”) designed for rapid prototyping, sanity checking, and reducing friction in experimentation.

Each spell performs a non-trivial amount of work under the hood.
They are intentionally designed to trade fine-grained control for speed, clarity, and momentum.

Use them when you want to move fast.
Understand them before you rely on them.


Installation

pip install grimmerie

The Idea

Instead of wiring together pipelines every time, Grimmerie gives you:

  • One function call
  • Sensible defaults
  • Heavy lifting handled internally

Example philosophy:

embeddings = specterize(papers)

Behind this single call:

  • Model loading
  • Tokenization
  • Batching
  • Device handling
  • Adapter loading
  • Output formatting

All handled for you.


Spells

specterize

Generate SPECTER2 embeddings from text or paper-like inputs.

from specterize import specterize

papers = [
    {'abstract': 'We introduce a new language representation model called BERT'},
    {'abstract': 'The dominant sequence transduction models are based on neural networks'},
]

embeddings = specterize(papers, return_type='numpy')

API

specterize(input_data, return_type='list', max_length=512)
  • input_data: str, dict, list, or iterable
  • return_type: "list", "numpy", "tensor"
  • max_length: tokenizer truncation length (default 512)

Design Principles

1. Abstraction over configuration

You should not need to think about setup for common workflows.

2. Strong defaults

Spells are opinionated. They are built to “just work” for most cases.

3. Hidden complexity

A spell may do significantly more than it appears.

4. Use with awareness

Because complexity is hidden, you should understand what a spell does before using it in critical systems.


When to Use Grimmerie

  • Rapid experimentation
  • Prototyping ML/NLP pipelines
  • Sanity checking ideas
  • Building quick demos

When Not to Use It

  • When you need full control over every step
  • When reproducibility requires explicit pipelines
  • When debugging low-level behavior

Notes

  • First call may be slower due to model downloads
  • Models are cached locally after first use
  • Subsequent calls reuse loaded resources within the same process

Direction

Grimmerie will expand into a broader system of spells for:

  • Vectorization
  • Dimensionality reduction
  • Visualization
  • Data inspection
  • ML prototyping utilities

Each designed to compress multi-step workflows into a single, intentional call.

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

grimmerie-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

grimmerie-0.1.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file grimmerie-0.1.2.tar.gz.

File metadata

  • Download URL: grimmerie-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for grimmerie-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4eb994d50d242ddd2f70f3e7a5820a660240d5ed562d305356da0ce415652074
MD5 d5e5de3b20d5fb24dd77795fe3d0c9c7
BLAKE2b-256 170a330816b1593a87a0d634f0a40d8b53c05f1432bfeacebdabaea763974eed

See more details on using hashes here.

File details

Details for the file grimmerie-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: grimmerie-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for grimmerie-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 05a772b256248f3224ee496a89c9efab42f96a630ef6606761049bf9414c72cf
MD5 da3e395debda24a62cd7a3d3230e4da0
BLAKE2b-256 371141580f842646fdf260bae30ab660a797529635ccdeccfb71b652a34b4691

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