Support prompt file as positional arg in stage1
This commit is contained in:
@@ -12,6 +12,13 @@ from vllm import LLM, SamplingParams
|
||||
|
||||
MODEL_PATH = os.environ.get("MODEL_PATH", "/workspace/models/SmolLM3-3B")
|
||||
PROMPT_FILE = os.environ.get("PROMPT_FILE", "/workspace/prompts/smol_write_file.txt")
|
||||
# Also support passing as first positional arg
|
||||
import sys
|
||||
if len(sys.argv) > 1 and not sys.argv[1].startswith("-"):
|
||||
if "/" in sys.argv[1]:
|
||||
PROMPT_FILE = sys.argv[1]
|
||||
else:
|
||||
PROMPT_FILE = f"/workspace/prompts/{sys.argv[1]}"
|
||||
MAX_TOKENS = int(os.environ.get("MAX_TOKENS", "512"))
|
||||
TEMPERATURE = float(os.environ.get("TEMPERATURE", "0.0"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user