def add_args(cls, parser):
        """Add criterion-specific arguments to the parser."""
        dc = getattr(cls, "__dataclass", None)
        if dc is not None:
            gen_parser_from_dataclass(parser, dc())
Add criterion-specific arguments to the parser.
decoding/GAD/fairseq/criterions/fairseq_criterion.py