File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,6 @@ def get_parser():
24
24
action = "store_true" ,
25
25
default = False ,
26
26
)
27
- parser .add_argument (
28
- "--model-source" ,
29
- type = str ,
30
- default = "unsloth/Llama-3.1-8B-Instruct" ,
31
- help = "Model source." ,
32
- )
33
27
parser .add_argument (
34
28
"--dynamic-lora-loading-path" ,
35
29
type = str ,
Original file line number Diff line number Diff line change @@ -91,5 +91,11 @@ def main(args):
91
91
92
92
93
93
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 ())
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def main(args):
33
33
detokenize = True
34
34
35
35
processor_config = vLLMEngineProcessorConfig (
36
- model_source = "llava-hf/llava-1.5-7b-hf" ,
36
+ model_source = args . model_source ,
37
37
task_type = "generate" ,
38
38
engine_kwargs = dict (
39
39
tensor_parallel_size = tp_size ,
@@ -54,6 +54,7 @@ def main(args):
54
54
processor = build_llm_processor (
55
55
processor_config ,
56
56
preprocess = lambda row : dict (
57
+ model = args .model_source if args .lora_name is None else args .lora_name ,
57
58
messages = [
58
59
{"role" : "system" , "content" : "You are an assistant" },
59
60
{
@@ -91,4 +92,10 @@ def main(args):
91
92
92
93
if __name__ == "__main__" :
93
94
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
+ )
94
101
main (parser .parse_args ())
You can’t perform that action at this time.
0 commit comments