Skip to content

refactor: load built-in model implementations on demand - #1571

Merged
sufubao merged 3 commits into
ModelTC:mainfrom
sufubao:refactor-model-support
Sep 18, 2026
Merged

sufubao merged 3 commits into
ModelTC:mainfrom
sufubao:refactor-model-support

Conversation

@sufubao

@sufubao sufubao commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

导入 lightllm.models 原先会加载所有内置实现。现在先用轻量注册信息选择模型,仅在获取类或创建实例时导入选中的实现及其真实依赖。

  • 内置 target/draft 注册集中到 builtin.py,统一选择与兜底逻辑,保留外部 decorator 注册和历史包级类导出。
  • 修复普通 LLaVA 被文本子模型类型误判为 Tarsier 的选择规则。

@sufubao
sufubao force-pushed the refactor-model-support branch from 349d245 to 470bacb Compare September 15, 2026 06:18
@sufubao sufubao changed the title refactor: load models lazily and unify Hugging Face configuration refactor: load built-in model implementations on demand Sep 15, 2026
WANDY666
WANDY666 previously approved these changes Sep 17, 2026

@WANDY666 WANDY666 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起来是对模型做了lazy import,能加速启动服务,应该没啥问题

@sufubao
sufubao merged commit 5999048 into ModelTC:main Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants