budivoy commited on
Commit
61b4df1
·
verified ·
1 Parent(s): db78547

Use tokenizer in Agent

Browse files
Files changed (1) hide show
  1. agents.py +4 -1
agents.py CHANGED
@@ -165,9 +165,11 @@ def build_graph(provider: str = "rwkv"):
165
  title = "rwkv7-g1-0.1b-20250307-ctx4096"
166
  pth = hf_hub_download(repo_id="BlinkDL/rwkv7-g1", filename=f"{title}.pth")
167
  model_path = pth.replace(".pth", "")
 
168
  raw_llm = RWKV(
169
  model=model_path,
170
- strategy="cpu fp32",
 
171
  )
172
 
173
  class RWKVWithTools:
@@ -209,6 +211,7 @@ def build_graph(provider: str = "rwkv"):
209
  # --- END RWKV SETUP ---
210
  else:
211
  raise ValueError("Invalid provider. Choose 'google', 'groq' or 'huggingface'.")
 
212
  # Bind tools to LLM
213
  llm_with_tools = llm.bind_tools(tools)
214
 
 
165
  title = "rwkv7-g1-0.1b-20250307-ctx4096"
166
  pth = hf_hub_download(repo_id="BlinkDL/rwkv7-g1", filename=f"{title}.pth")
167
  model_path = pth.replace(".pth", "")
168
+
169
  raw_llm = RWKV(
170
  model=model_path,
171
+ strategy="cpu fp32",
172
+ tokens_path="./rwkv_vocab_v20230424.txt",
173
  )
174
 
175
  class RWKVWithTools:
 
211
  # --- END RWKV SETUP ---
212
  else:
213
  raise ValueError("Invalid provider. Choose 'google', 'groq' or 'huggingface'.")
214
+
215
  # Bind tools to LLM
216
  llm_with_tools = llm.bind_tools(tools)
217