Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ def evaluate(
|
|
| 70 |
for i in range(int(token_count)):
|
| 71 |
|
| 72 |
input_ids = pipeline_v6.encode(ctx)[-ctx_limit:] if i == 0 else [token]
|
| 73 |
-
out, state = model_v6.forward(
|
| 74 |
for n in occurrence:
|
| 75 |
out[n] -= (args.alpha_presence + occurrence[n] * args.alpha_frequency)
|
| 76 |
|
|
@@ -124,7 +124,7 @@ examples = [
|
|
| 124 |
|
| 125 |
##################################################################################################################
|
| 126 |
with gr.Blocks(title=title_v6) as demo:
|
| 127 |
-
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>{title_v6} (only 0.1B !!!)</h1>\n</div>")
|
| 128 |
|
| 129 |
with gr.Tab("=== Base Model (Raw Generation) ==="):
|
| 130 |
gr.Markdown(f"This is [RWKV-7 World v2.8](https://huggingface.co/BlinkDL/rwkv-7-world) 0.1B (L12-D768) - a 100% attention-free RNN [RWKV-LM](https://github.com/BlinkDL/RWKV-LM). Supports 100+ world languages and code. Check [400+ Github RWKV projects](https://github.com/search?o=desc&p=1&q=rwkv&s=updated&type=Repositories). *** Can try examples (bottom of page) *** (can edit them). Demo limited to ctxlen {ctx_limit}.")
|
|
|
|
| 70 |
for i in range(int(token_count)):
|
| 71 |
|
| 72 |
input_ids = pipeline_v6.encode(ctx)[-ctx_limit:] if i == 0 else [token]
|
| 73 |
+
out, state = model_v6.forward(input_ids, state)
|
| 74 |
for n in occurrence:
|
| 75 |
out[n] -= (args.alpha_presence + occurrence[n] * args.alpha_frequency)
|
| 76 |
|
|
|
|
| 124 |
|
| 125 |
##################################################################################################################
|
| 126 |
with gr.Blocks(title=title_v6) as demo:
|
| 127 |
+
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>{title_v6} (!!! only 0.1B !!!)</h1>\n</div>")
|
| 128 |
|
| 129 |
with gr.Tab("=== Base Model (Raw Generation) ==="):
|
| 130 |
gr.Markdown(f"This is [RWKV-7 World v2.8](https://huggingface.co/BlinkDL/rwkv-7-world) 0.1B (L12-D768) - a 100% attention-free RNN [RWKV-LM](https://github.com/BlinkDL/RWKV-LM). Supports 100+ world languages and code. Check [400+ Github RWKV projects](https://github.com/search?o=desc&p=1&q=rwkv&s=updated&type=Repositories). *** Can try examples (bottom of page) *** (can edit them). Demo limited to ctxlen {ctx_limit}.")
|