ai-setup 6 min read

llmpm – npm for LLMs

A CLI package manager for open-source LLMs. Install, run and serve 10,000+ models from HuggingFace, Ollama and Mistral with a single command.

By
Share: X in
llmpm CLI — npm for LLMs

TL;DR

TL;DR: llmpm brings the familiar pip/npm workflow to open-source LLMs — install a model, run it interactively or serve it as an OpenAI-compatible API, all from the command line.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

What Is llmpm?

llmpm (LLM Package Manager) is a CLI tool that brings the developer ergonomics of pip and npm to large language models. Instead of manually downloading model files, configuring inference servers, and wrangling dependencies, you install a model with one command and run it immediately.

The tool pulls from three open-source model hubs:

  • HuggingFace Hub — 10,000+ Transformer checkpoints and GGUF files
  • Ollama — Ollama’s curated model library
  • Mistral AI — Mistral’s officially distributed models

Supported modalities include text generation (via llama.cpp and Transformer checkpoints), image generation (diffusion models), vision/multimodal, speech-to-text (ASR), and text-to-speech (TTS).

Installation

llmpm ships as a lightweight CLI bootstrap that auto-creates an isolated Python environment on first run. System Python is never touched.

pip install llmpm

via npm

npm install -g llmpm

via Homebrew

brew tap llmpm/llmpm
brew install llmpm

The first llmpm command you run triggers the automatic setup of ~/.llmpm/venv, where all ML backends live. Set LLPM_NO_VENV=1 to skip the virtual environment in CI or Docker contexts.

Quick Start

# Install a model
llmpm install meta-llama/Llama-3.2-3B-Instruct

# Run it interactively
llmpm run meta-llama/Llama-3.2-3B-Instruct

# Serve it as an OpenAI-compatible API
llmpm serve meta-llama/Llama-3.2-3B-Instruct

Key Commands

| Command | Description | |---|---| | llmpm install [repo] | Download and install a model from HuggingFace, Ollama or Mistral | | llmpm run [repo] | Run an installed model interactively | | llmpm serve [repo] | Serve one or more models as an OpenAI-compatible API | | llmpm serve | Serve every installed model on a single HTTP server | | llmpm benchmark [repo] | Run evaluation benchmarks against an installed model | | llmpm push [repo] | Upload a model to HuggingFace Hub | | llmpm search [query] | Search HuggingFace Hub for models | | llmpm list | Show all installed models | | llmpm info [repo] | Show details about a model | | llmpm uninstall [repo] | Uninstall a model | | llmpm trending | Show top trending models by likes | | llmpm clean | Remove the managed environment |

Global vs. Local Mode

llmpm operates in two modes depending on whether a llmpm.json manifest file is present.

Global mode (default): All models are stored in ~/.llmpm/models/ and the registry lives at ~/.llmpm/registry.json. This is the default when no llmpm.json is found in the current directory or any parent.

Local mode: When a llmpm.json file exists in the current directory, llmpm switches to local mode. Models are stored in .llmpm/models/ next to the manifest, keeping project-level models isolated from your global environment.

my-project/
├── llmpm.json        ← manifest
└── .llmpm/           ← local model store (auto-created)
    ├── registry.json
    └── models/

All commands automatically detect the active mode and operate on the correct store — no extra flags needed.

Serving Models as an OpenAI-Compatible API

One of llmpm’s most practical features is llmpm serve, which spins up an HTTP server exposing installed models via an OpenAI-compatible endpoint. This lets you point existing tools (clients, proxies, evaluation pipelines) at your locally running models without code changes.

# Serve a specific model
llmpm serve meta-llama/Llama-3.2-3B-Instruct

# Serve every installed model on one server
llmpm serve

Practical Evaluation Checklist

  • pip install llmpm completes without system Python pollution
  • llmpm install [small-model] downloads and sets up the model
  • llmpm run [model] opens an interactive REPL
  • llmpm serve [model] starts an HTTP server on a local port
  • llmpm list shows the installed model with correct metadata
  • llmpm info [repo] returns size, architecture, and source hub
  • LLPM_NO_VENV=1 llmpm run [model] bypasses the virtual environment as documented
  • Local mode activates correctly when llmpm.json is present

Security Notes

  • All ML backends run inside ~/.llmpm/venv — isolated from system Python
  • LLPM_NO_VENV=1 should only be used in controlled CI or container environments
  • Model files are downloaded from HuggingFace, Ollama and Mistral — verify your network trust posture before large-scale deployment

FAQ

Q: How does llmpm compare to Ollama?

A: Ollama is a standalone inference runtime with its own model library and management commands. llmpm aggregates across HuggingFace, Ollama and Mistral in a single tool, and its llmpm.json manifest format lets you pin exact model versions per project — something Ollama handles differently.

Q: Does llmpm work on Windows?

A: The primary installation paths are pip, npm and Homebrew. Windows support via those channels has not been explicitly tested in the README — check the GitHub issues for current Windows compatibility status.

Q: How much disk space do models use?

A: It depends entirely on the model. A 3B-parameter GGUF file is typically 2–6 GB. llmpm info [repo] shows model details including approximate size before downloading.

Q: Can I use llmpm in a Docker container?

A: Yes. Set LLPM_NO_VENV=1 to skip the virtual environment creation when running inside a container where isolation is already provided.

Conclusion

llmpm solves the “how do I actually run this open-source model” problem by abstracting away the backend complexity. If you regularly switch between models across projects — or just want a one-command path from pip install to interactive chat — it removes the boilerplate that normally eats an afternoon.

The local/global mode distinction is particularly well-designed for teams: commit a llmpm.json, and every collaborator gets the same model versions with the same two commands.

Project: llmpm.co | GitHub: github.com/llmpm/llmpm-dev