Update inference_1.py
Browse files- inference_1.py +2 -2
inference_1.py
CHANGED
|
@@ -2,7 +2,7 @@ from vllm import LLM, SamplingParams
|
|
| 2 |
import argparse
|
| 3 |
import json
|
| 4 |
|
| 5 |
-
def setup_model(model_path):
|
| 6 |
"""
|
| 7 |
Initialize the fine-tuned Qwen-2.5-7B model from a local path.
|
| 8 |
|
|
@@ -97,7 +97,7 @@ def main():
|
|
| 97 |
args = parser.parse_args()
|
| 98 |
|
| 99 |
# Initialize the model
|
| 100 |
-
llm = setup_model(args.model_path)
|
| 101 |
|
| 102 |
if args.mode == "single":
|
| 103 |
if not args.prompt:
|
|
|
|
| 2 |
import argparse
|
| 3 |
import json
|
| 4 |
|
| 5 |
+
def setup_model(model_path,tensor_parallel_size):
|
| 6 |
"""
|
| 7 |
Initialize the fine-tuned Qwen-2.5-7B model from a local path.
|
| 8 |
|
|
|
|
| 97 |
args = parser.parse_args()
|
| 98 |
|
| 99 |
# Initialize the model
|
| 100 |
+
llm = setup_model(args.model_path, args.tensor_parallel_size)
|
| 101 |
|
| 102 |
if args.mode == "single":
|
| 103 |
if not args.prompt:
|