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

@tensor-cad/engine

v0.1.21

Published

The TensorCAD analysis engine, compiled from Go to WebAssembly, with its TypeScript client

Readme

@tensor-cad/engine

The TensorCAD analysis engine: one WebAssembly module with a JSON interface, and the TypeScript that loads it.

Give it a design and it tells you what the design costs — parameters, FLOPs, KV cache, memory at an operating point, throughput, dollars — checks it against eighteen design rules, writes the PyTorch, and searches for a way to train it on a cluster. The same module answers in a browser, in a Node process and inside the desktop shell, so an answer cannot depend on where it was asked.

Using it

In a browser or anything with fetch:

import { createEngine } from "@tensor-cad/engine";
import "@tensor-cad/engine/wasm_exec";

const engine = await createEngine({ wasm: "/tensorcad.wasm" });
const doc = engine.preset("llama-3-8b");
console.log(engine.analyze(doc).params.total); // 8030261248

From a Node process, where the module is read rather than fetched and held as a singleton:

import { analyze, getPreset, loadEngine } from "@tensor-cad/engine/node";

await loadEngine();
const report = analyze(getPreset("mixtral-8x7b"), { T: 4096 });
console.log(report.params.total, report.params.active);

wasm_exec.js is Go's own loader, vendored from the toolchain that built the module. The two travel together or neither works.

What it answers

| call | what it gives | | --- | --- | | analyze(doc, options) | every number at once | | validate(doc, options) | the design rules, and the analysis they ran against | | derive(doc, options) | the findings and every shape from one walk of the graph | | infer(doc, mode) | the shapes alone, for the wire the pointer is over | | explain(doc, path) | one block: its parameters as written and as evaluated, its shapes, its share | | generateTorch(doc, options) | a model.py and the design that produced it | | scale(doc, {targetParams}) | the design shrunk to a budget, proportions kept | | mup(doc, options) | the same design at several widths, and what to scale by at each | | plan(doc, options, {gpus}) | every way to split the training across a cluster, and which fit | | importHuggingFace(text) | a config.json read into a design | | preset(name), presets() | the twenty designs it ships with | | catalog(), rules(), hardware() | what it knows about blocks, rules and devices |

Everything crosses as JSON text. A design is JSON and so is every report, so serializing costs a copy and buys a boundary with nothing clever in it. A call that cannot answer throws an EngineError naming what was wrong rather than returning a default.

What it is held to

packages/core-go/testdata in the repository: the symbol table and inferred shapes for twenty published architectures, the full analysis and the design-rule check at three operating points each, and every byte of three generated model.py variants. Seventeen of the twenty reproduce their published parameter count exactly and the other three are within a stated tolerance, and every one of them has been instantiated in PyTorch to confirm the count is real — up to DeepSeek-V3 at 671,026,419,200.

Building it

bun run build:wasm

from the repository root. The output lands in wasm/ and is not committed, so a fresh clone builds it before anything works.

MIT. See LICENSE.md.