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

@fanalis/models

v0.1.0

Published

Hardware tier detection + ML/DL model registry + lazy loader for the Fanalis audit toolkit.

Downloads

118

Readme

@fanalis/models

ml model loader + registry + hardware tier detection.

what's here

  • loader.tscreateLoader({noDownloads, log})ModelLoader. handles download (with AbortSignal.timeout + 2× declared size cap), sha256 verify, on-disk cache, concurrent-call dedup via inflight promise map.
  • registry.tsMODEL_REGISTRY: Record<ModelEntry> — pin source repo + revision + size + license + optional sha256. v1 only registers entries that actually resolve on huggingface; vapor models are commented out at the bottom.
  • tier-detect.tsdetectHardware()HardwareProfile (cpu cores, mem GB, gpu kind, apple silicon family). picks suggested + ceiling tier.
  • cache.ts — XDG-aware cache paths ($XDG_CACHE_HOME/fanalis/{models,work,reports} or ~/Library/Caches/fanalis/* / ~/.cache/fanalis/* per platform).
  • reports.ts — atomic report persistence: <id>.json + <id>.meta.json + latest.json + index.json. prefix-id resolution. prune to FANALIS_MAX_REPORTS (default 200).

what's actually registered

3 entries in v1:

  • clip-vit-b32Xenova/clip-vit-base-patch32 (real, downloadable). image+text encoders for value-prop coherence checks. used by visual + conversion pillars at T≥4.
  • qwen-1_5b-ollamaqwen2.5:1.5b via local ollama. narrative orchestrator at T≥3.
  • qwen-7b-ollamaqwen2.5:7b via local ollama. narrative at T≥4.

models intentionally NOT registered (commented as post-v1 targets): laion-aesthetics, nima, uiclip, deepgaze, yolov8-ui, distilbert-cialdini, distilbert-cognitive, distilbert-secret-ner, amalfi-xgboost, llava-critic. each lists the missing primitive (no public ONNX export, training pipeline pending, etc.) so it doesn't drift to "claimed but not implemented".

checksum behaviour

if a registry entry has a pinned sha256, the loader verifies it. if not, the loader downloads + reports the computed sha so the maintainer can pin retroactively (Model X downloaded UNVERIFIED. To pin, add to registry: sha256: "..."). cache hits without a pin also log the unverified-load warning.

the 2× size cap catches grossly-oversized payloads, but a malicious mirror serving exactly the right size still passes without a pinned hash. registry pinning is the load-bearing primitive.

onnx runtime

loadONNX(modelId) lazy-imports onnxruntime-node and prefers coreml on apple silicon, cuda when CUDA_VISIBLE_DEVICES is set, cpu otherwise. session is cached per-modelId across the run. release() closes + drops the cache entry.

caveats

  • noDownloads: true makes any missing model throw MissingModelError instead of fetching. CLI surfaces this when the user passes --no-downloads.
  • loadTokenizer(modelId) requires the entry to be source.type: "hf". raises if you try it on an ollama entry.
  • ollama entries don't get downloaded by loader.ts — they live in the ollama daemon's cache. ensure() returns the model name (e.g. qwen2.5:1.5b) as the "path".