Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from pynvml import *
|
|
6 |
nvmlInit()
|
7 |
gpu_h = nvmlDeviceGetHandleByIndex(0)
|
8 |
ctx_limit = 2000
|
9 |
-
title = "RWKV-5-World-
|
10 |
|
11 |
os.environ["RWKV_JIT_ON"] = '1'
|
12 |
os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
|
@@ -78,7 +78,7 @@ def evaluate(
|
|
78 |
|
79 |
gpu_info = nvmlDeviceGetMemoryInfo(gpu_h)
|
80 |
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
81 |
-
print(f'{timestamp} - vram {gpu_info.total} used {gpu_info.used} free {gpu_info.free}')
|
82 |
del out
|
83 |
del state
|
84 |
gc.collect()
|
@@ -112,7 +112,7 @@ Edward:''', 333, 1, 0.3, 0, 1],
|
|
112 |
with gr.Blocks(title=title) as demo:
|
113 |
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>RWKV-5 World v2 - {title}</h1>\n</div>")
|
114 |
with gr.Tab("Raw Generation"):
|
115 |
-
gr.Markdown(f"This is [RWKV-5 World v2](https://huggingface.co/BlinkDL/rwkv-5-world) with
|
116 |
with gr.Row():
|
117 |
with gr.Column():
|
118 |
prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
|
|
|
6 |
nvmlInit()
|
7 |
gpu_h = nvmlDeviceGetHandleByIndex(0)
|
8 |
ctx_limit = 2000
|
9 |
+
title = "RWKV-5-World-3B-v2-20231113-ctx4096"
|
10 |
|
11 |
os.environ["RWKV_JIT_ON"] = '1'
|
12 |
os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
|
|
|
78 |
|
79 |
gpu_info = nvmlDeviceGetMemoryInfo(gpu_h)
|
80 |
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
81 |
+
print(f'{timestamp} - vram {gpu_info.total} used {gpu_info.used} free {gpu_info.free}')
|
82 |
del out
|
83 |
del state
|
84 |
gc.collect()
|
|
|
112 |
with gr.Blocks(title=title) as demo:
|
113 |
gr.HTML(f"<div style=\"text-align: center;\">\n<h1>RWKV-5 World v2 - {title}</h1>\n</div>")
|
114 |
with gr.Tab("Raw Generation"):
|
115 |
+
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}.")
|
116 |
with gr.Row():
|
117 |
with gr.Column():
|
118 |
prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
|