[Frontend] Represent tokens with identifiable strings (#6626)

This commit is contained in:
Evan Z. Liu
2024-07-25 09:51:00 +08:00
committed by GitHub
parent 740374d456
commit 5689e256ba
7 changed files with 138 additions and 19 deletions
+6
View File
@@ -128,6 +128,12 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
"using @app.middleware('http'). "
"If a class is provided, vLLM will add it to the server "
"using app.add_middleware(). ")
parser.add_argument(
"--return-tokens-as-token-ids",
action="store_true",
help="When --max-logprobs is specified, represents single tokens as"
"strings of the form 'token_id:{token_id}' so that tokens that"
"are not JSON-encodable can be identified.")
parser = AsyncEngineArgs.add_cli_args(parser)