Skip to content
Back to skills

Pipeline Inference

ASecurity

"Use LMDeploy pipeline APIs and chat CLI for offline text LLM

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
developmentpythonrustbashgitapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill pipeline-inference --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pipeline Inference?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pipeline Inference
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-pipeline-inference/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-pipeline-inference)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pipeline-inference
description: "Use LMDeploy pipeline APIs and chat CLI for offline text LLM
  inference, streaming, sessions, generation settings, backend configs, and chat
  templates."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Pipeline Inference

Use this sub-skill when the task is offline text LLM inference through `lmdeploy.pipeline`, `Pipeline`, or `lmdeploy chat`.

## Read First

- `references/api-reference.md` for exact constructors, methods, response fields, and config defaults.
- `references/workflows.md` for copy-ready offline inference patterns, batch prompts, streaming, sessions, LoRA, logits, hidden states, and PPL.
- `references/chat-templates.md` for JSON chat templates, Python registration, prompt-format mismatch diagnosis, and safe inspection.
- `references/troubleshooting.md` for OOM, multiprocessing, missing TurboMind extension, stop-token, model download, and trust boundary failures.
- `scripts/inspect_pipeline_config.py` for no-download inspection of installed API signatures, dataclass defaults, chat-template registry names, and CLI availability.

## Scope

Own these tasks:

- Create an offline text pipeline with `from lmdeploy import pipeline` and `TurbomindEngineConfig` or `PytorchEngineConfig`.
- Run single prompts, batches, OpenAI-style messages, streaming output, and multi-turn chat sessions.
- Tune `GenerationConfig`, `cache_max_entry_count`, `tp`, `session_len`, `max_batch_size`, LoRA adapters, and chat templates for inference.
- Inspect logits, last hidden states, token lengths, finish reasons, and PPL without designing a server.
- Use `lmdeploy chat` for local interactive text inference and CLI smoke checks.

Route elsewhere:

- Multimodal media loading, image/video prompt construction, and VLM-specific formatting: `vision-language`.
- REST/gRPC/OpenAI-compatible servers, proxy, API clients, and API-server auth: `serving-apis`.
- Creating AWQ/GPTQ/SmoothQuant artifacts with `lmdeploy lite`: `quantization`.
- New architecture patches, backend internals, custom kernels, or model support development: `backend-extension`.

## Fast Start

```python
from lmdeploy import GenerationConfig, TurbomindEngineConfig, pipeline

backend_config = TurbomindEngineConfig(cache_max_entry_count=0.6, tp=1)
gen_config = GenerationConfig(max_new_tokens=128, top_p=0.9, temperature=0.7)

with pipeline("org/model-or-local-path", backend_config=backend_config) as pipe:
    responses = pipe(["Explain LMDeploy in one sentence.", "List two use cases."], gen_config=gen_config)
    for response in responses:
        print(response.text)
```

For PyTorch backend, use `PytorchEngineConfig(...)`. When `tp > 1` with PyTorch in a script, wrap pipeline creation in `if __name__ == "__main__":`.

## Validation

Use these checks before recommending or shipping an offline pipeline workflow:

```bash
python sub-skills/pipeline-inference/scripts/inspect_pipeline_config.py --include-cli
lmdeploy chat --help
```

These checks do not download a model. Model execution requires the user’s chosen model weights, backend dependencies, GPU/accelerator memory, and any required `trust_remote_code` decision.

Files in this skill

  • SKILL.md3.1 KB
  • references/api-reference.md9.7 KB
  • references/chat-templates.md6.3 KB
  • references/troubleshooting.md7.8 KB
  • references/workflows.md10.9 KB
  • scripts/inspect_pipeline_config.py6.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.