Repository navigation
docs(examples): standardize adapter, granite-switch, aLoRA, and SOFAI examples - #1765
Conversation
… examples Towards generative-computing#1746. Standardize header docstrings (description, Prerequisites, Usage) across intrinsics/, granite-switch/, aLora/, and sofai/. Reduce intri nsics/, granite-switch/, and sofai/ READMEs to a description plus an Examples table, linking to the site docs for concepts. Keep the aLoRA train/upload/add- readme workflow in its README since no script covers it. Assisted-by: IBM Bob Signed-off-by: Rafael Vasquez <[email protected]>
47f3c65 to
f66eb4f
Compare
…n example_readme_generator Signed-off-by: Rafael Vasquez <[email protected]> Assisted-by: IBM Bob
584f779 to
6eb6f07
Compare
|
cc @planetf1 as you wrote pretty much all of these |
planetf1
left a comment
There was a problem hiding this comment.
Thanks for doing this, the new structure and Examples tables are a clear improvement. I'm requesting changes because a few of the docs now say things that aren't true when you run them. The details are inline. The aLora/102_example.py failure was already there on main, so I've opened #1790 for it, and #1791 covers the upload error. The changed .py files differ from base only in their docstrings, and CI is green. Thanks for the cc @ajbozarth.
Signed-off-by: Rafael Vasquez <[email protected]> Assisted-by: IBM Bob
There was a problem hiding this comment.
Superseded by my later review (#1765 (review)). This earlier text went out before I had checked it, so I have removed it.
There was a problem hiding this comment.
Correction to my previous review: I've removed the earlier text, which went out before I'd checked it. Most of it doesn't hold up or is out of scope here.
The round-1 points are all sorted, thanks, and the new feedback_strategy table reads well. The one thing I'd still like fixed is inline: the granite-switch scripts' base_url. A smaller one: 102_example.py loads granite-3.3-2b-instruct, so the README's "use your own upload" line only works if you also ran the 3.3-2b training block. Worth a few words.
Signed-off-by: Rafael Vasquez <[email protected]> Assisted-by: Claude Code
|
Thanks @planetf1! Addressed. |
planetf1
left a comment
There was a problem hiding this comment.
Thanks, all sorted. I re-ran the granite-switch scripts against a live vLLM server and they work as documented.
…-capabilities-standardize Signed-off-by: Rafael Vasquez <[email protected]>
cf484f7
The earlier upstream merge dropped the Granite Switch README's probe section when generative-computing#1765 restructured it, and the shim removal took test_probe_technology_registers_as_lora with EmbeddedIntrinsicAdapter. Restore both against _embedded_adapter_from_entry. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]>
…erative-computing#1797) * feat(adapters): accept probe slots in Granite Switch checkpoints Discovery only accepted `technology` lora and alora, so one probe entry in adapter_index.json made it raise and no adapter on the checkpoint loaded. Accept `probe` and register it as LoRA; its first_token io.yaml uses the existing one-token readout. Skip other unknown technologies with a warning so the remaining adapters still load. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]> * fix(adapters): skip unsupported slots before resolving their io.yaml A Granite Switch index can carry an unsupported slot (for example technology "sr") that publishes no io.yaml. Local discovery skipped such a slot before reading its config, but Hub materialisation resolved every entry's io_config first, so from_hub failed with a misleading "adapter_index.json was not found in the downloaded snapshot". Share one technology filter across both paths, and make it reject a non-string technology value instead of raising TypeError. Also document that a probe slot must keep its own adapter function name, since the output contract is keyed by name, and add a label-order test pinning probe polarity to the checkpoint's io.yaml rather than to code. Assisted-by: pi Signed-off-by: Nigel Jones <[email protected]> * fix(adapters): restore probe README note and probe registration test The earlier upstream merge dropped the Granite Switch README's probe section when generative-computing#1765 restructured it, and the shim removal took test_probe_technology_registers_as_lora with EmbeddedIntrinsicAdapter. Restore both against _embedded_adapter_from_entry. Assisted-by: Claude Code Signed-off-by: Nigel Jones <[email protected]> --------- Signed-off-by: Nigel Jones <[email protected]>
Pull Request
Issue
Closes #1746
Description
Standardizes
intrinsics/,granite-switch/,aLora/, andsofai/, keeping the original docstring and README wording and adding structure.Docstrings
Prerequisites:andUsage:blocksREADMEs
## Examplestable, using the original per-file descriptions where they were accurate.advanced/intrinsics.md,advanced/lora-and-alora-adapters.md, andadvanced/inference-time-scaling.md. Content that isn't covered wasn't removed: the Granite Switch overview, the architecture diagram, and the SOFAI flow diagram.aLora/since no script contains it.Other fixes
intrinsics/andgranite-switch/. The image moved todocs/static/images/in docs: migrate from Mintlify to Docusaurus 3 #1174.aLora/README.md:https://) and quoted".[all]"so it works in zsh.\in the--hintscommand.huggingface-cli loginprerequisite.sofai/README.mdused parameter names that don't exist (s1_backend,escalate_on_failure). I removed them along with the code sample.# pytest: huggingface, e2etoquery_rewrite.py, which had no marker.Testing
Attribution
Adding a new component, requirement, sampling strategy, or tool?
If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.
NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.