chore(terminology): adopt agreed Granite Switch / Mellea glossary (#1192)#1256
chore(terminology): adopt agreed Granite Switch / Mellea glossary (#1192)#1256planetf1 wants to merge 3 commits into
Conversation
ajbozarth
left a comment
There was a problem hiding this comment.
LGTM on the executable-code side — pure prose changes, zero risk surface, and the new glossary entries read well. Two things before merge:
- The terminology sweep missed a number of prose hits across the repo. Some are inside files this PR already touches (worth fixing here); others are scattered across backends, docstrings, and integration docs (Phase 0 follow-up — your call whether to fold in or defer).
- Alphabetical ordering nit on the new
Adapter/Adapter functionentries — left as a separate inline suggestion.
Note: The replacements below were generated by an AI assistant scanning for the old vocabulary; they reflect the conventions established by this PR's own diff (
aLoRA adapter(s)for the plural,adapter functionfor prose) but may not be 100% correct in every case. Treat the table as a checklist to review, not a mechanical patch — sentence flow may need tweaks beyond the literal find/replace, and a couple of judgment calls are flagged at the bottom.
Remaining old vocabulary
In files this PR already modifies (recommend fixing here)
| File | Line | Find | Replace with |
|---|---|---|---|
docs/docs/reference/glossary.md |
382 | A Guardian Intrinsic function that |
A Guardian adapter function that |
docs/docs/reference/glossary.md |
398 | A Guardian Intrinsic function that |
A Guardian adapter function that |
docs/docs/reference/glossary.md |
412 | A Guardian Intrinsic function that |
A Guardian adapter function that |
docs/docs/reference/glossary.md |
458 | A Guardian Intrinsic function that |
A Guardian adapter function that |
Out of scope for this PR (file a follow-up issue, or fold in if you'd rather sweep once)
Library code — module/function docstrings:
| File | Line | Find | Replace with |
|---|---|---|---|
mellea/stdlib/components/intrinsic/core.py |
1 | Intrinsic functions for core model capabilities. |
Adapter functions for core model capabilities. |
mellea/stdlib/components/intrinsic/core.py |
15 | Intrinsic function that evaluates |
Adapter function that evaluates |
mellea/stdlib/components/intrinsic/core.py |
35 | Intrinsic function that determines |
Adapter function that determines |
mellea/stdlib/components/intrinsic/core.py |
62 | Intrinsic function that finds |
Adapter function that finds |
mellea/stdlib/components/intrinsic/rag.py |
1 | Intrinsic functions related to retrieval-augmented generation. |
Adapter functions related to retrieval-augmented generation. |
mellea/stdlib/components/intrinsic/rag.py |
21 | Intrinsic function that checks whether the question |
Adapter function that checks whether the question |
mellea/stdlib/components/intrinsic/rag.py |
54 | Intrinsic function that rewrites |
Adapter function that rewrites |
mellea/stdlib/components/intrinsic/rag.py |
82 | Intrinsic function that determines |
Adapter function that determines |
mellea/stdlib/components/intrinsic/rag.py |
119 | Intrinsic function that finds |
Adapter function that finds |
mellea/stdlib/components/intrinsic/rag.py |
165 | Intrinsic function that checks whether a single document |
Adapter function that checks whether a single document |
mellea/stdlib/components/intrinsic/rag.py |
204 | Intrinsic function that checks whether the sentences |
Adapter function that checks whether the sentences |
mellea/stdlib/components/intrinsic/guardian.py |
1 | Intrinsic functions for Guardian safety and hallucination detection. |
Adapter functions for Guardian safety and hallucination detection. |
mellea/stdlib/components/intrinsic/guardian.py |
246 | Intrinsic function that evaluates the factuality |
Adapter function that evaluates the factuality |
mellea/stdlib/components/intrinsic/guardian.py |
262 | Intrinsic function that corrects |
Adapter function that corrects |
Library code — backend "Activated LoRA" / "ALora" prose:
| File | Line | Find | Replace with |
|---|---|---|---|
mellea/backends/huggingface.py |
3 | Span-based context or ALoras |
Span-based context or aLoRA adapters |
mellea/backends/huggingface.py |
242 | This backend also supports Activated LoRAs (ALoras)](https://arxiv.org/pdf/2504.12397). |
This backend also supports [aLoRA adapters](https://arxiv.org/pdf/2504.12397). |
mellea/backends/litellm.py |
318 | The LiteLLM backend does not support activated LoRAs. |
The LiteLLM backend does not support aLoRA adapters. |
mellea/backends/watsonx.py |
378 | The watsonx backend does not support currently support activated LoRAs. |
The watsonx backend does not currently support aLoRA adapters. |
mellea/backends/ollama.py |
392 | The ollama backend does not support currently support activated LoRAs. |
The ollama backend does not currently support aLoRA adapters. |
mellea/core/requirement.py |
263 | This includes ALora because |
This includes aLoRA because |
Docs:
| File | Line | Find | Replace with |
|---|---|---|---|
docs/docs/integrations/openai.md |
264 | these adapters enable intrinsic functions |
these adapters enable adapter functions |
docs/docs/integrations/openai.md |
293 | The high-level intrinsic wrappers |
The high-level adapter function wrappers |
docs/docs/integrations/openai.md |
295 | for the full list of available intrinsics. |
for the full list of available adapter functions. |
docs/docs/integrations/openai.md |
299 | Only intrinsics |
Only adapter functions |
docs/docs/integrations/huggingface.md |
86 | [Activated LoRA (aLoRA)] |
[aLoRA] |
docs/docs/integrations/huggingface.md |
90 | For intrinsics without local GPU requirements |
For adapter functions without local GPU requirements |
docs/docs/integrations/huggingface.md |
92 | [Intrinsics](../advanced/intrinsics) |
[Adapter Functions](../advanced/intrinsics.md) |
docs/docs/advanced/lora-and-alora-adapters.md |
21 | pre-trained intrinsic adapters embedded |
pre-trained adapter functions embedded |
docs/docs/advanced/lora-and-alora-adapters.md |
23 | See [Intrinsics](./intrinsics) for details. |
See [Adapter Functions](./intrinsics.md) for details. |
docs/docs/advanced/lora-and-alora-adapters.md |
107 | as a Mellea intrinsic (so that it can |
as a Mellea adapter function (so that it can |
docs/docs/advanced/lora-and-alora-adapters.md |
163 | [Intrinsics](./intrinsics) |
[Adapter Functions](./intrinsics.md) |
docs/docs/advanced/prefix-caching-and-kv-blocks.md |
135 | [Intrinsics](./intrinsics) |
[Adapter Functions](./intrinsics.md) |
Intentionally not flagged
- The
--intrinsicCLI flag andmellea/stdlib/components/intrinsic/import paths indocs/docs/advanced/lora-and-alora-adapters.mdandAGENTS.md— these are symbol/path names, deferred to Phase 1 per the PR description. docs/docs/api/mellea/backends/adapters/adapter.mdx— autogenerated; will refresh from source on the next docs build.glossary.md:54—aLoRA (Activated LoRA)is the entry's own definitional expansion, not stale prose.
Judgment calls flagged for review
- The
watsonx.py:378andollama.py:392strings contain a duplicated"does not support currently support"— strict scope is terminology only, but fixing the duplication while you're touching the line is cheap. Drop the typo fix from the replacement if you'd rather keep the PR minimal. lora-and-alora-adapters.mdandhuggingface.mddoc cross-links currently lack the.mdsuffix thatdocs/CONTRIBUTING_DOCS.mdrequires. Adding it where we're already touching the line is consistent; ignore those columns if you'd rather keep the link-suffix sweep separate.
Verification command
After applying the table, this should return zero hits within prose (excluding paths/symbols):
grep -rnE "intrinsic function|Intrinsic function|Activated LoRA|activated[- ]LoRA|\bALoras?\b" \
mellea/ docs/docs/ \
| grep -v "/test/" \
| grep -v "\.mdx:" \
| grep -v "stdlib\.components\.intrinsic\|formatters\.granite\.intrinsics"…nerative-computing#1192) Sweeps the five Phase 0 adapter files, AGENTS.md, and the reference glossary to use the canonical terms agreed under Epic generative-computing#929: - "adapter function" replaces "intrinsic" / "intrinsic function" in prose - "aLoRA" replaces "Activated LoRA" / "activated-LoRA" - "Granite Switch" replaces "Project Granite Switch" - "cache hit/miss" framing in the aLoRA glossary entry (never "cache rewrite") Python symbol names (IntrinsicAdapter, fetch_intrinsic_metadata, etc.) and import paths are untouched — those renames are Phase 1 (generative-computing#1136) / Phase 4 (generative-computing#1144). Also adds the full agreed glossary set to docs/docs/reference/glossary.md: Adapter function, Adapter, Capability, Checkpoint, Granite Libraries, Granite Switch, Granite Switch composer, Mellea, and a References section. Fixes the duplicate ## 13 heading in AGENTS.md (→ ## 14). Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
…ary (generative-computing#1192) Address code review findings: - adapter.py: fix four missed prose descriptions in EmbeddedIntrinsicAdapter and CustomIntrinsicAdapter (intrinsic_name param docs, __init__ docstring) - adapter.py:202: lands → is merged (second TODO comment missed by replace-all) - adapter.py:335: fix clunky doubled noun in EmbeddedIntrinsicAdapter init doc - glossary.md aLoRA entry: rewrite to centre base-model KV-cache reuse / single-token activation (the fundamental mechanism), keep multi-adapter Granite Switch throughput benefit as secondary paragraph - glossary.md: move ## Mellea above ## MelleaSession (alphabetical order) Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
…d integration docs - Fix Adapter / Adapter function glossary entry ordering (alphabetical) - Replace "Guardian Intrinsic function" with "Guardian adapter function" in all four Guardian glossary entries and the GuardianCheck deprecation note - Replace "Intrinsic function(s)" with "Adapter function(s)" in module and function docstrings: core.py, rag.py, guardian.py - Replace "activated LoRAs" / "ALoras" with "aLoRA adapters" in backend error messages and docstrings: huggingface.py, litellm.py, watsonx.py, ollama.py; fix double-"support" typo in watsonx.py and ollama.py error messages - Replace "ALora" with "aLoRA" in requirement.py comment - Replace "intrinsic functions" / "intrinsic wrappers" / "intrinsics" prose in integration docs: openai.md, huggingface.md, lora-and-alora-adapters.md Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
d35e06c to
71b418c
Compare
|
Still looking at some related usages around guardian |
ajbozarth
left a comment
There was a problem hiding this comment.
All my review items have been addressed, LGTM
Remaining before merge1. "Guardian adapter functions" — collective term needs confirmation ~12 occurrences of "Guardian Intrinsics" used as a group label remain unchanged in: `safety-guardrails.md`, `common-errors.md`, `metrics.md`, `concepts/architecture-vs-agents.md`, `examples/index.md`, `use-context-and-sessions.md`, `stdlib/requirements/safety/guardian.py`. Not changed: the glossary defines per-function descriptions ("A Guardian adapter function") but does not give an agreed collective replacement. Options: "Guardian adapter functions", "Guardian Library", or keep "Guardian Intrinsics" as a proper-noun label. 2. Four cross-doc link anchors (may fit in followon issue) All point to the still-titled "Intrinsics" page; deferred to Phase 1 page rename.
Continuing next week & look for any additional omissions |
The Epic #929 team agreed a canonical glossary for Granite Switch / Mellea naming, but most existing prose still used the old vocabulary — "intrinsic", "activated-LoRA", "Project Granite Switch". This PR sweeps the Phase 0 code files, AGENTS.md, and the reference glossary to use the agreed terms consistently, before Phase 1 contributors carry old vocabulary into new work.
Python symbol names (
IntrinsicAdapter,fetch_intrinsic_metadata, etc.) and import paths are untouched — those renames are deliberately deferred to Phase 1 (#1136) and Phase 4 (#1144). The prose/symbol mismatch that results is intentional and documented in the glossary'sIntrinsicentry.Where this fits
Epic #929 — adapter lifecycle. Sits before Phase 1 (#1136 symbol renames) and addresses the "Done when" items of #1192 directly.
Fixes #1192
Changes
mellea/backends/adapters/(4 files) +mellea/stdlib/components/adapter_based_component/__init__.pyAdapterType.ALORAenum doccatalog.pyField(description=...)strings updated (user-visible prose)AGENTS.md## 13. Working with Intrinsics→## 14. Working with Adapter Functions## 13heading (was two sections both numbered 13)Intrinsicclass name,docs/examples/intrinsics/path unchangeddocs/docs/reference/glossary.mdaLoRAentry with the agreed KV-cache-sharing definition (cache hits, not "cache rewrite")Granite Switchentry with the agreed architecture definitionIntrinsicentry to point toAdapter functionas canonical, notingIntrinsicis the current Python name pending Phase 1/4Testing
uv run ruff format+uv run ruff check— cleanuv run pytest test/ -m "not qualitative"— 2083 passed, 7 pre-existing failures (missinghuggingface_hubextra — unrelated to this PR, confirmed by stash test)markdownlint (docs)pre-commit hook — passed