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

llama-local

v1.1.7

Published

llama.cpp CLI tool - pure Node.js, no Python required. Download & run GGUF models from HuggingFace, ModelScope, or Ollama Registry. One-command setup for llama.cpp binaries.

Readme

llama-local

llama.cpp CLI 快捷工具 — 纯 Node.js,零依赖,三源合一,开箱即用

安装

npm install -g llama-local

仅需 Node.js >= 14,无需 Python,无需手动安装 llama.cpp。

快速开始

# 首次使用:下载 llama.cpp 二进制
llama setup

# 下载模型
llama pull qwen2.5:3b

# 运行模型
llama run qwen2.5:3b

# 启动 API 服务
llama serve qwen2.5:3b

# 查看已安装
llama list

# 删除模型
llama rm qwen2.5:3b

命令别名

三个命令名均可使用:llama / llama-cli / llama-local

核心优势

1. 纯 Node.js,零依赖

无需 Python,无需手动安装 llama.cpp。npm install -g 后跑一次 llama setup 自动下载对应平台的 llama.cpp 二进制。

2. 三源合一,无需前缀

自动从 HuggingFace / ModelScope / Ollama Registry 判断并下载模型,一句命令搞定:

llama run granite4.1:3b    # Ollama Registry
llama run qwen2.5:3b       # HF / ModelScope 内置别名
llama run https://...      # 直接 URL

3. 零守护进程,更省内存

不像 Ollama 常驻后台吃内存,直接调用 llama.cpp,用完即走。8GB 内存轻松跑 3B 模型。

4. 国内下载加速

内置别名模型优先走 hf-mirror.comModelScope,国内下载更快更稳。

5. 智能自动调优(上下文可调)

根据模型大小自动匹配最优参数,默认上下文 4096,可通过 -c 参数自由调整:

llama run qwen2.5:3b -c 8192    # 自定义上下文

| 模型大小 | 线程 | 上下文 | 批处理 | 策略 | |---------|------|--------|--------|------| | < 300MB | 6 | 16K | 512 | 全速 + mlock | | < 600MB | 6 | 8K | 512 | 高并发 | | < 1.2GB | 4 | 8K | 256 | 平衡 | | < 2.5GB | 4 | 4K | 256 | 保守 | | < 5GB | 4 | 4K | 128 | 省内存 | | ≥ 5GB | 2 | 4K | 64 | 极限省内存 |

6. 丰富的模型别名

内置 30+ 热门模型,支持 Ollama 风格和传统命名:

| 系列 | 模型 | |------|------| | Qwen | qwen2.5:0.5b / 1.5b / 3b / 7b / 14b, qwen3:0.6b / 1.7b | | Qwen Coder | qwen2.5-coder:1.5b / 3b / 7b | | Llama | llama3.2:1b / 3b, llama3.1:8b | | DeepSeek | deepseek-r1:1.5b / 7b / 8b / 14b, deepseek-coder:1.3b / 6.7b | | MiniCPM | minicpm:2b, minicpm3:4b, minicpm4:4b | | Gemma | gemma2:2b / 9b | | Phi | phi3:mini, phi3.5, phi4:mini | | ChatGLM | chatglm3:6b, glm4:9b | | Mistral | mistral:7b, mistral-nemo | | 更多 | Yi, InternLM, TinyLlama, SmolLM2, CodeLlama, Starling, Dolphin... |

7. 全平台支持

Windows / macOS / Linux 通用,有 Node.js 就能跑。

与 Ollama 对比

| 特性 | llama-local | Ollama | |------|-------------|--------| | 安装方式 | npm install -g | 安装包 | | 额外依赖 | 仅 Node.js | 仅安装包 | | 守护进程 | 无 | 常驻后台 | | 下载源 | HF + ModelScope + Ollama | Ollama Registry | | 国内加速 | 内置 | 需配置 | | 自动调优 | 按硬件优化 | 默认参数 | | 上下文 | 默认 4096,可调 | 默认 2048 | | 内存占用 | 更低 | 常驻 ~200MB+ | | 模型库 | 30+ 别名 + 全部 Ollama 模型 | 官方模型库 |

许可证

MIT