Spaces:
Build error
Build error
Commit
·
9ad9458
1
Parent(s):
a7841c1
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,8 +56,8 @@ def infer(
|
|
| 56 |
max_new_tokens=10,
|
| 57 |
temperature=0.1,
|
| 58 |
top_p=1.0,
|
| 59 |
-
end_adj=0.0,
|
| 60 |
stop="<|endoftext|>",
|
|
|
|
| 61 |
seed=42,
|
| 62 |
):
|
| 63 |
global model
|
|
@@ -75,8 +75,8 @@ def infer(
|
|
| 75 |
stop = [x.strip(' ') for x in stop.split(',')]
|
| 76 |
seed = seed
|
| 77 |
|
| 78 |
-
assert 1 <= max_new_tokens <=
|
| 79 |
-
assert 0.0 <= temperature <=
|
| 80 |
assert 0.0 <= top_p <= 1.0
|
| 81 |
|
| 82 |
temperature = max(0.05, temperature)
|
|
|
|
| 56 |
max_new_tokens=10,
|
| 57 |
temperature=0.1,
|
| 58 |
top_p=1.0,
|
|
|
|
| 59 |
stop="<|endoftext|>",
|
| 60 |
+
end_adj=0.0,
|
| 61 |
seed=42,
|
| 62 |
):
|
| 63 |
global model
|
|
|
|
| 75 |
stop = [x.strip(' ') for x in stop.split(',')]
|
| 76 |
seed = seed
|
| 77 |
|
| 78 |
+
assert 1 <= max_new_tokens <= 512
|
| 79 |
+
assert 0.0 <= temperature <= 5.0
|
| 80 |
assert 0.0 <= top_p <= 1.0
|
| 81 |
|
| 82 |
temperature = max(0.05, temperature)
|