SYMBOL INDEX (213 symbols across 24 files) FILE: API_DEMO.py function my_print (line 72) | def my_print(s): FILE: API_DEMO_CHAT.py function run_rnn (line 75) | def run_rnn(ctx): FILE: API_DEMO_WORLD.py function my_print (line 37) | def my_print(s): function my_qa_generator (line 66) | def my_qa_generator(ctx): function cfg_generator (line 137) | def cfg_generator(with_ctx, without_ctx, cfg_factor=1): FILE: RWKV_in_150_lines.py class RWKV_RNN (line 26) | class RWKV_RNN(torch.jit.ScriptModule): method __init__ (line 27) | def __init__(self, args): method layer_norm (line 54) | def layer_norm(self, x, w): method channel_mixing (line 58) | def channel_mixing(self, x, state, i:int, time_mix_k, time_mix_r, kw, ... method time_mixing (line 67) | def time_mixing(self, x, state, i:int, time_mix_k, time_mix_v, time_mi... method forward (line 95) | def forward(self, token, state): function sample_logits (line 118) | def sample_logits(out, temperature=1.0, top_p=0.8): FILE: RWKV_v5_demo.py class RWKV_TOKENIZER (line 14) | class RWKV_TOKENIZER(): method __init__ (line 18) | def __init__(self, file_name): method encodeBytes (line 49) | def encodeBytes(self, src: bytes) -> list[int]: method decodeBytes (line 70) | def decodeBytes(self, tokens): method encode (line 73) | def encode(self, src: str): method decode (line 76) | def decode(self, tokens): method printTokens (line 79) | def printTokens(self, tokens): function sample_logits (line 92) | def sample_logits(out, temperature=1.0, top_p=0.8): class RWKV_RNN (line 123) | class RWKV_RNN(MyModule): method __init__ (line 124) | def __init__(self, args): method layer_norm (line 155) | def layer_norm(self, x, w): method channel_mixing (line 159) | def channel_mixing(self, x, state, i:int, time_mix_k, time_mix_r, kw, ... method time_mixing (line 169) | def time_mixing(self, x, state, i:int, time_mix_k, time_mix_v, time_mi... method forward (line 198) | def forward(self, token, state): FILE: RWKV_v6_demo.py class RWKV_TOKENIZER (line 14) | class RWKV_TOKENIZER(): method __init__ (line 18) | def __init__(self, file_name): method encodeBytes (line 49) | def encodeBytes(self, src: bytes) -> list[int]: method decodeBytes (line 70) | def decodeBytes(self, tokens): method encode (line 73) | def encode(self, src: str): method decode (line 76) | def decode(self, tokens): method printTokens (line 79) | def printTokens(self, tokens): function sample_logits (line 92) | def sample_logits(out, temperature=1.0, top_p=0.8): class RWKV_RNN (line 121) | class RWKV_RNN(MyModule): method __init__ (line 122) | def __init__(self, args): method layer_norm (line 153) | def layer_norm(self, x, w): method channel_mixing (line 157) | def channel_mixing(self, x, state, i:int, time_maa_k, time_maa_r, kw, ... method time_mixing (line 168) | def time_mixing(self, x, state, i:int, x_maa, w_maa, k_maa, v_maa, r_m... method forward (line 207) | def forward(self, token, state): FILE: RWKV_v6_demo_cuda_bf16.py class RWKV_RNN (line 44) | class RWKV_RNN(MyModule): method __init__ (line 45) | def __init__(self, args): method forward (line 75) | def forward(self, token:int, state:List[torch.Tensor]): function time_mixing__ (line 104) | def time_mixing__(H:int, N:int, x, x_prev, state, maa_x, maa_wkvrg, tm_w... function channel_mixing__ (line 137) | def channel_mixing__(x, x_prev, time_maa_k, time_maa_r, kw, vw, rw): function sample_logits (line 154) | def sample_logits(logits, temperature:float=1.0, top_p:float=1.0, top_k:... class RWKV_TOKENIZER (line 180) | class RWKV_TOKENIZER(): method __init__ (line 184) | def __init__(self, file_name): method encodeBytes (line 215) | def encodeBytes(self, src: bytes) -> list[int]: method decodeBytes (line 236) | def decodeBytes(self, tokens): method encode (line 239) | def encode(self, src: str): method decode (line 242) | def decode(self, tokens): FILE: chat.py function run_rnn (line 231) | def run_rnn(tokens, newline_adj = 0): function save_all_stat (line 249) | def save_all_stat(srv, name, last_out): function load_all_stat (line 256) | def load_all_stat(srv, name): function reply_msg (line 277) | def reply_msg(msg): function on_message (line 280) | def on_message(message): FILE: music/run.py class ABCTokenizer (line 26) | class ABCTokenizer(): method __init__ (line 27) | def __init__(self): method encode (line 31) | def encode(self, text): method decode (line 34) | def decode(self, ids): FILE: run_lm_eval.py class TokenizerWrapper (line 51) | class TokenizerWrapper: method __init__ (line 52) | def __init__(self, tokenizer): method encode (line 56) | def encode(self, string: str, add_special_tokens=False): method decode (line 59) | def decode(self, tokens): class EvalHarnessAdapter (line 62) | class EvalHarnessAdapter(GPT2LM): method __init__ (line 63) | def __init__(self): method _loglikelihood_tokens (line 89) | def _loglikelihood_tokens(self, requests, disable_tqdm=False): method run_eval (line 134) | def run_eval(self, eval_tasks=None, num_fewshot=0, bootstrap_iters=2): FILE: rwkv_pip_package/src/rwkv/cuda/gemm_fp16_cublas.cpp function gemm_fp16_cublas (line 28) | void gemm_fp16_cublas(torch::Tensor a, torch::Tensor b, torch::Tensor c) { FILE: rwkv_pip_package/src/rwkv/cuda/rwkv5_op.cpp function forward_bf16 (line 12) | void forward_bf16(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function forward_fp16 (line 16) | void forward_fp16(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function forward_fp32 (line 20) | void forward_fp32(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function PYBIND11_MODULE (line 25) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 30) | TORCH_LIBRARY(rwkv5, m) { FILE: rwkv_pip_package/src/rwkv/cuda/rwkv6_op.cpp function forward_bf16 (line 12) | void forward_bf16(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function forward_fp16 (line 16) | void forward_fp16(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function forward_fp32 (line 20) | void forward_fp32(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function PYBIND11_MODULE (line 25) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 30) | TORCH_LIBRARY(rwkv6, m) { FILE: rwkv_pip_package/src/rwkv/cuda/rwkv7_op.cpp function forward_bf16 (line 12) | void forward_bf16(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function forward_fp16 (line 15) | void forward_fp16(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function forward_fp32 (line 18) | void forward_fp32(int64_t B, int64_t T, int64_t C, int64_t H, torch::Ten... function TORCH_LIBRARY (line 22) | TORCH_LIBRARY(wkv7s, m) { FILE: rwkv_pip_package/src/rwkv/cuda/wrapper.cpp function wkv_forward (line 27) | void wkv_forward(int64_t B, int64_t T, int64_t C, function mm8_seq (line 50) | void mm8_seq(int64_t B, int64_t N, int64_t M, function mm8_one (line 84) | void mm8_one(int64_t N, int64_t M, function PYBIND11_MODULE (line 125) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 134) | TORCH_LIBRARY(rwkv, m) { FILE: rwkv_pip_package/src/rwkv/model.py function __nop (line 24) | def __nop(ob): function cuda_wkv (line 52) | def cuda_wkv(T: int, C: int, w, u, k, v, aa, bb, pp): function cuda_mm8_seq (line 64) | def cuda_mm8_seq(B: int, N: int, M: int, x, w, mx, rx, my, ry): function cuda_mm8_one (line 76) | def cuda_mm8_one(N: int, M: int, x, w, mx, rx, my, ry): function torch_mm8_seq (line 92) | def torch_mm8_seq(x, w, mx, rx, my, ry): function torch_mm8_one (line 96) | def torch_mm8_one(x, w, mx, rx, my, ry): function mm8_seq (line 101) | def mm8_seq(x, w, mx, rx, my, ry): function mm8_one (line 108) | def mm8_one(x, w, mx, rx, my, ry): function mm8_seq (line 116) | def mm8_seq(x, w, mx, rx, my, ry): function mm8_one (line 119) | def mm8_one(x, w, mx, rx, my, ry): function mm8 (line 122) | def mm8(x: torch.Tensor, w: torch.Tensor, mx: torch.Tensor, rx: torch.Te... function matmul (line 127) | def matmul(a, b, mx: Optional[torch.Tensor]=None, rx: Optional[torch.Ten... function matmul_float (line 144) | def matmul_float(a, b, output_dtype: Optional[torch.dtype]=None): function matmul_float (line 166) | def matmul_float(a, b, output_dtype: Optional[torch.dtype]=None): class WKV_7 (line 198) | class WKV_7(torch.autograd.Function): method forward (line 200) | def forward(ctx, state, r, w, k, v, a, b): function RWKV7_OP (line 218) | def RWKV7_OP(state, r, w, k, v, a, b): class RWKV_x070 (line 223) | class RWKV_x070(MyModule): method __init__ (line 224) | def __init__(self, model, strategy): method generate_zero_state (line 284) | def generate_zero_state(self): method forward (line 292) | def forward(self, idx, state, full_output=False): method forward_one (line 306) | def forward_one(self, idx:int, state:List[torch.Tensor]): method forward_one (line 336) | def forward_one(self, idx:int, state:List[torch.Tensor]): method forward_one_alt (line 366) | def forward_one_alt(self, x:torch.Tensor, state:List[torch.Tensor]): method forward_one_alt (line 395) | def forward_one_alt(self, x:torch.Tensor, state:List[torch.Tensor]): method forward_seq (line 426) | def forward_seq(self, idx:List[int], state:List[torch.Tensor], full_ou... method forward_seq (line 458) | def forward_seq(self, idx:List[int], state:List[torch.Tensor], full_ou... function RWKV_x070_TMix_one (line 492) | def RWKV_x070_TMix_one(layer_id: int, H:int, N:int, x, x_prev, v_first, ... function RWKV_x070_TMix_seq (line 520) | def RWKV_x070_TMix_seq(layer_id: int, H:int, N:int, x, x_prev, v_first, ... function RWKV_x070_TMix_seq (line 545) | def RWKV_x070_TMix_seq(layer_id: int, H:int, N:int, x, x_prev, v_first, ... function RWKV_x070_CMix_one (line 578) | def RWKV_x070_CMix_one(x, x_prev, x_k, K_, V_, semb_, s1_, s2_, s0_): function RWKV_x070_CMix_seq (line 587) | def RWKV_x070_CMix_seq(x, x_prev, x_k, K_, V_, semb_, s1_, s2_, s0_): function RWKV_x070_CMix_one (line 597) | def RWKV_x070_CMix_one(x, x_prev, x_k, K_, V_): function RWKV_x070_CMix_seq (line 604) | def RWKV_x070_CMix_seq(x, x_prev, x_k, K_, V_): class RWKV (line 612) | class RWKV(MyModule): method __init__ (line 613) | def __init__(self, model, strategy, verbose = True, convert_and_save_a... method RUN_RWKV_5 (line 975) | def RUN_RWKV_5(self, B, T, C, H, state, r, k, v, w, u): method RUN_RWKV_6 (line 978) | def RUN_RWKV_6(self, B, T, C, H, state, r, k, v, w, u): method ffn_one (line 984) | def ffn_one(self, x, sx, ln_w, ln_b, k_mix, r_mix, kw, vw, rw, kmx, kr... method ffn_seq (line 995) | def ffn_seq(self, x, sx, ln_w, ln_b, k_mix, r_mix, kw, vw, rw, kmx, kr... method ffn_one_v6 (line 1007) | def ffn_one_v6(self, x, sx, ln_w, ln_b, k_maa, r_maa, kw, vw, rw, kmx,... method ffn_seq_v6 (line 1019) | def ffn_seq_v6(self, x, sx, ln_w, ln_b, k_maa, r_maa, kw, vw, rw, kmx,... method att_one (line 1034) | def att_one(self, x, sx, aa, bb, pp, ln_w, ln_b, k_mix, v_mix, r_mix, ... method att_seq (line 1058) | def att_seq(self, x, sx, aa, bb, pp, ln_w, ln_b, k_mix, v_mix, r_mix, ... method att_one_v5 (line 1091) | def att_one_v5(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v_mix, r... method att_seq_v5 (line 1116) | def att_seq_v5(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v_mix, r... method att_one_v5_1 (line 1157) | def att_one_v5_1(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v_mix,... method att_seq_v5_1 (line 1184) | def att_seq_v5_1(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v_mix,... method att_seq_v5_2 (line 1227) | def att_seq_v5_2(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v_mix,... method att_one_v6_0 (line 1263) | def att_one_v6_0(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, x_maa, w_maa,... method att_seq_v6_0 (line 1301) | def att_seq_v6_0(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, x_maa, w_maa,... method cuda_att_seq (line 1346) | def cuda_att_seq(self, x, sx, aa, bb, pp, ln_w, ln_b, k_mix, v_mix, r_... method v5_2_before (line 1363) | def v5_2_before(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v_mix, ... method v5_2_after (line 1379) | def v5_2_after(self, t_decay, out, s, x, xxx, g, lx_w, lx_b, ow, omx, ... method cuda_att_seq_v5_2 (line 1392) | def cuda_att_seq_v5_2(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, k_mix, v... method v6_0_before (line 1404) | def v6_0_before(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, x_maa, w_maa, ... method cuda_att_seq_v6_0 (line 1431) | def cuda_att_seq_v6_0(self, x, sx, s, ln_w, ln_b, lx_w, lx_b, x_maa, w... method forward (line 1443) | def forward(self, tokens, state, full_output=False): FILE: rwkv_pip_package/src/rwkv/rwkv_tokenizer.py class TRIE (line 5) | class TRIE: method __init__ (line 9) | def __init__(self, front=None, ch=None): method __repr__ (line 15) | def __repr__(self): method add (line 24) | def add(self, key:bytes, idx:int=0, val=None): method find_longest (line 35) | def find_longest(self, key:bytes, idx:int=0): class TRIE_TOKENIZER (line 49) | class TRIE_TOKENIZER(): method __init__ (line 50) | def __init__(self, file_name): method encodeBytes (line 72) | def encodeBytes(self, src:bytes): method decodeBytes (line 83) | def decodeBytes(self, tokens): method encode (line 86) | def encode(self, src): method decode (line 89) | def decode(self, tokens): method printTokens (line 95) | def printTokens(self, tokens): FILE: rwkv_pip_package/src/rwkv/utils.py class PIPELINE_ARGS (line 10) | class PIPELINE_ARGS(): method __init__ (line 11) | def __init__(self, temperature=1.0, top_p=0.85, top_k=0, alpha_frequen... class PIPELINE (line 22) | class PIPELINE(): method __init__ (line 23) | def __init__(self, model, WORD_NAME): method refine_context (line 36) | def refine_context(self, context): method encode (line 46) | def encode(self, x): method decode (line 52) | def decode(self, x): method sample_logits (line 55) | def sample_logits(self, logits, temperature=1.0, top_p=0.85, top_k=0): method generate (line 90) | def generate(self, ctx, token_count=100, args=PIPELINE_ARGS(), callbac... FILE: src/model_run.py function __nop (line 13) | def __nop(ob): class RWKV_RNN (line 27) | class RWKV_RNN(MyModule): method __init__ (line 28) | def __init__(self, args): method LN (line 131) | def LN(self, x, w): method FF_one (line 137) | def FF_one(self, x, state, i:int, time_mix_k, time_mix_r, kw, vw, rw): method FF_seq (line 149) | def FF_seq(self, x, state, i:int, time_mix_k, time_mix_r, kw, vw, rw): method SA_one (line 161) | def SA_one(self, x, state, i:int, time_mix_k, time_mix_v, time_mix_r, ... method SA_seq (line 192) | def SA_seq(self, x, state, i:int, time_mix_k, time_mix_v, time_mix_r, ... method forward (line 229) | def forward(self, tokens, state, preprocess_only = False): FILE: src/utils.py function record_time (line 14) | def record_time(name): class TOKENIZER (line 21) | class TOKENIZER(): method __init__ (line 22) | def __init__(self, WORD_NAME): method refine_context (line 25) | def refine_context(self, context): method encode (line 35) | def encode(self, x): method decode (line 38) | def decode(self, x): method sample_logits (line 41) | def sample_logits(self, logits, x, ctx_len, temperature=1.0, top_p=1.0): FILE: tokenizer/rwkv_tokenizer.py class RWKV_TOKENIZER (line 39) | class RWKV_TOKENIZER(): method __init__ (line 43) | def __init__(self, file_name): method encodeBytes (line 74) | def encodeBytes(self, src: bytes) -> list[int]: method decodeBytes (line 95) | def decodeBytes(self, tokens): method encode (line 98) | def encode(self, src: str): method decode (line 101) | def decode(self, tokens): method printTokens (line 104) | def printTokens(self, tokens): class TRIE (line 119) | class TRIE: method __init__ (line 123) | def __init__(self, front=None, ch=None): method __repr__ (line 129) | def __repr__(self): method add (line 138) | def add(self, key:bytes, idx:int=0, val=None): method find_longest (line 149) | def find_longest(self, key:bytes, idx:int=0): class TRIE_TOKENIZER (line 163) | class TRIE_TOKENIZER(): method __init__ (line 164) | def __init__(self, file_name): method encodeBytes (line 186) | def encodeBytes(self, src:bytes): method decodeBytes (line 197) | def decodeBytes(self, tokens): method encode (line 200) | def encode(self, src): method decode (line 203) | def decode(self, tokens): method printTokens (line 206) | def printTokens(self, tokens): function benchmark (line 249) | def benchmark(XXX): FILE: v2/benchmark.py function record_time (line 92) | def record_time(name): FILE: v2/chat.py function load_prompt (line 110) | def load_prompt(PROMPT_FILE): function run_rnn (line 149) | def run_rnn(tokens, newline_adj = 0): function save_all_stat (line 167) | def save_all_stat(srv, name, last_out): function load_all_stat (line 174) | def load_all_stat(srv, name): function fix_tokens (line 182) | def fix_tokens(tokens): function reply_msg (line 204) | def reply_msg(msg): function on_message (line 207) | def on_message(message): FILE: v2/convert_model.py function get_args (line 12) | def get_args():