Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ from rwkv.model import RWKV
|
|
| 15 |
model_path = hf_hub_download(repo_id="BlinkDL/rwkv-4-world", filename=f"{title}.pth")
|
| 16 |
model = RWKV(model=model_path, strategy='cuda fp16i8 *8 -> cuda fp16')
|
| 17 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
| 18 |
-
pipeline = PIPELINE(model, "
|
| 19 |
|
| 20 |
def generate_prompt(instruction, input=None):
|
| 21 |
instruction = instruction.strip().replace('\r\n','\n').replace('\n\n','\n').replace('\n\n','\n')
|
|
@@ -171,7 +171,7 @@ def chat(
|
|
| 171 |
nl_bias = 0
|
| 172 |
else:
|
| 173 |
nl_bias = (i - 130) * 0.25
|
| 174 |
-
out[
|
| 175 |
for n in occurrence:
|
| 176 |
out[n] -= (args.alpha_presence + occurrence[n] * args.alpha_frequency)
|
| 177 |
|
|
|
|
| 15 |
model_path = hf_hub_download(repo_id="BlinkDL/rwkv-4-world", filename=f"{title}.pth")
|
| 16 |
model = RWKV(model=model_path, strategy='cuda fp16i8 *8 -> cuda fp16')
|
| 17 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
| 18 |
+
pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
|
| 19 |
|
| 20 |
def generate_prompt(instruction, input=None):
|
| 21 |
instruction = instruction.strip().replace('\r\n','\n').replace('\n\n','\n').replace('\n\n','\n')
|
|
|
|
| 171 |
nl_bias = 0
|
| 172 |
else:
|
| 173 |
nl_bias = (i - 130) * 0.25
|
| 174 |
+
out[11] += nl_bias
|
| 175 |
for n in occurrence:
|
| 176 |
out[n] -= (args.alpha_presence + occurrence[n] * args.alpha_frequency)
|
| 177 |
|