Skip to content

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/model_analysis.md

View on GitHub
# 模型结构分析指南

## 1. 确认模型结构来源

- 读取 `config.json` 的 `model_type`、`architectures`、`auto_map`
- 确定结构来自模型仓内 `modeling_*.py` 还是 transformers 官方实现

## 2. 定位并阅读模型实现(必须)

- **自定义实现**:如果 `auto_map` 指向自定义实现(如 `modeling_xxx.XXXForCausalLM`),优先阅读模型目录中的 `modeling_*.py`
- **官方实现**:如果使用 transformers 官方实现,通常在:
  - 源码路径:`transformers/src/transformers/models/<model_type>/modeling_<model_type>.py`
  - 导入路径:`transformers.models.<model_type>.modeling_<model_type>`
- **重点阅读**:
  - DecoderLayer 定义
  - attention/MLP 命名
  - `forward` 入参与返回值
- **MoE 模型额外检查**:
  - `experts` 权重是否为 3D packed 结构(如 `experts.gate_up_proj` / `experts.down_proj`)
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall