Update agents.py
Browse files
agents.py
CHANGED
@@ -14,7 +14,7 @@ from langchain_community.vectorstores import SupabaseVectorStore
|
|
14 |
from langchain_core.messages import SystemMessage, HumanMessage
|
15 |
from langchain_core.tools import tool
|
16 |
|
17 |
-
os.environ["RWKV_V7_ON"] = '
|
18 |
os.environ['RWKV_JIT_ON'] = '1' # '1' for better speed
|
19 |
os.environ["RWKV_CUDA_ON"] = '0' # '1' to compile CUDA kernel (10x faster), requires c++ compiler & cuda libraries
|
20 |
|
@@ -172,7 +172,7 @@ def build_graph(provider: str = "rwkv"):
|
|
172 |
pth = hf_hub_download(repo_id="BlinkDL/rwkv7-g1", filename=f"{title}.pth")
|
173 |
model_path = pth.replace(".pth", "")
|
174 |
|
175 |
-
raw_llm = RWKV(model=model_path, strategy='
|
176 |
pipeline = PIPELINE(raw_llm, "rwkv_vocab_v20230424")
|
177 |
|
178 |
class RWKVWithTools:
|
|
|
14 |
from langchain_core.messages import SystemMessage, HumanMessage
|
15 |
from langchain_core.tools import tool
|
16 |
|
17 |
+
os.environ["RWKV_V7_ON"] = '1' # ==> enable RWKV-7 mode
|
18 |
os.environ['RWKV_JIT_ON'] = '1' # '1' for better speed
|
19 |
os.environ["RWKV_CUDA_ON"] = '0' # '1' to compile CUDA kernel (10x faster), requires c++ compiler & cuda libraries
|
20 |
|
|
|
172 |
pth = hf_hub_download(repo_id="BlinkDL/rwkv7-g1", filename=f"{title}.pth")
|
173 |
model_path = pth.replace(".pth", "")
|
174 |
|
175 |
+
raw_llm = RWKV(model=model_path, strategy='cpu fp32')
|
176 |
pipeline = PIPELINE(raw_llm, "rwkv_vocab_v20230424")
|
177 |
|
178 |
class RWKVWithTools:
|