Spaces:
Running
on
Zero
Running
on
Zero
Reduce initial noising
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def find_answer_start(input_ids, marker_ids):
|
|
55 |
|
56 |
def get_noising_schedule(i, max_it, sharpness=5.0):
|
57 |
x = i / max_it
|
58 |
-
return (np.exp(-sharpness * x) - np.exp(-sharpness)) / (1 - np.exp(-sharpness))
|
59 |
|
60 |
def noisify_answer(input_ids, answer_start, threshold=1.0, eot_weight=1.0):
|
61 |
noised = input_ids.copy()
|
|
|
55 |
|
56 |
def get_noising_schedule(i, max_it, sharpness=5.0):
|
57 |
x = i / max_it
|
58 |
+
return 0.5 *(np.exp(-sharpness * x) - np.exp(-sharpness)) / (1 - np.exp(-sharpness))
|
59 |
|
60 |
def noisify_answer(input_ids, answer_start, threshold=1.0, eot_weight=1.0):
|
61 |
noised = input_ids.copy()
|