tenet commited on
Commit
c0828ba
1 Parent(s): bf32563

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -7
main.py CHANGED
@@ -1,15 +1,10 @@
1
- import sys
2
  import os
3
  import math
4
  import random
5
  import numpy as np
6
  import gradio as gr
7
- from rwkv.model import RWKV
8
  from transformers import AutoTokenizer
9
-
10
- # Add RWKV directory to Python path
11
- rwkv_dir = os.path.join(os.getcwd(), 'RWKV-LM')
12
- sys.path.append(rwkv_dir)
13
 
14
  # Define the Node class for MCTS
15
  class Node:
@@ -121,7 +116,7 @@ model_name = "BlinkDL/rwkv-4-raven"
121
  tokenizer = AutoTokenizer.from_pretrained("gpt2") # Use a tokenizer from a supported model
122
 
123
  # Load the RWKV model
124
- model = RWKV(model_name=model_name, strategy="cuda fp16")
125
 
126
  # Generate Chain-of-Thought
127
  def generate_cot(state):
 
 
1
  import os
2
  import math
3
  import random
4
  import numpy as np
5
  import gradio as gr
 
6
  from transformers import AutoTokenizer
7
+ from rwkv import RWKV
 
 
 
8
 
9
  # Define the Node class for MCTS
10
  class Node:
 
116
  tokenizer = AutoTokenizer.from_pretrained("gpt2") # Use a tokenizer from a supported model
117
 
118
  # Load the RWKV model
119
+ model = RWKV(model=model_name, strategy="cuda fp16")
120
 
121
  # Generate Chain-of-Thought
122
  def generate_cot(state):