Skip to content

Training Support for BetterTransformer #971

Description

@eugene-yang

System Info

Optimum main branch with pytorch=2.0 and cuda version 11.7.

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

Running training with a model transformed with BetterTransformer.transform yields an error message on not supporting training (https://github.com/huggingface/optimum/blob/main/optimum/bettertransformer/models/base.py#L134).

However, the documentation states that BetterTransformer already supports training.
https://github.com/huggingface/optimum/blob/main/docs/source/bettertransformer/tutorials/convert.mdx#training-compatibility

Expected behavior

Either the documentation should be updated or feature branch should be merged to main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions