vision-document-ai
Use UniLM vision, vision-language, OCR, webpage, and document-AI workflows across BEiT, DiT, LayoutLM, MarkupLM, XDoc, TrOCR, VLMo, and VL-BEiT.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- vision-document-ai
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use UniLM vision, vision-language, OCR, webpage, and document-AI workflows across BEiT, DiT, LayoutLM, MarkupLM, XDoc, TrOCR, VLMo, and VL-BEiT.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/model-task-map.md9.0 KB
- 参考文档references/troubleshooting.md10.5 KB
- 参考文档references/workflows.md17.0 KB
- 脚本scripts/build_vision_doc_command.py22.7 KB
03 SKILL.md 正文
Vision Document AI
Use this sub-skill when the task is about UniLM vision or document-AI models: image classification/pretraining, semantic segmentation, document layout/text detection, OCR, form understanding, token classification, relation extraction, visual question answering, captioning, retrieval, NLVR2, webpage extraction, or cross-format document understanding.
Route Here
- Build or adapt command plans for BEiT, BEiT v2, BEiT-3, DiT, LayoutLM/LayoutLMv2/LayoutLMv3, LayoutXLM, MarkupLM, XDoc, TrOCR, VLMo, or VL-BEiT.
- Validate dataset assumptions for ImageFolder, ADE20K-style segmentation, FUNSD, CORD, XFUND, PubLayNet, ICDAR cTDaR, WebSRC, SWDE, SQuAD, COCO, Flickr30k, VQAv2, NLVR2, or pyarrow vision-language data.
- Diagnose vision/document dependency failures involving legacy PyTorch, CUDA wheels, Detectron2, MMCV/mmsegmentation, Apex, fairseq, Deepspeed, or Hugging Face Transformers drift.
- Choose among OCR, document layout, form extraction, webpage markup, image-only, and vision-language routes before constructing a command.
Route Elsewhere
- Use
embeddings-retrievalfor E5, SimLM, dense retrieval, embedding indexing, or text-only retriever training. - Use
multimodal-generationfor TextDiffuser, Kosmos, audio, LatentLM, image/text generation, or open-ended multimodal generation systems. - Use
architectures-trainingfor architecture-only distributed training, generic TorchScale/Magneto/DeepNet wiring, optimizer schedules, or Deepspeed mechanics not tied to a vision/document task.
Read Or Run
- Read references/model-task-map.md to pick the correct model family, task owner, native entry point class, dependency stack, and sibling route.
- Read references/workflows.md before building training, evaluation, data-conversion, OCR, or vision-language commands.
- Read references/troubleshooting.md when a dependency stack, dataset schema, checkpoint, tokenizer, bounding-box, OCR, or Hugging Face version error blocks progress.
- Run scripts/build_vision_doc_command.py to print safe command templates for BEiT classification, BEiT-3 tasks, LayoutLMv3 FUNSD/CORD/XFUND, DiT detection, TrOCR inference, or VLMo runs without training, downloading, or requiring model/data files.
Safe Default Workflow
- Classify the request by modality: image-only, document OCR/layout, form/entity extraction, webpage markup, cross-format document QA, or vision-language.
- Use the model-task map to select the family and confirm whether the original workflow expects legacy PyTorch, Detectron2/MMCV, fairseq, Deepspeed, or Transformers.
- Use the command builder for a template, then replace placeholders only after confirming data layout, checkpoint availability, GPU count, and backend versions.
- Treat original UniLM training and inference programs as heavy reference entry points; do not run them until the user confirms environment, data, checkpoint, and hardware readiness.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).