tree-of-thoughts-llm
Routes Tree of Thoughts workflows for game24, coherent passage generation, and mini-crossword solving, with shared installation and execution guidance.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tree-of-thoughts-llm
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Routes Tree of Thoughts workflows for game24, coherent passage generation, and mini-crossword solving, with shared installation and execution guidance.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/api-reference.md4.5 KB
- 参考文档references/cli-reference.md2.4 KB
- 参考文档references/repo-provenance.md981 B
- 参考文档references/repo-routing-metadata.json361 B
- 参考文档references/troubleshooting.md2.7 KB
- 参考文档references/workflows.md2.0 KB
- 脚本scripts/check_install.py632 B
- 脚本scripts/run_tot.py2.9 KB
03 SKILL.md 正文
Tree of Thoughts LLM
Use this skill for the Princeton NLP Tree of Thoughts repository and package.
It focuses on the bundled tot package, the shared runner, and the three
public task modes: arithmetic puzzles, coherent text generation, and mini
crossword solving.
Fast start
- Install from PyPI:
pip install tree-of-thoughts-llm - Install from a checkout:
pip install -e . - Required runtime setting:
OPENAI_API_KEY - Optional proxy/base URL:
OPENAI_API_BASE - Smoke check:
python scripts/check_install.py
Choose a route
sub-skills/game24/for 24-game arithmetic trajectories, ToT BFS, and naive sampling baselines.sub-skills/text/for coherent passage generation, sample/vote runs, and GPT-based coherency scoring.sub-skills/crosswords/for 5x5 mini crosswords, naive sampling, and the notebook-derived DFS search workflow.
Shared runtime helper
scripts/run_tot.pyis the bundled runner that mirrors the repository runner interface and writes JSON logs under./logs/relative to the launch directory.scripts/check_install.pyconfirms the runtime package install, public metadata, and the three task constructors from the active environment.
What this skill does not do
- It does not depend on the original checkout being present at runtime.
- It does not bundle private API keys, proxies, or machine-specific paths.
- It does not run the paper experiments automatically; use the route-specific sub-skill scripts or the shared runner with explicit task arguments.
Shared prerequisites
The package is pure Python, but the workflows call the OpenAI Chat Completions API. Expect the following before running any task mode:
- A valid OpenAI key in
OPENAI_API_KEY. - A reachable API endpoint, optionally overridden with
OPENAI_API_BASE. - Network access to the chosen backend.
- The runtime package installed with its pinned dependencies.
Read next
references/workflows.mdfor the shared ToT execution model and extension notes.references/cli-reference.mdfor the bundled runner flags and example commands.references/api-reference.mdfor verified package functions and task classes.references/troubleshooting.mdfor install, import, API, and parsing failures.references/repo-provenance.mdbefore refreshing this skill from a newer checkout.
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).