Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
21 |
ctx_limit = 3500
|
22 |
########################## text rwkv ################################################################
|
23 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
24 |
-
title = "RWKV-5-World-
|
25 |
model_path = hf_hub_download(repo_id="BlinkDL/rwkv-5-world", filename=f"{title}.pth")
|
26 |
model = RWKV(model=model_path, strategy='cuda fp16')
|
27 |
pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
|
@@ -256,7 +256,7 @@ def chatbot(image, question):
|
|
256 |
with gr.Blocks(title=title) as demo:
|
257 |
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>RWKV-5 World v2 - {title}</h1>\n</div>")
|
258 |
with gr.Tab("Raw Generation"):
|
259 |
-
gr.Markdown(f"This is [RWKV-5 World v2](https://huggingface.co/BlinkDL/rwkv-5-world) with
|
260 |
with gr.Row():
|
261 |
with gr.Column():
|
262 |
prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
|
|
|
21 |
ctx_limit = 3500
|
22 |
########################## text rwkv ################################################################
|
23 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
24 |
+
title = "RWKV-5-World-3B-v2-20231113-ctx4096"
|
25 |
model_path = hf_hub_download(repo_id="BlinkDL/rwkv-5-world", filename=f"{title}.pth")
|
26 |
model = RWKV(model=model_path, strategy='cuda fp16')
|
27 |
pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
|
|
|
256 |
with gr.Blocks(title=title) as demo:
|
257 |
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>RWKV-5 World v2 - {title}</h1>\n</div>")
|
258 |
with gr.Tab("Raw Generation"):
|
259 |
+
gr.Markdown(f"This is [RWKV-5 World v2](https://huggingface.co/BlinkDL/rwkv-5-world) with 3B params - a 100% attention-free RNN [RWKV-LM](https://github.com/BlinkDL/RWKV-LM). Supports all 100+ world languages and code. And we have [200+ Github RWKV projects](https://github.com/search?o=desc&p=1&q=rwkv&s=updated&type=Repositories). *** Please try examples first (bottom of page) *** (edit them to use your question). Demo limited to ctxlen {ctx_limit}.")
|
260 |
with gr.Row():
|
261 |
with gr.Column():
|
262 |
prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
|