Skip to content

Commit 3e0fec7

Browse files
committed
[Data][LLM] Set different --model-source default for LLM/VLM
For backward compatibility Signed-off-by: Linkun Chen <github@lkchen.net>
1 parent 991a851 commit 3e0fec7

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

release/llm_tests/batch/args_utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ def get_parser():
2424
action="store_true",
2525
default=False,
2626
)
27-
parser.add_argument(
28-
"--model-source",
29-
type=str,
30-
default="unsloth/Llama-3.1-8B-Instruct",
31-
help="Model source.",
32-
)
3327
parser.add_argument(
3428
"--dynamic-lora-loading-path",
3529
type=str,

release/llm_tests/batch/run_llama.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,11 @@ def main(args):
9191

9292

9393
if __name__ == "__main__":
94-
args = get_parser().parse_args()
95-
main(args)
94+
parser = get_parser()
95+
parser.add_argument(
96+
"--model-source",
97+
type=str,
98+
default="unsloth/Llama-3.1-8B-Instruct",
99+
help="Model source.",
100+
)
101+
main(parser.parse_args())

release/llm_tests/batch/run_vision_language_model.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main(args):
3333
detokenize = True
3434

3535
processor_config = vLLMEngineProcessorConfig(
36-
model_source="llava-hf/llava-1.5-7b-hf",
36+
model_source=args.model_source,
3737
task_type="generate",
3838
engine_kwargs=dict(
3939
tensor_parallel_size=tp_size,
@@ -54,6 +54,7 @@ def main(args):
5454
processor = build_llm_processor(
5555
processor_config,
5656
preprocess=lambda row: dict(
57+
model=args.model_source if args.lora_name is None else args.lora_name,
5758
messages=[
5859
{"role": "system", "content": "You are an assistant"},
5960
{
@@ -91,4 +92,10 @@ def main(args):
9192

9293
if __name__ == "__main__":
9394
parser = get_parser()
95+
parser.add_argument(
96+
"--model-source",
97+
type=str,
98+
default="llava-hf/llava-1.5-7b-hf",
99+
help="Model source.",
100+
)
94101
main(parser.parse_args())

0 commit comments

Comments
 (0)