saladday1's picture
2026-11-17.8: public dashboard data, PE untracked, NSFW rule
946b77d verified
|
Raw History Blame
4 kB

Octo-patch 新场景:hf-basemodel

给 Hugging Face 上没写或写错 base_model 的下游模型提 PR,让它们出现在官方模型的 Model tree 里。

和现有 Octo-patch 的对应关系

Octo-patch 模式 本场景怎么做
scan 不自己找仓库。读生态看板每天产出的分类结果(私有数据集 MiniMaxAI/oss-ecosystem-data 的 labels/<family>/latest.parquet),hf_basemodel.py candidates 输出候选行
patch hf_basemodel.py patch --repo <id> --submit。只改模型卡 YAML 头,用 metadata_update(create_pr=True) 开 PR;不 fork、不 clone、没有 CI
follow hf_basemodel.py follow --repo <id>,返回 PR 状态(open / merged / closed)和别人的新评论;有评论时交给 Claude Code 判断要不要回复、怎么回复
digest 沿用现有日报,按 reason 统计

Repo 主表每行一个仓库,去重键沿用 repo_url + reason:

reason 含义 改法
hf-base-model-add 没写 base_model 加上官方底模
hf-base-model-fix base_model 指向了别的模型(比如 H3-Image 的衍生品写成 H3,PE 的重传写成 Qwen) 换成正确的官方底模,保留其他社区父模型(如 LoRA)
hf-base-model-relation 底模对了,但 HF 推断的关系错了(比如量化被算成微调) 加 base_model_relation

状态沿用 candidate → pr_open → merged / closed。HF 没有 CI,所以没有 ci_failed;仓库被删或设了访问限制时写 skipped。

进候选的条件

只提有把握、有影响、不尴尬的:

  • 分类置信度为"高"(有结构证据:权重文件哈希、独有的层、权重数值、训练元数据)
  • 累计下载 ≥ 100(--min-downloads)
  • 不带 NSFW 标记,没有设访问限制,不是整仓复制别人的仓库
  • 已经声明了社区父模型的不提(比如 PrunaAI/P-H3-Image-Comfy 声明了 PrunaAI/p-h3-image),只给链条源头提;否则 HF 会把"社区父模型 + 官方底模"当成融合
  • hf-base-model-relation 默认不提(--include-relation 打开):关系是作者自己选的,我们在这类上也更容易错
  • 每天最多 20 个(--limit),按近 30 天下载从高到低

只给看板上展示的成员(tracked=True)提。2026-11-17 的数据按这些条件有 56 个候选,都是"没写 base_model"。

PR 内容

标题 Add base_model metadata 或 Fix base_model metadata。正文三句:改了什么、为什么认为它基于这个底模(取分类依据里最硬的两条)、只改了 YAML 头可以随时关掉。示例:

This PR sets `base_model: MiniMaxAI/MiniMax-H3` and `base_model_relation: quantized` in the model
card metadata, so this repo shows up in the model tree of MiniMaxAI/MiniMax-H3 and people can find
it from there.

Why we think it is based on MiniMax-H3: the weights contain the audio branch (audio_patch_proj /
audio_out) that only MiniMaxAI/MiniMax-H3 has.

Only the YAML header changes; the card text is untouched. Feel free to close this if it is not right.

已验证

在私有沙盒仓库 saladday1/h3eco-pr-sandbox 上跑通了预览、提交、跟进:PR 只改 YAML 头,正文不变,main 分支不动;原来指向 Qwen 的 base_model 被正确换成 MiniMax-H3-Image-PE(Qwen 是官方 PE 自己的上游,所以视为写错)。还没有对任何别人的仓库提过 PR。

用法

python octo-hf/hf_basemodel.py candidates --family h3           # 候选行(JSON)
python octo-hf/hf_basemodel.py patch --family h3 --limit 5      # 预览前 5 个
python octo-hf/hf_basemodel.py patch --repo <id> --submit       # 真正开 PR
python octo-hf/hf_basemodel.py follow --repo <id>               # 查 PR 状态

需要 huggingface_hub、pandas、pyyaml,以及一个能在目标仓库开 PR 的 HF token(任何登录账号都能给公开仓库开 PR)。PR 作者显示为 token 对应的账号。