npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

web-decision

v0.3.0

Published

Browser-local Kev 0.6B, TAMEV Nano and TAMEV Micro decision models

Readme

web-decision

[email protected] supports three browser-local decision models:

  • kev-0.6b-q4f16 uses TVM WebGPU and requires shader-f16.
  • experimental-tamev-nano-tinybert-int8 uses ONNX Runtime WebAssembly on CPU with one inference thread.
  • experimental-tamev-micro-minilm-int8 uses ONNX Runtime WebAssembly on CPU with one inference thread.

Each model uses its own pinned asset directory. The package contains JavaScript, declarations, runtime dependencies and notices; it does not contain model weights.

Install

npm install [email protected]

Kev 0.6B

Host the exact Kev asset pack at a URL your application can fetch, then pass its directory URL to the loader:

import {loadDecisionModel} from 'web-decision';

const model = await loadDecisionModel({
  assetsUrl: 'https://your-origin.example/models/kev-0.6b-q4f16/'
});

try {
  const result = await model.decide({
    state: 'A customer requests a refund for a damaged item.',
    questions: [{instructions: 'Should the refund be approved?', options: ['Approve', 'Decline']}]
  });
  console.log(result.answers[0]?.selected);
} finally {
  await model.dispose();
}

The Kev loader verifies its pinned manifest and asset hashes. The exact 0.1.0 archive passed real WebGPU tests in Chromium, Firefox and WebKit on one Apple M4 Pro. Those results apply to that archive and test device.

TAMEV Nano TinyBERT

Copy the four files from the pinned TAMEV Nano model revision to a directory your application can fetch. The required files total 15,585,045 bytes: model_int8.onnx, tokenizer.json, tokenizer_config.json and config.json.

import {loadDecisionModel} from 'web-decision';

const model = await loadDecisionModel({
  model: 'experimental-tamev-nano-tinybert-int8',
  assetsUrl: 'https://your-origin.example/models/tamev-nano-tinybert/'
});

try {
  const result = await model.systemOne(
    {payment: 'duplicate card charge'},
    {
      route: {
        type: 'choice',
        instructions: 'Select the handling queue',
        criteria: {billing: 'review a duplicate charge', fraud: 'investigate unauthorized use'}
      },
      urgent: {type: 'noul', instructions: 'Does the customer need immediate help?'},
      severity: {type: 'score', instructions: 'Rate the impact', criteria: ['low', 'medium', 'high']}
    }
  );
  console.log(result.answers.route?.choice);
} finally {
  await model.dispose();
}

The TAMEV adapter verifies each downloaded file against its pinned byte length and SHA-256 hash. It preserves option and question order, supports Choice, Noul and Score, and uses the model's calibration for option counts with a configured calibration entry. Noul returns the model's yes probability; it does not abstain.

TAMEV Nano runs through ONNX Runtime WebAssembly, not WebGPU. Its context rows allow 128 tokenizer tokens and each option row allows 48; excess text is right-truncated and reported. The package imposes no fixed option-count or question-count ceiling. Questions run sequentially and practical request size depends on available device memory.

The upstream model card reports its own quality metrics and warns that external tasks may differ. web-decision has verified browser execution and input/output behavior; it does not independently validate decision quality.

TAMEV Micro MiniLM

Copy the four files from the pinned TAMEV Micro model revision to a directory your application can fetch. The required files total 24,161,003 bytes: model_int8.onnx, tokenizer.json, tokenizer_config.json and config.json.

import {loadDecisionModel} from 'web-decision';

const model = await loadDecisionModel({
  model: 'experimental-tamev-micro-minilm-int8',
  assetsUrl: 'https://your-origin.example/models/tamev-micro-minilm/'
});

try {
  const result = await model.systemOne(
    {payment: 'duplicate card charge'},
    {
      route: {
        type: 'choice',
        instructions: 'Select the handling queue',
        criteria: {billing: 'review a duplicate charge', fraud: 'investigate unauthorized use'}
      },
      urgent: {type: 'noul', instructions: 'Does the customer need immediate help?'},
      severity: {type: 'score', instructions: 'Rate the impact', criteria: ['low', 'medium', 'high']}
    }
  );
  console.log(result.answers.route?.choice);
} finally {
  await model.dispose();
}

The adapter verifies each downloaded file against its pinned byte length and SHA-256 hash. It preserves option and question order, supports Choice, Noul and Score, and applies the model's exported probabilities plus its configured per-option-count calibration to decide(). Noul returns the model's yes probability; it does not abstain.

TAMEV Micro runs through ONNX Runtime WebAssembly, not WebGPU. Its context rows allow 128 tokenizer tokens and each option row allows 48; excess text is right-truncated and reported. The package imposes no fixed option-count or question-count ceiling. Questions run sequentially and practical request size depends on available device memory. The upstream model card's quality figures are not independently reproduced by this project.

Asset hosting and safety

The application must host model files under the supplied assetsUrl and allow browser requests from its origin. Keep the URL in trusted application configuration: the loader fetches assets from it. Decision inputs are not sent to the asset host. Model assets are not part of the npm archive; the package includes the TAMEV model notices and license files.

The Kev route also excludes its 14 inference assets. Its pinned manifest totals 349,103,828 bytes. KEV06-NOTICE and KEV-NOTICE cover the route and adapted code; review the terms that apply to the separately hosted asset files.

API

  • loadDecisionModel({assetsUrl}) loads Kev 0.6B by default.
  • loadDecisionModel({model: 'experimental-tamev-nano-tinybert-int8', assetsUrl}) loads TAMEV Nano TinyBERT.
  • loadDecisionModel({model: 'experimental-tamev-micro-minilm-int8', assetsUrl}) loads TAMEV Micro MiniLM.
  • All three sessions provide decide(), releaseCachedMemory() and dispose(). They expose typed systemOne() results for their supported protocols.
  • Use listDecisionModels(), isDecisionModel() and describeModel() to inspect the three pinned routes.
  • Use clearModelCache() to clear this library's asset cache for the current origin.

The package code is licensed under Apache-2.0. Model terms and runtime asset terms remain separate; see the included notices.