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

termux-bitnet

v1.0.16

Published

Production 1.58-bit (i2_s) BitNet On-Device Inference SDK & Thin Gateway for Node.js on Android Termux & ARM64

Readme

termux-bitnet (npm)

Ultra-lightweight Node.js & TypeScript Thin Gateway for 1.58-bit (i2_s) BitNet On-Device Inference on Android Termux & ARM64.


1. Overview & Architecture

termux-bitnet provides an idiomatic, zero-overhead Node.js / TypeScript gateway to execute 1.58-bit quantized large language models (BitNet b1.58) directly on Android Termux and ARM64 Linux devices.

The underlying tensor operations and SIMD vectorizations are computed by the native C++ NEON engine (libtermux_bitnet), while this npm package provides non-blocking stream APIs, hardware diagnostics, and zero-conflict CLI tooling.

[Node.js / TypeScript Application]
       │
       ▼ (createEngine / BitNetEngine)
[termux-bitnet npm Thin Gateway]
       │
       ▼ (Process IPC / C ABI Boundary)
[Native C++ BitNet Core] ──► ARM64 NEON + DotProd SIMD Vector Kernels

2. Installation

# Global installation (Provides termux-bitnet-js CLI)
npm install -g termux-bitnet

# Or local project dependency
npm install termux-bitnet

3. CLI Usage

# 1. Hardware Diagnostic (Check NEON & DotProd SIMD Acceleration)
termux-bitnet-js info

# 2. List Available Verified Models
termux-bitnet-js models

# 3. Download Model
termux-bitnet-js download bitnet-2b

# 4. Run On-Device Inference
termux-bitnet-js run -p "Explain quantum computing in one sentence." -t 4 --temp 0.7 --top-p 0.95

4. Programmatic JavaScript & TypeScript API

4.1 Token Streaming (Recommended)

const { createEngine } = require('termux-bitnet');

async function main() {
  const engine = createEngine({
    threads: 4,
    temperature: 0.7,
    topP: 0.95,
    topK: 40,
    repeatPenalty: 1.15,
  });

  console.log('[Prompt]: Explain quantum computing in one sentence');
  console.log('[Response]: ');

  await engine.generateStream(
    'Explain quantum computing in one sentence',
    64,
    (token) => {
      process.stdout.write(token);
    }
  );
  console.log('\n');
}

main();

4.2 Promise-based Completion

import { createEngine, BitNetOptions } from 'termux-bitnet';

const options: BitNetOptions = {
  threads: 4,
  contextSize: 2048,
  temperature: 0.5,
};

const engine = createEngine(options);
const response = await engine.generate('Write a Python palindrome function:', 64);
console.log(response);

4.3 Programmatic Model Downloader

const { downloadModel, listModels } = require('termux-bitnet');

async function setup() {
  listModels();
  const modelPath = await downloadModel('bitnet-2b');
  console.log(`Model ready at: ${modelPath}`);
}

setup();

5. Verified BitNet GGUF Models

| Model Alias | Parameters | Quantization | File Size | Recommended Device | |---|---|---|---|---| | bitnet-2b | 2.4B | i2_s | 1.13 GB | Flagship Phones (Galaxy S20+, S24, S25, Pixel) | | bitnet-large | 0.7B | Q4_0 | 404 MB | Entry-level / Low-RAM ARM64 Devices | | bitnet-3b | 3.3B | q1_3 | 730 MB | High-Capacity Mobile Workstations | | bitnet-3b-q4 | 3.3B | Q4_0 | 1.83 GB | High-Precision Q4 Quantized Model |


6. Official Resources


7. License

Apache License 2.0. Copyright (c) 2026 uno-km (AMEVA Foundation).