Skip to content

nomic_bert: make the test suitable for general device.#45209

Merged
ydshieh merged 1 commit intohuggingface:mainfrom
kaixuanliu:nomic_bert_support
Apr 10, 2026
Merged

nomic_bert: make the test suitable for general device.#45209
ydshieh merged 1 commit intohuggingface:mainfrom
kaixuanliu:nomic_bert_support

Conversation

@kaixuanliu
Copy link
Copy Markdown
Contributor

@ydshieh pls help review, thx!

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

[For maintainers] Suggested jobs to run (before merge)

run-slow: nomic_bert

expected_slice = Expectations(
{
("cuda", None): torch.tensor(
(None, None): torch.tensor(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! Guess the same value work for XPU too (?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes.

@ydshieh
Copy link
Copy Markdown
Collaborator

ydshieh commented Apr 9, 2026

@kaixuanliu Could you share the error log? It should still be able to use the value from the single ("cuda", 8) entry (before this PR). But maybe our implementation doesn't do it that way. I want to check the error and see if we should improve our implementation of getting the expected outputs.

@kaixuanliu
Copy link
Copy Markdown
Contributor Author

@ydshieh , For XPU device, before the fix, it will fail like:

FAILED tests/models/nomic_bert/test_modeling_nomic_bert.py::NomicBertModelIntegrationTest::test_inference_no_head_absolute_embedding_v1 - ValueError: No matching expectation found for ('xpu', 3, None) 
FAILED tests/models/nomic_bert/test_modeling_nomic_bert.py::NomicBertModelIntegrationTest::test_inference_no_head_absolute_embedding_v1_5 - ValueError: No matching expectation found for ('xpu', 3, None)

@ydshieh
Copy link
Copy Markdown
Collaborator

ydshieh commented Apr 10, 2026

OK, so if only ("cuda") specified, other device couldn't get the value from it. I will revise the mechanism ... Thanks a lot

@ydshieh ydshieh merged commit 020ace7 into huggingface:main Apr 10, 2026
19 checks passed
@kaixuanliu kaixuanliu deleted the nomic_bert_support branch April 13, 2026 02:40
sirzechs66 pushed a commit to sirzechs66/transformers that referenced this pull request Apr 18, 2026
…5209)

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants