Token导航 LogoToken导航

Agent Skill · 研究检索

doc-to-lora-hyper(给洛拉·超级的医生)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

doc-to-lora-hyper 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 12,723。

总安装 10,034周安装 431GitHub Stars 公开资料未说明下载 3,517核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.2.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:doc-to-lora-hyper(给洛拉·超级的医生)
来源仓库:https://github.com/manojbhat09/doc-to-lora-hyper
安装命令:
openclaw skills install doc-to-lora-hyper
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install doc-to-lora-hyper

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

将文档内部化为轻量语言模型,实现无提示问答能力。适合知识库嵌入和本地推理,基于 Gemma 2 2B 模型。在 OpenClaw 中安装后调用,无需额外提示即可回答相关问题。需确保硬件满足最低要求,输出质量依赖文档清晰度。doc-to-lora-hyper 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install doc-to-lora-hyper;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

doc-to-lora-hyper 怎么安装?

在终端执行 openclaw skills install doc-to-lora-hyper。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

doc-to-lora-hyper 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

doc-to-lora-hyper 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

doc-to-lora-hyper 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

doc-to-lora-hyper 用的人多吗?

公开数据是累计安装 10,034 次,近一周安装 431 次,下载 3,517 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

doc-to-lora-hyper 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
doc-to-lora-hyper

给洛拉·超级的医生 · 本页

10,034—需要联网MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
doc-to-lora
description
>
license
MIT
compatibility
>
metadata
author
Manojbhat09
version
1.2.0
paper
https://arxiv.org/abs/2602.15902
base-model
google/gemma-2-2b-it
framework
pytorch,mlx
openclaw
requires
env
bins
os
darwin

Doc-to-LoRA Skill

Internalize any document into a small model's weights in seconds. No fine-tuning loop, no RAG retrieval at query time. The model "knows" the document.

How It Works (30-second summary)

A trained hypernetwork reads your document and instantly generates LoRA adapter weights for every layer of Gemma 2 2B. The adapter is applied to the base model, which can then answer questions about the document without it being in the prompt.

Document --> Context Encoder --> Perceiver --> HyperLoRA --> LoRA weights
                                                                |
                                                    Apply to Gemma 2 2B
                                                                |
                                                    Answer questions (no doc in prompt)

For architecture details, read references/ARCHITECTURE.md in this skill directory.

Security Notes

  • Checkpoint loading: internalize.py uses torch.load(weights_only=False)

because D2L checkpoints embed Python config dataclasses (AggregatorConfig, LoraConfig, HypernetConfig) alongside tensor weights. The upstream D2L project uses this format. Only load checkpoints you trust. The default checkpoint source is the official SakanaAI/doc-to-lora HuggingFace repository.

  • HF_TOKEN: Required for downloading gated Gemma weights. This is a sensitive

secret. The scripts only pass it to huggingface-cli download and transformers model loading. It is not sent anywhere else.

  • No remote code execution: setup.sh does not download or execute remote

scripts. It requires uv and python3 to be pre-installed by the user. All dependency installation is done via uv pip install with pinned versions.

  • Checkpoint integrity: After downloading, you can verify the checkpoint

against the HuggingFace repo's commit hash. The download uses huggingface-cli which verifies checksums automatically.

Prerequisites

This skill runs inside a clone of the doc-to-lora repository. It is not a standalone tool.

Required before setup:

  • python3 (3.10+)
  • uv package manager: https://docs.astral.sh/uv/getting-started/installation/
  • HF_TOKEN env var: https://huggingface.co/settings/tokens (with Gemma access)
  • Clone of the D2L repo with install_mac.sh present

Run setup once. This installs Python dependencies and downloads model weights (~7GB total).

export HF_TOKEN=hf_your_token_here
bash ${CLAUDE_SKILL_DIR}/scripts/setup.sh

If setup was already completed, skip this step. Check with:

test -d trained_d2l/gemma_demo && echo "Weights present" || echo "Run setup first"

Workflow A: PyTorch Path (simpler, ~10GB RAM)

Use this when the user provides a document and wants answers. The internalize.py script handles both internalization and querying in one call.

Internalize a document and ask questions

python ${CLAUDE_SKILL_DIR}/scripts/internalize.py \
  --input "path/to/document.txt" \
  --question "What is the main finding?" \
  --checkpoint trained_d2l/gemma_demo/checkpoint-80000/pytorch_model.bin

Or pass text directly:

python ${CLAUDE_SKILL_DIR}/scripts/internalize.py \
  --text "Paste the document content here..." \
  --question "What is this about?"

For multiple questions, pass them comma-separated:

python ${CLAUDE_SKILL_DIR}/scripts/internalize.py \
  --input "path/to/document.txt" \
  --question "Question 1?,Question 2?,Question 3?"

For programmatic use, output results as JSON:

python ${CLAUDE_SKILL_DIR}/scripts/internalize.py \
  --input doc.txt --question "Q?" --output-json results.json

Workflow B: MLX Path (faster, ~6GB RAM, recommended for Mac)

Use this for best performance on Apple Silicon. Two-phase: export once, query fast.

Step 1: Export LoRA adapter from document

python scripts/export_d2l_to_mlx_adapter.py \
  --checkpoint trained_d2l/gemma_demo/checkpoint-80000/pytorch_model.bin \
  --context-file "path/to/document.txt" \
  --output-dir adapters_d2l

Step 2: Query with MLX (lightweight, Metal-accelerated)

python ${CLAUDE_SKILL_DIR}/scripts/query_mlx.py \
  --adapter-dir adapters_d2l \
  --question "What is the main finding?"

When to Use Which Path

ScenarioPathWhy
Quick one-off question about a docPyTorchSimpler, no export step
Many questions about the same docMLXExport once, query fast and cheap
RAM-constrained (16GB Mac)MLX~6GB vs ~10GB at query time
Multiple documents to compareMLXExport each, swap adapters instantly

Limitations

  • Base model: Gemma 2 2B only (with released weights). Small model = limited reasoning.
  • Document length: Up to ~6144 tokens (~4000-5000 words). Longer docs are chunked.
  • Training required for new base models: The hypernetwork must be trained (8xA100 GPUs) to support a different base model. Inference is Mac-friendly.
  • Factual recall, not reasoning: Best for "what does the doc say" questions, not deep multi-hop reasoning over the document.
  • No real-time updates: Once internalized, the adapter is static. Change the doc = re-internalize.

Troubleshooting

ProblemFix
ModuleNotFoundError: No module named 'ctx_to_lora'Run setup: bash ${CLAUDE_SKILL_DIR}/scripts/setup.sh
FileNotFoundError: trained_d2l/...Download weights: uv run huggingface-cli download SakanaAI/doc-to-lora --local-dir trained_d2l
FileNotFoundError: install_mac.shThis skill must be used inside a doc-to-lora repo clone that contains install_mac.sh
RuntimeError: MPS backend out of memoryUse MLX path instead, or close other apps
ImportError: bitsandbytesExpected on Mac. The scripts auto-disable quantization on non-CUDA.
Answers seem wrong / genericCheck if LoRA is applied: outputs should differ from baseline. Try rephrasing.

平台分布

OpenClaw

90.16%
按下载量换算3,171

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills