synthdog
Generate synthetic OCR-free document datasets with SynthDoG, render language-specific configs, and adapt the template for custom corpora.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- synthdog
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Generate synthetic OCR-free document datasets with SynthDoG, render language-specific configs, and adapt the template for custom corpora.
- disable-model-invocation
- true
02 资源文件 19
- 参考文档references/configs/config_en.yaml2.6 KB
- 参考文档references/configs/config_ja.yaml2.6 KB
- 参考文档references/configs/config_ko.yaml2.6 KB
- 参考文档references/configs/config_zh.yaml2.6 KB
- 参考文档references/configuration.md3.9 KB
- 参考文档references/resource-layout.md2.0 KB
- 参考文档references/troubleshooting.md3.3 KB
- 参考文档references/workflows.md2.8 KB
- 脚本scripts/elements/__init__.py323 B
- 脚本scripts/elements/background.py608 B
- 脚本scripts/elements/content.py3.5 KB
- 脚本scripts/elements/document.py2.4 KB
- 脚本scripts/elements/paper.py391 B
- 脚本scripts/elements/textbox.py1.1 KB
- 脚本scripts/layouts/__init__.py169 B
- 脚本scripts/layouts/grid_stack.py2.4 KB
- 脚本scripts/layouts/grid.py2.3 KB
- 脚本scripts/render_config.py6.6 KB
- 脚本scripts/template.py5.0 KB
03 SKILL.md 正文
SynthDoG
Use this sub-skill when a user wants to generate synthetic document samples, make OCR-free document data, swap between the English/Japanese/Korean/Chinese template configs, or adapt SynthDoG to a new corpus.
Route first
- Read
references/workflows.mdfor the render-then-run flow, tiny-fixture smoke, split layout, and metadata layout. - Read
references/configuration.mdfor the config knobs, language bundle mapping, and custom-corpus adaptation. - Read
references/resource-layout.mdfor the background/paper/corpus/font directory contract and the asset bundling decision. - Read
references/troubleshooting.mdwhensynthtiger,pytweening, NumPy, OpenCV, fonts, corpora, or output paths fail. - Use
scripts/render_config.pywhen you need to turn the bundled placeholder configs into a runnable config that points at external resource directories. - For shared install/import issues with the broader Donut stack, check the parent-tree troubleshooting file at
../../references/troubleshooting.mdonce it exists. - If the user is actually trying to fine-tune on generated data, hand off to
../training/SKILL.md.
Boundaries
- Include: template behavior, background/document/content/layout helper modules, language configs, resource requirements, CLI invocation through
synthtiger, output directory and metadata layout, tiny-fixture generation. - Exclude: Donut training, inference, and evaluation metrics.
Quick checks
python scripts/render_config.py --helpsynthtiger --helpif SynthDoG is installed in the active environmentpython -m py_compile scripts/render_config.py scripts/template.py scripts/elements/*.py scripts/layouts/*.py
What to do
- Choose the language bundle and resource root.
- Render a config with
scripts/render_config.py. - Run
synthtigerfrom this sub-skill root withscripts/template.py, theSynthDoGtemplate class name, and the rendered config. - Inspect the split directories and
metadata.jsonlfiles thattemplate.pywrites. - If the user later wants model training on the generated data, route the dataset to the training sub-skill.
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).