System Info
transformers built from latest main.
Who can help?
@ydshieh
similar issue may occur in tests/models/sam/test_modeling_sam.py
see https://github.com/sywangyi/transformers/blob/main/src/transformers/models/sam_hq/modeling_sam_hq.py#L1077
randn() is used in positional_embedding, so you need to set_seed() before modeling loading to guarantee the stable output. or else accuracy check will fail.
Information
Tasks
Reproduction
pytest tests/models/sam_hq/test_modeling_sam_hq.py::SamHQModelIntegrationTest
Expected behavior
all pass in cuda.
actual: 11 failed, 3 passed,