-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export & deploy updates (part I) #10941
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e1edab1
Update vLLMExporter docstring
janekl f581024
No need to create empty kwargs here
janekl a4fc46e
Use debug from command line
janekl 3ef9c3a
Param save_engine for both both vLLM and TRT-LLM
janekl 82e4f60
Unused backend param in run_trt_llm_inference
janekl 8499d50
Reindent files for non-existent checkpoint check
janekl dcfe806
Docs for lora_checkpoints
janekl 7552f65
Improve config readability
janekl f56fadf
Raise error directly in get_vllm_deployable
janekl a6bedab
Apply isort and black reformatting
janekl 0170673
Revert "Reindent files for non-existent checkpoint check"
janekl bc522cb
Merge branch 'main' into jlasek/vllm_extra
janekl 093aa94
Cut off prompt for real
janekl 2aa441d
Apply isort and black reformatting
janekl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,7 +241,7 @@ def run_inference( | |
test_cpp_runtime=False, | ||
test_deployment=False, | ||
test_data_path=None, | ||
save_trt_engine=False, | ||
save_engine=False, | ||
fp8_quantized=False, | ||
fp8_kvcache=False, | ||
trt_llm_export_kwargs=None, | ||
|
@@ -442,7 +442,7 @@ def run_inference( | |
if test_deployment: | ||
nm.stop() | ||
|
||
if not save_trt_engine and model_dir: | ||
if not save_engine and model_dir: | ||
shutil.rmtree(model_dir) | ||
|
||
return (functional_result, accuracy_result) | ||
|
@@ -464,7 +464,7 @@ def run_existing_checkpoints( | |
test_deployment=False, | ||
stop_words_list=None, | ||
test_data_path=None, | ||
save_trt_engine=False, | ||
save_engine=False, | ||
in_framework=False, | ||
fp8_quantized=False, | ||
fp8_kvcache=False, | ||
|
@@ -497,9 +497,6 @@ def run_existing_checkpoints( | |
else: | ||
use_embedding_sharing = False | ||
|
||
if trt_llm_export_kwargs is None: | ||
trt_llm_export_kwargs = {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed here |
||
|
||
if in_framework: | ||
return run_in_framework_inference( | ||
model_name=model_name, | ||
|
@@ -542,7 +539,7 @@ def run_existing_checkpoints( | |
test_cpp_runtime=test_cpp_runtime, | ||
test_deployment=test_deployment, | ||
test_data_path=test_data_path, | ||
save_trt_engine=save_trt_engine, | ||
save_engine=save_engine, | ||
fp8_quantized=fp8_quantized, | ||
fp8_kvcache=fp8_kvcache, | ||
trt_llm_export_kwargs=trt_llm_export_kwargs, | ||
|
@@ -744,7 +741,7 @@ def get_args(): | |
default=None, | ||
) | ||
parser.add_argument( | ||
"--save_trt_engine", | ||
"--save_engine", | ||
type=str, | ||
default="False", | ||
) | ||
|
@@ -811,7 +808,7 @@ def str_to_bool(name: str, s: str, optional: bool = False) -> Optional[bool]: | |
args.test_cpp_runtime = str_to_bool("test_cpp_runtime", args.test_cpp_runtime) | ||
args.test_deployment = str_to_bool("test_deployment", args.test_deployment) | ||
args.functional_test = str_to_bool("functional_test", args.functional_test) | ||
args.save_trt_engine = str_to_bool("save_trt_engin", args.save_trt_engine) | ||
args.save_engine = str_to_bool("save_engine", args.save_engine) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renamed as this flag is for both TRT-LLM and vLLM engines. |
||
args.run_accuracy = str_to_bool("run_accuracy", args.run_accuracy) | ||
args.use_vllm = str_to_bool("use_vllm", args.use_vllm) | ||
args.lora = str_to_bool("lora", args.lora) | ||
|
@@ -871,7 +868,7 @@ def run_inference_tests(args): | |
test_cpp_runtime=args.test_cpp_runtime, | ||
run_accuracy=args.run_accuracy, | ||
test_data_path=args.test_data_path, | ||
save_trt_engine=args.save_trt_engine, | ||
save_engine=args.save_engine, | ||
in_framework=args.in_framework, | ||
fp8_quantized=args.export_fp8_quantized, | ||
fp8_kvcache=args.use_fp8_kv_cache, | ||
|
@@ -900,7 +897,7 @@ def run_inference_tests(args): | |
top_p=args.top_p, | ||
temperature=args.temperature, | ||
run_accuracy=args.run_accuracy, | ||
debug=True, | ||
debug=args.debug, | ||
test_data_path=args.test_data_path, | ||
) | ||
else: | ||
|
@@ -932,7 +929,7 @@ def run_inference_tests(args): | |
test_deployment=args.test_deployment, | ||
test_cpp_runtime=args.test_cpp_runtime, | ||
test_data_path=args.test_data_path, | ||
save_trt_engine=args.save_trt_engine, | ||
save_engine=args.save_engine, | ||
fp8_quantized=args.export_fp8_quantized, | ||
fp8_kvcache=args.use_fp8_kv_cache, | ||
trt_llm_export_kwargs=args.trt_llm_export_kwargs, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: just propagate the original exception (hence removing try / catch block)