Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -19,12 +19,12 @@ gpu_h = nvmlDeviceGetHandleByIndex(0)
|
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
20 |
|
21 |
ctx_limit = 4000
|
22 |
-
gen_limit =
|
23 |
|
24 |
########################## text rwkv ################################################################
|
25 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
26 |
|
27 |
-
title_v6 = "rwkv7-g1-0.
|
28 |
model_path_v6 = hf_hub_download(repo_id="BlinkDL/rwkv7-g1", filename=f"{title_v6}.pth")
|
29 |
model_v6 = RWKV(model=model_path_v6.replace('.pth',''), strategy='cuda fp16')
|
30 |
pipeline_v6 = PIPELINE(model_v6, "rwkv_vocab_v20230424")
|
@@ -126,7 +126,7 @@ with gr.Blocks(title=title_v6) as demo:
|
|
126 |
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>{title_v6}</h1>\n</div>")
|
127 |
|
128 |
with gr.Tab("=== Base Model (Raw Generation) ==="):
|
129 |
-
gr.Markdown(f'This is [RWKV7 G1](https://huggingface.co/BlinkDL/rwkv7-g1) 0.
|
130 |
with gr.Row():
|
131 |
with gr.Column():
|
132 |
prompt = gr.Textbox(lines=6, label="Prompt", value="User: simulate SpaceX mars landing using python\n\nAssistant: <think")
|
|
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
20 |
|
21 |
ctx_limit = 4000
|
22 |
+
gen_limit = 1200
|
23 |
|
24 |
########################## text rwkv ################################################################
|
25 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
26 |
|
27 |
+
title_v6 = "rwkv7-g1-0.4b-20250324-ctx4096"
|
28 |
model_path_v6 = hf_hub_download(repo_id="BlinkDL/rwkv7-g1", filename=f"{title_v6}.pth")
|
29 |
model_v6 = RWKV(model=model_path_v6.replace('.pth',''), strategy='cuda fp16')
|
30 |
pipeline_v6 = PIPELINE(model_v6, "rwkv_vocab_v20230424")
|
|
|
126 |
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>{title_v6}</h1>\n</div>")
|
127 |
|
128 |
with gr.Tab("=== Base Model (Raw Generation) ==="):
|
129 |
+
gr.Markdown(f'This is [RWKV7 G1](https://huggingface.co/BlinkDL/rwkv7-g1) 0.4B (!) L24-D1024 reasoning base LM - an attention-free pure 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}.')
|
130 |
with gr.Row():
|
131 |
with gr.Column():
|
132 |
prompt = gr.Textbox(lines=6, label="Prompt", value="User: simulate SpaceX mars landing using python\n\nAssistant: <think")
|