Skip to content

Did you mean masked_fill_ in modeling_deberta.py? #35162

@xadupre

Description

@xadupre

System Info

  • transformers version: 4.47.0
  • Platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
  • Python version: 3.10.12
  • Huggingface_hub version: 0.24.6
  • Safetensors version: 0.4.4
  • Accelerate version: 1.0.0
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.6.0.dev20241205+cu124 (True)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using distributed or parallel set-up in script?:
  • Using GPU in script?:
  • GPU type: NVIDIA GeForce RTX 4060 Laptop GPU

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

masked_fill is called but the result is not used: https://github.com/huggingface/transformers/blob/main/src/transformers/models/deberta/modeling_deberta.py#L293.

The same issue happens in modeling_deberta_v2.py.

Expected behavior

Use masked_fill_ instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions