in extract.py [0:0]
def create_parser():
parser = argparse.ArgumentParser(
description="Extract per-token representations and model outputs for sequences in a FASTA file" # noqa
)
parser.add_argument(
"model_location",
type=str,
help="PyTorch model file OR name of pretrained model to download (see README for models)",
)
parser.add_argument(
"fasta_file",
type=pathlib.Path,
help="FASTA file on which to extract representations",
)
parser.add_argument(
"output_dir",
type=pathlib.Path,
help="output directory for extracted representations",
)
parser.add_argument("--toks_per_batch", type=int, default=4096, help="maximum batch size")
parser.add_argument(
"--repr_layers",
type=int,
default=[-1],
nargs="+",
help="layers indices from which to extract representations (0 to num_layers, inclusive)",
)
parser.add_argument(
"--include",
type=str,
nargs="+",
choices=["mean", "per_tok", "bos", "contacts"],
help="specify which representations to return",
required=True,
)
parser.add_argument(
"--truncate",
action="store_true",
help="Truncate sequences longer than 1024 to match the training setup",
)
parser.add_argument("--nogpu", action="store_true", help="Do not use GPU even if available")
return parser