All models
TEXT / TOPIC CLASSIFICATION

Sprig

A little order for every idea.

Turn a passage into a topic. Six useful categories, a compact classifier, and no network round trip.

Artifact size31.3 KB
RunsLocally
Output classes6
Release stageResearch
01 / WHAT IT DOES

One focused task.
A closer look.

Sprig assigns a passage to one of six broad English topics. Its small vocabulary makes it useful for studying local classification and content-routing interfaces. It cannot invent new categories or assign multiple topics.

TechnologyScienceFinanceSportsArtsEveryday

Research v0.1.0 · A statistical classifier, not a generative foundation model.

  1. 01

    Find word patterns

    Lowercase the input and extract Unicode words plus adjacent word pairs.

  2. 02

    Score six topics

    Use the vocabulary counts learned from the training sentences to compute a score for each topic.

  3. 03

    Return one category

    Rank the topics and return one label. Ambiguous passages can receive a confident wrong answer.

02 / TRY IT HERE

Get a feel for Sprig.

Actual model inference, inside your browser.
No input is uploaded.

MODEL OUTPUT

Ready when
you are.

Scores are relative model outputs, not calibrated confidence.

Know the boundaries. Six fixed English categories and a small authored training set. Broad, ambiguous, and unfamiliar topics may not fit the taxonomy.
03 / IDEAS TO EXPLORE

What could you make?

Starting points for prototypes.
Validate the model for your use case.

01

Suggest a category when saving a note.

Prototype suggested tags for saved notes, with a review step before accepting a category.

Build with Sprig
02

Group a reading list by subject.

Explore a reading-list interface that groups items into six fixed topics.

Build with Sprig
03

Explore lightweight content routing.

Compare a tiny statistical classifier with a richer model on your own labeled examples.

Build with Sprig
04 / DATA, WITH CONTEXT

What went into Sprig.

Read the model card

Where the examples came from

60 English sentences authored by the coding assistant: ten per topic, written directly in the training script. They are short illustrative examples, not news articles, web documents, or an independently labeled dataset.

How the split works

Eight sentences per class are used for training and the last two per class for evaluation. Both sets come from the same small authored collection.

No third-party model weights, external datasets, or user inputs were used to train this version. Training records are kept private. We publish weights, model cards, aggregate results, and the limitations of each release.

TRAINING SUMMARY

Multinomial naïve Bayes · words and word pairs

Weights you can inspect.

Each release includes its model card, measured artifact size, and SHA-256 checksum. Training data and working checkpoints stay private.

Download model card
05 / GETTING STARTED

Build with Sprig.

Full SDK guide

Use the local workspace packages today. These packages have not been published to npm or Maven Central.

Node.js / TypeScript

Run from the repository root, then import the model from a workspace example.

bun install
bun run sdk:build

Kotlin / JVM

With JDK 17+ and Gradle 8.10+, publish the modules to your local Maven repository.

gradle test
gradle publishToMavenLocal
Local Gradle dependency
repositories {
    mavenLocal()
    mavenCentral()
}
dependencies {
    implementation("dev.embermote:sprig:0.1.0")
}

Kotlin/JVM tests pass. Android device validation, Swift, and native Core ML/LiteRT adapters are not available.

import { createModel } from '@embermote/sprig';

const model = createModel();
const input = "Investors expect stock market profits to grow.";

const result = model.predict(input);
console.log(result.label);
// Scores are not calibrated confidence.
Local artifact → local inferenceNo API key.
06 / SPECIFICATIONS

Specs.

Model
Multinomial naïve Bayes · words and word pairs
Input
An English text string, up to 20,000 UTF-16 code units.
Output
A label, ranked scores, and a supported flag. Scores are uncalibrated; supported is not a guarantee that the input is in distribution.
Classes
Technology, Science, Finance, Sports, Arts, Everyday
On-device size
31.3 KB · downloadable JSON weights · v0.1.0
Size includes
Labels, vocabulary or numeric statistics, and learned weights. Excludes SDK code, application assets, download compression, and runtime memory.
Platforms
Browser and Node.js via TypeScript runtime; Kotlin/JVM via bundled resources.
License
MIT for the original code and research artifacts.
Status
Research baseline · not published to package registries
SHA-256
040bbf25067e2b3efac9f8767e07fcd03c2bd4401466c3c44797591e5f9abe00
07 / GOOD QUESTIONS

A little more clarity.

Can I create my own topics?

The current artifact has six fixed labels. You can change the training data and rebuild, but adding new labels requires training a new artifact and evaluating it.

Does my input leave the device?

Inference runs locally. The website and artifact download make ordinary network requests, but the demos do not upload your input. Bundled SDK inference does not need an inference server.

Why is the model so small?

Sprig stores a compact statistical representation for a narrow task. Its 31.3 KB artifact is not equivalent to a neural model of a different size, and the file size is not its total runtime memory.

Is the model ready to ship in my product?

This is a research baseline. Independent evaluation, task-specific acceptance criteria, real-device measurements, and release packaging remain necessary before production use.

KEEP EXPLORING

The open notebook.

Inspect the pieces behind this model.