Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'types.SimpleNamespace' object has no attribute 'time_first' #219

Open
legends-7 opened this issue Jan 24, 2024 · 1 comment
Open

'types.SimpleNamespace' object has no attribute 'time_first' #219

legends-7 opened this issue Jan 24, 2024 · 1 comment

Comments

@legends-7
Copy link

大佬,我用v5版本的训练跑了一个小模型出来,发现v5文件夹下没有推理的代码,就用v4neo的代码和chatrwkv的chat代码试了一下,发现报错这些信息
Loading...

RWKV_HEAD_QK_DIM 0 RWKV_JIT_ON 1

loading... /workspace/RWKV-LM/RWKV-v5/model/0.1-1/rwkv-50
emb.weight float16 cpu
blocks.0.ln1.weight float16 cuda:0
blocks.0.ln1.bias float16 cuda:0
blocks.0.ln2.weight float16 cuda:0
blocks.0.ln2.bias float16 cuda:0
blocks.0.ln0.weight float16 cuda:0
blocks.0.ln0.bias float16 cuda:0
blocks.0.att.time_mix_k float16 cuda:0
blocks.0.att.time_mix_v float16 cuda:0
blocks.0.att.time_mix_r float16 cuda:0
blocks.0.att.time_mix_g float16 cuda:0
blocks.0.att.time_decay float32 cuda:0
blocks.0.att.time_faaaa float16 cuda:0
blocks.0.att.receptance.weight float16 cuda:0
blocks.0.att.key.weight float16 cuda:0
blocks.0.att.value.weight float16 cuda:0
blocks.0.att.output.weight float16 cuda:0
blocks.0.att.gate.weight float16 cuda:0
blocks.0.att.ln_x.weight float16 cuda:0
blocks.0.att.ln_x.bias float16 cuda:0
blocks.0.ffn.time_mix_k float16 cuda:0
blocks.0.ffn.time_mix_r float16 cuda:0
blocks.0.ffn.key.weight float16 cuda:0
blocks.0.ffn.receptance.weight float16 cuda:0
blocks.0.ffn.value.weight float16 cuda:0
..................................................................................................................................................................................................................................................
ln_out.weight float16 cuda:0
ln_out.bias float16 cuda:0
head.weight float16 cuda:0

Run prompt...
Traceback (most recent call last):
File "chat.py", line 182, in
out = run_rnn(tokenizer.tokenizer.encode(init_prompt))
File "chat.py", line 152, in run_rnn
current_state = model.forward(model_tokens, current_state, preprocess_only = True)
File "/workspace/RWKV-LM/RWKV-v4neo/src/model_run.py", line 220, in forward
ww.time_mix_k, ww.time_mix_v, ww.time_mix_r, ww.time_first, ww.time_decay,
AttributeError: 'types.SimpleNamespace' object has no attribute 'time_first

是我的模型有问题还是推理代码没更新吗?

@BlinkDL
Copy link
Owner

BlinkDL commented Jan 26, 2024

use https://pypi.org/project/rwkv/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants