kali20gakki/msAgent / skills/quantizer/msmodelslim-model-adapt
msmodelslim-model-adapt
Verified为 msModelSlim 创建基础 Transformers 模型适配器(Model Adapter)。 包含创建适配器、实现必需接口与注册安装流程。 适用:Decoder-only LLM、理解类 VLM(仅 LLM/text 部分)。 多模态生成(DiT/扩散,含双/多专家)见下方「多模态生成扩展」节,按需加载。 不适用:Encoder-only、非 Transformers 架构。
references/registration_guide.md
View on GitHub# 适配器注册指南
在 `config/config.ini` 中注册模型与入口。
## 示例
```ini
[ModelAdapter]
my_model = MyModel-7B, MyModel-13B
[ModelAdapterEntryPoints]
my_model = msmodelslim.model.my_model.model_adapter:MyModelAdapter
```
注册完成后,务必执行 `bash install.sh` 安装更新。
## DiT / 多模态生成模型
### 单网络 DiT
```ini
[ModelAdapter]
my_dit = MyDiT-Model
[ModelAdapterEntryPoints]
my_dit = msmodelslim.model.my_dit.model_adapter:MyDiTModelAdapter
```
### 双/多专家 DiT(每个场景一个 loader)
```ini
[ModelAdapter]
my_model_scene_a = MyModel-SceneA
my_model_scene_b = MyModel-SceneB
[ModelAdapterEntryPoints]
my_model_scene_a = msmodelslim.model.my_model.scene_a.loader:MySceneAAdapterLoader
my_model_scene_b = msmodelslim.model.my_model.scene_b.loader:MySceneBAdapterLoader
```
### 注册名与 alias
- 注册名(key)必须命中 `[ModelAdapter]` 中声明的别名之一
- `--model_type` 传 key / alias 任一都可命中
### 与 LLM/VLM 共用注册机制
DiT 与 LLM/VLM 共用同一 `config/config.ini`;不引入新的注册路径。
### 旧版 Legacy 入口(**仅供主仓历史模型保留**)
> **新接入的 DiT 模型必须统一实现 `MultimodalPipelineInterface`**(重构路径);不再注册到 `LegacyMultimodalPipelineInterface` 入口。
>
> 历史以 Legacy 注册的 `model_type`(如 `flux1` / `wan2_1`)需在本项目中迁移到重构路径,由 `msmodelslim-model-adapt` 改造主仓入口模块。
---
## 重要:注册名必须与主仓一致
- `model_type`(注册 key)必须与 `msmodelslim/config/config.ini` 主仓完全一致
- 新接入模型按 `model_type` 与权重目录 `config.json` 中的字段一致,或使用 `<org>/<model>` 别名Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |