[Frontend] Add FlexibleArgumentParser to support both underscore and dash in names (#5718)

This commit is contained in:
Michael Goin
2024-06-20 19:00:13 -04:00
committed by GitHub
parent 3f3b6b2150
commit 8065a7e220
22 changed files with 72 additions and 45 deletions

View File

@@ -1,4 +1,3 @@
import argparse
import random
import time
from typing import List, Optional
@@ -6,7 +5,8 @@ from typing import List, Optional
import torch
from vllm import _custom_ops as ops
from vllm.utils import STR_DTYPE_TO_TORCH_DTYPE, create_kv_caches_with_random
from vllm.utils import (STR_DTYPE_TO_TORCH_DTYPE, FlexibleArgumentParser,
create_kv_caches_with_random)
NUM_BLOCKS = 1024
PARTITION_SIZE = 512
@@ -161,7 +161,7 @@ def main(
if __name__ == '__main__':
parser = argparse.ArgumentParser(
parser = FlexibleArgumentParser(
description="Benchmark the paged attention kernel.")
parser.add_argument("--version",
type=str,