Skip to content

0.5.0

Choose a tag to compare

@sshah03 sshah03 released this 03 Nov 07:30
· 3 commits to main since this release
  • Run a model without shrewd. shrewd.export(dir, out_dir) writes the shipped model into a folder you can copy into any project, checked against load() before it returns.
    • tf-idf and embedding models (classifiers and panels) come with a small runtime: shrewd_model.py needs only numpy, and shrewd_model.js needs nothing (Node, Deno, Bun or a browser). The calls match load()'s: predict, predict_proba and decide. precision="float16" stores an embedding model at about half size.
    • Encoder and SetFit classifiers export as ONNX with the tokenizer.json they expect (format="onnx", pip install "shrewd[onnx]"). Encoders also export as a Hugging Face folder (format="hf").
    • A routing threshold travels as metadata, and confident(texts) says which texts clear it. The teacher fallback stays in shrewd.
    • Not yet: panels built on an encoder, and panels with a zero-shot stack.
  • Serving notes in the README: load once, pass batches, and a minimal FastAPI endpoint.

Backward compatible: nothing existing changed. export and the [onnx] extra are new.