Skip to content

fix: model options with intrinsics#972

Merged
jakelorocco merged 4 commits into
mainfrom
jal/intrinsics-model-options
Apr 30, 2026
Merged

fix: model options with intrinsics#972
jakelorocco merged 4 commits into
mainfrom
jal/intrinsics-model-options

Conversation

@jakelorocco
Copy link
Copy Markdown
Contributor

@jakelorocco jakelorocco commented Apr 30, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

Verified that io.yaml parameters are used. Verified that model options override these. Added support for all model options with specific caveats for one of cases.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
Assisted-by: CLAUDE:OPUS
@github-actions github-actions Bot added the bug Something isn't working label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
@jakelorocco
Copy link
Copy Markdown
Contributor Author

Test failures caused by known failure: #970

@jakelorocco jakelorocco requested a review from nrfulton April 30, 2026 01:15
Comment thread mellea/backends/huggingface.py Outdated
Comment thread mellea/backends/huggingface.py Outdated
Comment thread mellea/backends/huggingface.py
Comment thread mellea/backends/openai.py
Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
Assisted-by: CLAUDE:OPUS
@jakelorocco
Copy link
Copy Markdown
Contributor Author

Intrinsics now support tools. Added tests to ensure that tools are actually getting sent to the model when generating and that generation still works. Required changes to the underlying granite library.

@jakelorocco jakelorocco marked this pull request as ready for review April 30, 2026 20:51
@jakelorocco jakelorocco requested review from a team as code owners April 30, 2026 20:51
tokenizer_input = {
"conversation": request["messages"],
"add_generation_prompt": True,
"tools": request["tools"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @frreiss . Please let us know if there was a reason for granite-io dropped tools. (Fred: we're going ahead with merging this PR but even after this is merged and closed any "there be dragons ahead" warnings would be appreciated so we can get out ahead of them :))

Copy link
Copy Markdown
Collaborator

@frreiss frreiss Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the training data for any of the intrinsics in granitelib-rag includes tool calls. Not sure about other models. In general, if tool calls are not in the model’s training data and the model is fed an input that contains a tool call, then the model is operating outside of the domain it was trained for. A model operating out of domain will produce lower quality results than one operating in domain. The drop in quality is unpredictable, ranging from “we got lucky and it just works” to “it fails completely”. Predicting the level of quality loss a priori is an open research problem.

@jakelorocco jakelorocco merged commit 8b6b8d5 into main Apr 30, 2026
8 checks passed
@jakelorocco jakelorocco deleted the jal/intrinsics-model-options branch April 30, 2026 20:51
akihikokuroda pushed a commit to akihikokuroda/mellea that referenced this pull request May 27, 2026
* fix: model options with intrinsics

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
Assisted-by: CLAUDE:OPUS

* fix: pre-commit issues

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>

* fix: pr comments; add tools to intrinsics

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>

* fix: test for intrinsics with tools

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
Assisted-by: CLAUDE:OPUS

---------

Signed-off-by: Jake LoRocco <jake.lorocco@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants