Added Encoder Models for Model ops - #468
Draft
Kanupriyagoyal wants to merge 3 commits into
Draft
Conversation
Signed-off-by: Kanupriyagoyal <kanupriya.goyal@ibm.com>
Kanupriyagoyal
requested review from
BenjSz,
anubhavjana,
arielge and
kiszk
as code owners
September 4, 2026 08:50
kiszk
reviewed
Sep 7, 2026
| logging.getLogger("TorchOpCollector").warning( | ||
| "CUDA is not available. Running on CPU." | ||
| ) | ||
| return |
Collaborator
There was a problem hiding this comment.
Please use the original code to force the use of CUDA. This is intended to capture accelerator-aware behavior.
Author
There was a problem hiding this comment.
We haven't access for CUDA, so the scripts have been generated using the cpu.
cc: @saurabh-srivastava4 @marutdas @ani300 ajitsjohn@gmail.com
kiszk
reviewed
Sep 7, 2026
|
|
||
|
|
||
| # Ops whose tensor inputs should use Xavier init when dtype/rank also qualify. | ||
| _XAVIER_OPS = {"torch.matmul", "torch.nn.functional.linear"} |
Collaborator
There was a problem hiding this comment.
Please sync with the latest one
kiszk
requested changes
Sep 7, 2026
kiszk
left a comment
Collaborator
There was a problem hiding this comment.
The differences between torchop_yaml.py and torchop_yaml_cpu.py are very small. Could you drop torchop_yaml_cpu.py and submit a diff against torchop_yaml.py?
It will drastically reduce the burden of future maintenance.
Signed-off-by: Kanupriyagoyal <kanupriya.goyal@ibm.com>
Kanupriyagoyal
force-pushed
the
model_ops_encoder_model
branch
from
September 8, 2026 06:51
3098ac0 to
1378908
Compare
Kanupriyagoyal
marked this pull request as draft
September 10, 2026 11:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Encoder Models
bert_base_uncased/run_huggingface.py
bert_large_uncased/run_huggingface.py
granite_embedding_278m_multilingual/run_huggingface.py
roberta_base_squad2/run_huggingface.py
utils/model_ops/utils/torchop_yaml_cpu.py