Repository Analysis

BlinkDL/RWKV-LM

RWKV (pronounced RwaKuv) is an RNN with great LLM performance, which can also be directly trained like a GPT transformer (parallelizable). We are at RWKV-7 "Goose". So it's combining the best of RNN and transformer - great performance, linear time, constant space (no kv-cache), fast training, infinite ctx_len, and free sentence embedding.

14.2 Low AI signal View on GitHub
14.2
Adjusted Score
14.2
Raw Score
100%
Time Factor
2026-05-26
Last Push
14,542
Stars
Python
Language
23,774
Lines of Code
127
Files
271
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 12MEDIUM 0LOW 259

Pattern Findings

271 matches across 9 categories. Click a row to expand file-level details.

Unused Imports124 hits · 124 pts
SeverityFileLineSnippet
LOWRWKV-v7/rwkv_v7_demo.py5
LOWRWKV-v7/rwkv_v7_demo.py5
LOWRWKV-v7/rwkv_mmlu_eval.py4
LOWRWKV-v7/rwkv_mmlu_eval.py4
LOWRWKV-v7/rwkv_mmlu_eval.py14
LOWRWKV-v7/train_temp/rwkv7_train_simplified.py5
LOWRWKV-v7/train_temp/train.py11
LOWRWKV-v7/train_temp/train.py65
LOWRWKV-v7/train_temp/train.py65
LOWRWKV-v7/train_temp/train.py65
LOWRWKV-v7/train_temp/src/model.py5
LOWRWKV-v7/train_temp/src/model.py8
LOWRWKV-v7/train_temp/src/model.py10
LOWRWKV-v7/train_temp/src/model.py10
LOWRWKV-v7/train_temp/src/dataset.py5
LOWRWKV-v7/train_temp/src/dataset.py5
LOWRWKV-v7/train_temp/src/dataset.py5
LOWRWKV-v7/train_temp/src/dataset.py5
LOWRWKV-v7/train_temp/src/dataset.py6
LOWRWKV-v7/train_temp/src/trainer.py1
LOWRWKV-v7/train_temp/src/trainer.py1
LOWRWKV-v7/train_temp/src/trainer.py3
LOWRWKV-v7/train_temp/src/trainer.py5
LOWRWKV-v8/251016_rosa_1bit_run.py3
LOWRWKV-v8/251018_rosa_4bit_run.py3
LOWRWKV-v8/260222_rosa4bitLM_L12.py5
LOWRWKV-v8/260222_rosa4bitLM_L12.py5
LOWRWKV-v8/260222_rosa4bitLM_L12.py5
LOWRWKV-v8/260222_rosa4bitLM_L12.py5
LOWRWKV-v8/260212_rosa1bitLM_L12.py5
LOWRWKV-v8/260212_rosa1bitLM_L12.py5
LOWRWKV-v8/260212_rosa1bitLM_L12.py5
LOWRWKV-v8/260212_rosa1bitLM_L12.py5
LOWRWKV-v1/train.py5
LOWRWKV-v1/train.py5
LOWRWKV-v1/train.py5
LOWRWKV-v1/train.py5
LOWRWKV-v1/src/utils.py4
LOWRWKV-v1/src/trainer.py3
LOWRWKV-v1/src/trainer.py6
LOWRWKV-v1/src/trainer.py7
LOWRWKV-v4neo/img_demoAE.py5
LOWRWKV-v4neo/run.py6
LOWRWKV-v4neo/train.py11
LOWRWKV-v4neo/train.py135
LOWRWKV-v4neo/train.py135
LOWRWKV-v4neo/train.py135
LOWRWKV-v4neo/src/model_run.py7
LOWRWKV-v4neo/src/model_run.py10
LOWRWKV-v4neo/src/model_run.py10
LOWRWKV-v4neo/src/model.py12
LOWRWKV-v4neo/src/model.py12
LOWRWKV-v4neo/src/dataset.py5
LOWRWKV-v4neo/src/dataset.py5
LOWRWKV-v4neo/src/model_img.py6
LOWRWKV-v4neo/src/model_img.py12
LOWRWKV-v4neo/src/model_img.py12
LOWRWKV-v4neo/src/model_img.py14
LOWRWKV-v4neo/src/binidx.py1
LOWRWKV-v4neo/src/binidx.py5
64 more matches not shown…
Deep Nesting75 hits · 75 pts
SeverityFileLineSnippet
LOWRWKV-v7/rwkv_v7a_demo.py345
LOWRWKV-v7/rwkv_v8_rc00_demo.py339
LOWRWKV-v7/rwkv_v7_demo_fast.py334
LOWRWKV-v7/rwkv_v7_demo_rnn.py234
LOWRWKV-v7/rwkv_v7_demo.py88
LOWRWKV-v7/rwkv_v7b_demo.py311
LOWRWKV-v7/rwkv_v8_rc00_hybrid_demo.py295
LOWRWKV-v7/train_temp/rwkv7_train_simplified.py67
LOWRWKV-v7/train_temp/rwkv7_train_simplified.py89
LOWRWKV-v7/train_temp/src/model.py499
LOWRWKV-v7/train_temp/src/model.py894
LOWRWKV-v7/train_temp/src/model.py526
LOWRWKV-v7/train_temp/src/trainer.py159
LOWRWKV-v7/train_temp/src/trainer.py130
LOWRWKV-v8/251105_reverse_run.py41
LOWRWKV-v8/251105_reverse_run.py145
LOWRWKV-v8/251105_reverse_run.py167
LOWRWKV-v8/251016_rosa_1bit_run.py9
LOWRWKV-v8/251024_rosaQKV_run.py29
LOWRWKV-v8/251024_rosaQKV_run.py133
LOWRWKV-v8/251024_rosaQKV_run.py155
LOWRWKV-v8/251014_rosa_onlyemb_train.py9
LOWRWKV-v8/251014_rosa_1bit_layer.py6
LOWRWKV-v8/251014_rosa_1bit_layer.py42
LOWRWKV-v8/251014_rosa_1bit_train.py9
LOWRWKV-v8/251014_rosa_1bit_train.py61
LOWRWKV-v8/251018_rosa_4bit_run.py9
LOWRWKV-v8/260222_rosa4bitLM_L12.py156
LOWRWKV-v8/260222_rosa4bitLM_L12.py84
LOWRWKV-v8/260222_rosa4bitLM_L12.py179
LOWRWKV-v8/260212_rosa1bitLM_L12.py150
LOWRWKV-v8/260212_rosa1bitLM_L12.py78
LOWRWKV-v1/src/model.py16
LOWRWKV-v1/src/model.py392
LOWRWKV-v1/src/model.py461
LOWRWKV-v1/src/trainer.py60
LOWRWKV-v1/src/trainer.py65
LOWRWKV-v4neo/chat.py197
LOWRWKV-v4neo/math_demo/run.py41
LOWRWKV-v4neo/src/model_run.py36
LOWRWKV-v4neo/src/model.py747
LOWRWKV-v4neo/src/model.py822
LOWRWKV-v4neo/src/model.py913
LOWRWKV-v4neo/src/dataset.py15
LOWRWKV-v4neo/src/dataset.py107
LOWRWKV-v4neo/src/model_img.py295
LOWRWKV-v4neo/src/trainer.py203
LOWRWKV-v4neo/src/trainer.py171
LOWRWKV-v3/src/model_run.py182
LOWRWKV-v3/src/model.py62
LOWRWKV-v3/src/trainer.py78
LOWRWKV-v3/src/trainer.py83
LOWRWKV-v2-RNN/src/model_run.py14
LOWRWKV-v2-RNN/src/model.py63
LOWRWKV-v2-RNN/src/trainer.py78
LOWRWKV-v2-RNN/src/trainer.py83
LOWRWKV-v4/src/model_run.py211
LOWRWKV-v4/src/model_run.py241
LOWRWKV-v4/src/model.py107
LOWRWKV-v4/src/model.py382
15 more matches not shown…
Cross-File Repetition12 hits · 60 pts
SeverityFileLineSnippet
HIGHRWKV-v7/train_temp/src/model.py0############################################################################ # # init model weight (slow for large model
HIGHRWKV-v4neo/src/model.py0############################################################################ # # init model weight (slow for large model
HIGHRWKV-v4neo/src/model_img.py0############################################################################ # # init model weight (slow for large model
HIGHRWKV-v5/src/model.py0############################################################################ # # init model weight (slow for large model
HIGHRWKV-v7/train_temp/src/binidx.py0if distributed is initialized print only on rank 0.
HIGHRWKV-v4neo/src/binidx.py0if distributed is initialized print only on rank 0.
HIGHRWKV-v4/src/binidx.py0if distributed is initialized print only on rank 0.
HIGHRWKV-v5/src/binidx.py0if distributed is initialized print only on rank 0.
HIGHRWKV-v7/train_temp/src/binidx.py0retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [
HIGHRWKV-v4neo/src/binidx.py0retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [
HIGHRWKV-v4/src/binidx.py0retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [
HIGHRWKV-v5/src/binidx.py0retrieves a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [
Verbosity Indicators19 hits · 32 pts
SeverityFileLineSnippet
LOWRWKV-v4neo/run.py20# Step 1: set model & config (use v4 to run your trained-from-scratch models. v4 and v4neo are compatible)
LOWRWKV-v4neo/run.py78# Step 2: set prompt & sampling stuffs
LOWRWKV-v3/run.py19### Step 1: set model ##################################################################################
LOWRWKV-v3/run.py37### Step 2: set context ################################################################################
LOWRWKV-v3/train.py28### Step 1: set training data ##########################################################################
LOWRWKV-v3/train.py34### Step 2: set model size #############################################################################
LOWRWKV-v3/train.py48### Step 3: set batch size #############################################################################
LOWRWKV-v3/train.py55### Step 4: set learning rate, number of mini-epochs #######################################################
LOWRWKV-v2-RNN/run.py20### Step 1: set model ##################################################################################
LOWRWKV-v2-RNN/run.py44### Step 2: set context ################################################################################
LOWRWKV-v2-RNN/train.py17### Step 1: set training data ##########################################################################
LOWRWKV-v2-RNN/train.py23### Step 2: set model size #############################################################################
LOWRWKV-v2-RNN/train.py32### Step 3: set batch size #############################################################################
LOWRWKV-v2-RNN/train.py39### Step 4: set learning rate, training mini-epochs #######################################################
LOWRWKV-v4/run.py19# Step 1: set model
LOWRWKV-v4/run.py70# Step 2: set prompt & sampling stuffs
LOWRWKV-v4/train.py22# Step 1: set training data & cfg
LOWRWKV-v4/train.py78# Step 2: set model details
LOWRWKV-v4/train.py110# Step 3: set batch size & learning rate etc.
Over-Commented Block28 hits · 28 pts
SeverityFileLineSnippet
LOWRWKV-v7/train_temp/demo-training-run.sh1#!/bin/bash
LOWRWKV-v7/train_temp/demo-training-run.sh21#
LOWRWKV-v7/train_temp/demo-training-run-v7-pile.sh1#!/bin/bash
LOWRWKV-v7/train_temp/demo-training-prepare-v7-pile.sh1#!/bin/bash
LOWRWKV-v7/train_temp/train.py141 rank_zero_info(
LOWRWKV-v7/train_temp/demo-training-prepare.sh1#!/bin/bash
LOWRWKV-v7/train_temp/src/model.py581 self.key.weight.data.uniform_(-0.05/(C**0.5), 0.05/(C**0.5))
LOWRWKV-v7/train_temp/src/model.py621 # v = v + (v_first - v) * torch.sigmoid(self.v0 + (xv @ self.v1) @ self.v2) # add value residual
LOWRWKV-v7/train_temp/src/model.py641 # kk = F.normalize(kk.view(B,T,H,-1), dim=-1, p=2.0).view(B,T,C)
LOWRWKV-v7/train_temp/src/model.py681# super().__init__()
LOWRWKV-v7/train_temp/src/model.py761# @staticmethod
LOWRWKV-v4neo/run.py41# MODEL_NAME = "/fsx/BlinkDL/rwkv-release/RWKV-4-Pile-169M-20220807-8023"
LOWRWKV-v4neo/run.py81# context = 'A'
LOWRWKV-v4neo/train.py21 # --data_file "" --data_type "dummy" --vocab_size 0 \
LOWRWKV-v4neo/train.py41 # --micro_bsz 8 --n_layer 24 --n_embd 2048 --pre_ffn 0 --head_qk 0 \
LOWRWKV-v4neo/train.py261#
LOWRWKV-v4neo/src/model.py881 # if sum_mask == 0:
LOWRWKV-v4neo/src/model_img.py421 ss = n.split('.')
LOWRWKV-v3/train.py41# 'RWKV' (better for English) or 'RWKV-ffnPre' (better in some cases)
LOWRWKV-v4/train.py41
LOWRWKV-v5/demo-training-run.sh1#!/bin/bash
LOWRWKV-v5/demo-training-run.sh21#
LOWRWKV-v5/rwkv_v6_demo.py221
LOWRWKV-v5/rwkv_v6_demo.py241# att.output.weight => zero
LOWRWKV-v5/demo-training-run-v7-pile.sh1#!/bin/bash
LOWRWKV-v5/demo-training-prepare-v7-pile.sh1#!/bin/bash
LOWRWKV-v5/train.py321 data_loader = DataLoader(train_data, shuffle=False, pin_memory=True, batch_size=args.micro_bsz, num_workers=1, persi
LOWRWKV-v5/demo-training-prepare.sh1#!/bin/bash
Slop Phrases4 hits · 6 pts
SeverityFileLineSnippet
LOWRWKV-v7/train_temp/demo-training-run.sh8# Therefore check the log (### Loading rwkv-xxx.pth... ###), and make sure you don't have extra rwkv-*.pth there
LOWRWKV-v7/train_temp/demo-training-run-v7-pile.sh8# Therefore check the log (### Loading rwkv-xxx.pth... ###), and make sure you don't have extra rwkv-*.pth there
LOWRWKV-v5/demo-training-run.sh8# Therefore check the log (### Loading rwkv-xxx.pth... ###), and make sure you don't have extra rwkv-*.pth there
LOWRWKV-v5/demo-training-run-v7-pile.sh8# Therefore check the log (### Loading rwkv-xxx.pth... ###), and make sure you don't have extra rwkv-*.pth there
Redundant / Tautological Comments2 hits · 4 pts
SeverityFileLineSnippet
LOWRWKV-v4/run.py21# Set TOKEN_MODE to 'char' or 'bpe' if the model is trained by 'train.py' from scratch.
LOWRWKV-v4/run.py23# Set TOKEN_MODE to 'pile' if you want to test pre-trained pile models.
AI Slop Vocabulary4 hits · 4 pts
SeverityFileLineSnippet
LOWRWKV-v3/run.py32UNKNOWN_CHAR = ' ' # here we just set it to [space] for simplicity
LOWRWKV-v2-RNN/run.py39UNKNOWN_CHAR = ' ' # here we just set it to [space] for simplicity
LOWRWKV-v4/run.py36 UNKNOWN_CHAR = ' ' # here we just set it to ' ' for simplicity
LOWRWKV-v4/verify.py28 UNKNOWN_CHAR = ' ' # here we just set it to [space] for simplicity
Excessive Try-Catch Wrapping3 hits · 3 pts
SeverityFileLineSnippet
LOWRWKV-v7/train_temp/src/trainer.py148 except Exception as e:
LOWRWKV-v4neo/src/trainer.py189 except Exception as e:
LOWRWKV-v5/src/trainer.py196 except Exception as e: