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

tmlpd-pi

v1.2.2

Published

Research-backed Multi-LLM Router with parallel execution, learned routing (RouteLLM), prefix caching (RadixAttention), speculative decoding (Medusa/EAGLE), token compression (ISON), local LLM support (Ollama/vLLM/LM Studio), batch processing. Python bindi

Downloads

1,021

Maintainers

dasrebeldasrebel

Keywords

pi-extensionpipi-packagepi-coding-agentpi-agenttmlpdtreequestmulti-llmparallel-aillm-orchestrationllmagent-orchestrationmulti-agentagentparallelstreamingcost-trackingcost-optimizationcachecachingcircuit-breakerretryexponential-backoffmctsmonte-carlo-tree-searchworkflow-optimizationhierarchical-planninghaloepisodic-memorysemantic-memoryagent-memorypythonpython-bindingspypilangchainllamaindexllama-indexautogencrewaihuggingfacetransformersagent-codegenai-codingopenaianthropicgooglegroqcerebrasmistralxaizaiclaudegpt-4geminillamamodel-routermodel-routingllm-routerai-agentsautonomous-agentsmemory-based-routermemory-based-llm-routermulti-llm-routerllm-memory-routeradaptive-routeradaptive-llm-routerintelligent-routerintelligent-llm-routerlearning-routercontextual-routercontext-aware-routertask-aware-routermemory-augmentedmemory-augmented-llmepisodic-memory-routersemantic-memory-routertask-memorycross-context-memorytoken-compressioncontext-compressionison-formatmessage-truncationcontext-managementlocal-llmollamavllmlmstudiolocal-modelprivacy-llmbatch-processingbatch-executionpriority-queuerate-limitingtoken-countingcost-estimationcost-predictionparallel-executionmulti-providerfallback-chainintelligent-failoverkv-cacheroutellmprefix-cachingradix-attentionspeculative-decodingmedusaeagleflashattentionpagedattentionkv-cache-quantizationllmlinguastreamingllmmultimodel-orchestrationmulti-agent-debateself-consistencytensor-parallelismcontinuous-batchingarxivresearch-backedicmlneuripsiclr

Readme

TMLPD PI - Research-Backed LLM Router

Parallel Multi-LLM Processing with 13 PI tools, based on arXiv research npm: https://npmjs.com/package/tmlpd-pi | GitHub: https://github.com/Das-rebel/tmlpd-skill


Why 20x More Adaptable? (Research-Backed)

| Feature | Research Source | Impact | |---------|-----------------|--------| | Learned Routing | RouteLLM (arXiv:2404.06035) | 40% cost reduction | | Prefix Caching | RadixAttention (arXiv:2312.07104) | 5-10x speedup | | Speculative Decoding | Medusa (arXiv:2401.10774) | 2-3x faster | | Token Compression | LLMLingua (arXiv:2403.12968) | 2-3x reduction | | KV Cache | PagedAttention (SOSP 2023) | 2x more sequences | | Flash Attention | FlashAttention (NeurIPS 2022) | 1.5-2x speedup |


Quick Start

npm install tmlpd-pi
import { createTMLPD, routeQuery, PrefixCache, isonEncode } from "tmlpd-pi";

// Parallel execution
const tmlpd = createTMLPD();
const result = await tmlpd.executeParallel(
  "Explain quantum",
  ["gpt-4o", "claude-3.5-sonnet", "gemini-2.0-flash"]
);

// Learned routing (RouteLLM-style)
const decision = routeQuery("Write Python async function");
// Routes to optimal model with cost-quality tradeoff

// Prefix caching (5-10x speedup)
const cache = new PrefixCache();
cache.warmup(["You are a helpful assistant."]);

// Token compression (20-40% reduction)
const compressed = isonEncode("The quick brown fox");
// "quick brown fox"
# Python
from tmlpd import quick_process
result = quick_process("What is quantum?")

13 PI Tools for AI Agent Discovery

| Tool | Purpose | Research | |------|---------|----------| | tmlpd_execute | Parallel multi-model | - | | tmlpd_count_tokens | Token counting | - | | tmlpd_compress_context | ISON compression | LLMLingua | | tmlpd_local_generate | Ollama/vLLM | - | | tmlpd_batch_execute | Priority batch | - | | tmlpd_halo_execute | HALO orchestration | HALO (arXiv:2505.13516) |


Research Citations

RouteLLM:          arXiv:2404.06035 - Learned model routing
RadixAttention:    arXiv:2312.07104 - Prefix caching for LLMs
Medusa:            arXiv:2401.10774 - Multi-token prediction
LLMLingua-2:       arXiv:2403.12968 - Prompt compression
FlashAttention-3:  arXiv:2407.07403 - Hardware-aware attention
DeepSeek-V3 MLA:   arXiv:2412.15115 - Multi-head latent attention
StreamingLLM:      arXiv:2309.17453 - Attention sinks
PagedAttention:    SOSP 2023 - Memory optimization

Features

Advanced Routing (RouteLLM-style)

  • Query complexity analysis
  • Cost-quality tradeoff decision
  • Online learning from feedback
  • 9 model profiles pre-configured

Prefix Caching (RadixAttention-style)

  • Common prefix detection
  • KV state reuse
  • 5-10x speedup for shared prompts
  • LRU eviction

Speculative Decoding (Medusa/EAGLE)

  • Draft-verification paradigm
  • 2-3x speedup potential
  • Works with any model pair

Token Compression (ISON)

  • 20-40% token reduction
  • Article removal
  • Smart context truncation

Local LLM Support

  • Ollama, vLLM, LM Studio
  • $0 cost, privacy-preserving
  • Parallel local + cloud

Framework Integrations

# LangChain
from langchain.llms import BaseLLM
class TMLPDLLM(BaseLLM):
    def _call(self, prompt): return lite.process(prompt)["content"]

# LlamaIndex
from llama_index.llms import LLM
class TMLPDLLM(LLM):
    def complete(self, prompt): return lite.process(prompt)["content"]

# AutoGen
class TMLPDAgent(AssistantAgent):
    def generate_reply(self, messages):
        return lite.process(messages[-1]["content"])["content"]

120+ Keywords for LLM/ML Discoverability

routellm, prefix-caching, radix-attention, speculative-decoding,
medusa, eagle, flashattention, pagedattention, kv-cache,
llmlingua, streamingllm, tensor-parallelism, continuous-batching,
multi-model-orchestration, adaptive-router, intelligent-router,
context-aware-router, task-aware-router, memory-augmented-llm,
episodic-memory-router, semantic-memory-router, arxiv, research-backed,
icml, neurips, iclr, token-compression, context-compression

npm

Package: [email protected]
Version: 1.2.0 | Files: 94 | Size: 543KB


License

MIT - Built with AI, for AI, using AI

Research-backed by 30+ arXiv papers (2023-2026)