Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ DESCRIPTION = """\
|
|
21 |
"""
|
22 |
|
23 |
MAX_MAX_NEW_TOKENS = 4096
|
24 |
-
DEFAULT_MAX_NEW_TOKENS =
|
25 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "3840"))
|
26 |
|
27 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
@@ -42,7 +42,7 @@ def generate(
|
|
42 |
message: str,
|
43 |
chat_history: list[tuple[str, str]],
|
44 |
system_prompt: str,
|
45 |
-
max_new_tokens: int =
|
46 |
temperature: float = 0.6,
|
47 |
top_p: float = 0.9,
|
48 |
top_k: int = 50,
|
|
|
21 |
"""
|
22 |
|
23 |
MAX_MAX_NEW_TOKENS = 4096
|
24 |
+
DEFAULT_MAX_NEW_TOKENS = 512
|
25 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "3840"))
|
26 |
|
27 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
|
42 |
message: str,
|
43 |
chat_history: list[tuple[str, str]],
|
44 |
system_prompt: str,
|
45 |
+
max_new_tokens: int = 512,
|
46 |
temperature: float = 0.6,
|
47 |
top_p: float = 0.9,
|
48 |
top_k: int = 50,
|