学术科研
在 Hugging Face Hub 上发布、索引…
通过 paper_manager.py 脚本把 arXiv 论文索引到 HF Paper Pages、链接到模型/数据集/Space、认领作者身份并生成研究论文模板。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 38/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 60/100 ×0.15
适用场景
在 Hugging Face Hub 上特定
解决思路
- 用 `uv run` 运行 `scripts/paper_manager.py`(依赖写在脚本头部,无需手动装环境),并先 `cd` 到 SKILL.md 所在目录或使用完整路径
- 设置 `HF_TOKEN` 环境变量为具有写权限的 token
- 索引 arXiv 论文:`uv run scripts/paper_manager.py index --arxiv-id "2301.12345"`;也可直接访问 `https://huggingface.co/papers/{arxiv-id}` 触发索引
- 检查论文是否已存在:`uv run scripts/paper_manager.py check --arxiv-id "2301.12345"`
- 把论文链接到模型卡:`uv run scripts/paper_manager.py link --repo-id "username/model-name" --repo-type "model" --arxiv-id "2301.12345"`
- 把论文链接到数据集卡:把 `--repo-type` 改为 `dataset`,其余同上
- 一次链接多篇论文:用 `--arxiv-ids "2301.12345,2302.67890,2303.11111"`
- 带自定义引用链接:追加 `--citation "$(cat citation.txt)"`
- 认领作者身份:`uv run scripts/paper_manager.py claim --arxiv-id "2301.12345" --email "your.email@institution.edu"`;也可在论文页点击自己名字选 “Claim authorship” 等待管理员审核
- 检查作者身份状态:`uv run scripts/paper_manager.py check-authorship --arxiv-id "2301.12345"`
- 列出自己的论文:`uv run scripts/paper_manager.py list-my-papers`
- 切换论文在个人主页的可见性:`uv run scripts/paper_manager.py toggle-visibility --arxiv-id "2301.12345" --show true`,或在账号设置 → Papers 中切换 “Show on profile”
- 从模板创建研究论文:`uv run scripts/paper_manager.py create --template "standard" --title "Your Paper Title" --output "paper.md"`,模板可选 `standard`、`modern`、`arxiv`、`ml-report`
- 生成完整论文:追加 `--authors "Jane Doe, John Smith"` 和 `--abstract "$(cat abstract.txt)"`
- 把 Markdown 转 HTML:`uv run scripts/paper_manager.py convert --input "paper.md" --output "paper.html" --style "modern"`
- 在模型/数据集 README 中写正确的 YAML frontmatter(language、license、tags、library_name 等),并在正文中放入 arXiv 链接(如 `https://arxiv.org/abs/2301.12345`),Hub 会自动提取并生成 `arxiv:<PAPER_ID>` 标签
- 在 README 中加入 BibTeX 引用块以便他人引用
- 批量链接多篇论文到同一仓库:用 for 循环对每个 arxiv_id 调用 `link`
- 提取论文元数据:`uv run scripts/paper_manager.py info --arxiv-id "2301.12345" --format "json"`
- 生成 BibTeX 引用:`uv run scripts/paper_manager.py citation --arxiv-id "2301.12345" --format "bibtex"`
- 校验仓库中的论文链接:`uv run scripts/paper_manager.py validate --repo-id "username/model-name" --repo-type "model"`
- 搜索论文:`uv run scripts/paper_manager.py search --query "transformer attention"`
- 在 Python 中调用:`from scripts.paper_manager import PaperManager`,用 `PaperManager(hf_token=...)` 后调用 `index_paper`、`link_paper`、`check_paper` 等方法
- 遇到 “Paper not found” 时访问 `hf.co/papers/{arxiv-id}` 触发索引;遇到 “arXiv tag not appearing” 时确认 README 中的 arXiv URL 格式正确;遇到 “Cannot link to repository” 时确认 HF_TOKEN 有写权限
适用边界 · 注意事项
- 没有 Hugging Face 账号或没有写权限的 HF_TOKEN 时无法链接仓库或认领作者身份
- 论文不在 arXiv 上(会议论文集、期刊等)时当前版本不支持索引
- 需要非 Hugging Face 平台发布论文或管理作者身份时