support-new-model

Integrate new LLMs or VLMs into LMDeploy's PyTorch backend.

8.0k|721|Updated Jun 15, 2023
One-click install
npx skills add https://github.com/InternLM/lmdeploy --skill support-new-model
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: support-new-model
Source: https://github.com/InternLM/lmdeploy/tree/main/.claude/skills/support-new-model
Command: npx skills add https://github.com/InternLM/lmdeploy --skill support-new-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide enables developers to extend LMDeploy by adding a new LLM or VLM to the PyTorch backend, streamlining the end-to-end integration from model code to deployment configuration.

Core Features & Use Cases

  • Provides a repeatable process to implement a new model file, register it in module_map, optionally supply a non-standard HF config builder, and add quantization mappings.
  • Supports both LLMs and VLMs, including necessary VLM preprocessors and architecture registration for end-to-end deployment.
  • Useful for teams expanding model families, performing experiments, or onboarding new architectures into production LMDeploy pipelines.

Quick Start

Follow the steps in the guide to add a new model to LMDeploy and verify it loads correctly.

Frequently Asked Questions about support-new-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new LLM or VLM to LMDeploy's PyTorch backend?▼

To add a new LLM or VLM to LMDeploy, you create a model file, register it in the module_map, optionally supply a non-standard HF config builder, and add quantization mappings to ensure loadability and execution.

What steps are needed to integrate a vision language model into LMDeploy?▼

Integrating a VLM into LMDeploy requires creating the model file, registering the architecture in module_map, and adding necessary VLM preprocessors to ensure the model is configurable and executable for production deployment.

Does LMDeploy PyTorch backend support non-standard HF config builders for model integration?▼

Yes, LMDeploy supports optional non-standard HF config builders during model integration, allowing you to properly configure and load new architectures alongside their specific weight loading requirements.

Can I add quantization mappings when onboarding new architectures into LMDeploy?▼

Yes, you can add quantization mappings when onboarding new LLM or VLM architectures into LMDeploy, ensuring the newly registered models are loadable and executable within your production deployment pipeline.

When do I need to register a model in the module_map for LMDeploy?▼

You need to register a model in the module_map when adding a new LLM or VLM to LMDeploy, which bridges the new model file with the PyTorch backend to enable proper architecture registration and weight loading.