Spaces:
Running
Running
Commit
•
ec98626
1
Parent(s):
67df941
Update app.py
Browse files
app.py
CHANGED
@@ -72,10 +72,10 @@ DEFAULT_SYSTEM_PROMPT = "你是人工智慧助理,以下是用戶和人工智
|
|
72 |
endpoint_url = os.environ.get("ENDPOINT_URL", "http://127.0.0.1:8080")
|
73 |
client = Client(endpoint_url, timeout=120)
|
74 |
eos_token = "</s>"
|
75 |
-
MAX_MAX_NEW_TOKENS =
|
76 |
-
DEFAULT_MAX_NEW_TOKENS =
|
77 |
|
78 |
-
max_prompt_length =
|
79 |
|
80 |
model_name = "yentinglin/Taiwan-LLM-7B-v2.0-chat"
|
81 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
72 |
endpoint_url = os.environ.get("ENDPOINT_URL", "http://127.0.0.1:8080")
|
73 |
client = Client(endpoint_url, timeout=120)
|
74 |
eos_token = "</s>"
|
75 |
+
MAX_MAX_NEW_TOKENS = 4096
|
76 |
+
DEFAULT_MAX_NEW_TOKENS = 1536
|
77 |
|
78 |
+
max_prompt_length = 8192 - MAX_MAX_NEW_TOKENS - 10
|
79 |
|
80 |
model_name = "yentinglin/Taiwan-LLM-7B-v2.0-chat"
|
81 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|