Repository navigation
docs: expand install guide and add minimal quick-start - #162
NandhaKishorM merged 1 commit into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Correct the Windows activation commands, checkpoint size statement, and noul output documentation.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Expands the README with installation guidance, troubleshooting notes, platform information, and a minimal Router quick-start.
Changes:
- Adds virtual-environment and PyPI/source installation instructions.
- Documents dependency, cache, memory, and Windows troubleshooting.
- Explains Router usage, outputs, and routing metadata.
| File | Description |
|---|---|
| README.md | Adds installation and quick-start documentation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - First run downloads checkpoints from Hugging Face (`convaiinnovations/laya`, ~421M per checkpoint). | ||
| Set `HF_HUB_CACHE` to move the cache, or `HF_TOKEN` if you hit rate limits. |
|
Thank you for the quick start, the 30-second example is exactly what #118 asked for. Two facts changed today, so it needs a small refresh first. |
d251d56 to
76ac690
Compare
Bruce-Yii
left a comment
There was a problem hiding this comment.
Both of the conditions you set are met on this head, and the confirmation you were waiting on in #123 now exists — so this looks ready to merge.
max_loaded now defaults to 2. The added text says Router() keeps two checkpoints resident by default, which matches router.py:369 (max_loaded: int = 2) and the existing wording at README.md:463. No stale max_loaded=1 claim left anywhere in the addition.
Install stays trimmed, quick start kept. The diff adds zero lines to ## Installation or ## Installation details; the 37 added lines are three troubleshooting bullets (checkpoint cache, memory limits, Windows + Python 3.14) plus the ### Minimal example (30 seconds) block, inserted under ## Quickstart: Route Mode (Recommended) immediately before the existing full walkthrough. Nothing that #157 already covers is reintroduced. The only lines this shares verbatim with main are three code-fence markers and from laya import Router, which is just what two adjacent code blocks look like.
#123 is closed, so the 3.14 claim is confirmed rather than pending. You asked the reporter to try pip install -U laya without their patch. They verified on Windows 11 Pro 10.0.26200, Python 3.14.0, torch 2.14.0+cpu, no win_patch — all three checkpoints load and run, outputs bit-identical to 0.3.5 — and you closed the issue as fixed in 0.3.7. #195 is merged. The added paragraph describes that accurately, including crediting #195 rather than the docs.
The numbers check out. "about 421M parameters each; multilingual has about 322M" matches the table at README.md:118-120 exactly, and the hedge "download sizes also depend on weight precision and files" is the right hedge to attach to a parameter count in a download section.
Two wording nits, neither worth a round trip on its own:
- "Upgrade older Laya installations with your environment's Python executable followed by
-m pip install -U laya" is hard to parse. "using your environment's Python executable, run-m pip install -U laya" reads better and says the same thing. - The 30-second example uses
Router()while the walkthrough directly below it usesRouter(preload=True). That contrast is defensible and the new memory-limits bullet explains preload, but one clause noting the example takes the lazy path would stop a reader wondering whether the two disagree.
One thing that is not this PR's problem: it shows as blocked, which is a stale tests (py3.9) required check — ci.yml's matrix is 3.10 through 3.13, so no run on any current head produces that job. It needs a settings change, not a code change.
I did not execute the example, since that pulls checkpoints. The API shape matches the walkthrough below it, and Router.predict(state, questions) with a noul question is the documented form.
|
Merged for 0.3.24. The refresh is exactly what I asked for and I checked each fact rather than taking the diff's word for it.
The last one is the reason this is worth having. The 30-second example is the first code a new user runs, so a wrong key name there costs more than a whole page of prose being slightly stale, and the answer-dict explanation underneath ( Trimming the install section so it does not restate #157 was the right call too. Closes #117 and #118. Thanks for coming back to it after main moved. |

Closes #117, closes #118. README-only, additive (no existing lines changed).
#117 (installation):
PreTrainedModel.initialize_weights(workaround included) #123 for Windows + Python 3.14.#118 (usage examples):