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

@rn-ai/litert

v0.2.0

Published

LiteRT-LM AI SDK 7 provider using Nitro Modules

Readme

@rn-ai/litert

Nitro AI SDK 7 V4 provider for the official LiteRT-LM 0.14 SDK. Supports .litertlm text generation, streaming, tools/JSON, local file image/audio inputs, speculative decoding, and CPU/GPU/NPU preference with CPU fallback.

The official iOS CLiteRTLM.xcframework is fetched only from the URL and SHA-256 configured in native-artifacts.json. Android pins com.google.ai.edge.litertlm:litertlm-android:0.14.0 and builds with JDK 21.

Download and run a model

The native framework and the model are separate downloads. Install the native dependency while building the app, then use runtime download for model weights on both iOS and Android. This example uses a public small FunctionGemma 270M LiteRT-LM artifact:

import { generateText } from 'ai'
import { createOnDeviceRuntime } from '@rn-ai/core'
import { createLiteRTProvider, defineLiteRTModel } from '@rn-ai/litert'

const runtime = createOnDeviceRuntime()
const litert = createLiteRTProvider({
  runtime,
  models: {
    functions: defineLiteRTModel({
      source: {
        kind: 'remote',
        url: 'https://huggingface.co/litert-community/functiongemma-mobile-actions_q8_ekv1024.litertlm/resolve/82d0f654a6270c518d16c600edce3136221b3347/mobile-actions_q8_ekv1024.litertlm?download=true',
        sizeBytes: 284_426_240,
        sha256: '92109695f911d1872fa8ae07c1e3ff0ed70f2c3d1690d410ec6db8587c2ab409',
        fileName: 'functiongemma-mobile-actions-q8-ekv1024.litertlm',
      },
      contextTokens: 1024,
    }),
  },
})

const model = litert.languageModel('functions')
await model.control.download({
  onProgress: ({ fraction }) => console.log(`${Math.round(fraction * 100)}%`),
})
await model.control.prepare()
console.log((await generateText({ model, prompt: 'Say hello in one sentence.' })).text)

The runtime stores and reuses the verified .litertlm file in the app-private model cache. The user does not need to choose a local path. Use AbortController to cancel, model.control.remove() to delete the cache entry, and immutable Hugging Face revisions plus exact Git LFS metadata when adding other model choices. Check each model's license and device-memory requirements.