def add_args(parser):
        """Add model-specific arguments to the parser."""
        parser.add_argument('--prediction-steps', type=int, metavar='N', help='number of steps ahead to predict')
        parser.add_argument('--sample-distance', type=int, metavar='N',
                            help='sample distance from target. does not work properly with cross-sampling')
        parser.add_argument('--cross-sample-negatives', action='store_true',
                            help='whether to sample negatives across examples in the same batch')
        parser.add_argument('--num-negatives', type=int, metavar='N', help='number of negative examples')
        parser.add_argument('--conv-feature-layers', type=str, metavar='EXPR',
                            help='convolutional feature extraction layers [(dim, kernel_size, stride), ...]')
        parser.add_argument('--conv-aggregator-layers', type=str, metavar='EXPR',
                            help='convolutional feature extraction layers [(dim, kernel_size, stride), ...]')
        parser.add_argument('--dropout', type=float, metavar='D', help='dropout to apply within the model')
        parser.add_argument('--dropout-features', type=float, metavar='D', help='dropout to apply to the features')
        parser.add_argument('--dropout-agg', type=float, metavar='D', help='dropout to apply after aggregation step')
        parser.add_argument('--encoder', type=str, choices=['cnn'], help='type of encoder to use')
        parser.add_argument('--aggregator', type=str, choices=['cnn', 'gru'],
                            help='type of aggregator to use')
        parser.add_argument('--gru-dim', type=int, metavar='N', help='GRU dimensionality')

        parser.add_argument('--no-conv-bias', action='store_true',
                            help='if set, does not learn bias for conv layers')
        parser.add_argument('--agg-zero-pad', action='store_true',
                            help='if set, zero pads in aggregator instead of repl pad')

        parser.add_argument('--skip-connections-feat', action='store_true',
                            help='if set, adds skip connections to the feature extractor')
        parser.add_argument('--skip-connections-agg', action='store_true',
                            help='if set, adds skip connections to the aggregator')
        parser.add_argument('--residual-scale', type=float, metavar='D',
                            help='scales residual by sqrt(value)')

        parser.add_argument('--log-compression', action='store_true',
                            help='if set, adds a log compression to feature extractor')

        parser.add_argument('--balanced-classes', action='store_true',
                            help='if set, loss is scaled to balance for number of negatives')
        parser.add_argument('--project-features', choices=['none', 'same', 'new'],
                            help='if not none, features are projected using the (same or new) aggregator')

        parser.add_argument('--non-affine-group-norm', action='store_true',
                            help='if set, group norm is not affine')

        parser.add_argument('--offset', help='if set, introduces an offset from target to predictions. '
                                             'if set to "auto", it is computed automatically from the receptive field')
Add model-specific arguments to the parser.
infoxlm/fairseq/fairseq/models/wav2vec.py