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

微调后运行,AttributeError: 'types.SimpleNamespace' object has no attribute 'emb' #14

Open
aolerv opened this issue May 11, 2023 · 1 comment

Comments

@aolerv
Copy link

aolerv commented May 11, 2023

Run prompt...
Traceback (most recent call last):
File "/home/v/下载/RWKV-LM-LoRA-main/RWKV-v4neo/chat.py", line 187, in
out = run_rnn(tokenizer.tokenizer.encode(init_prompt))
File "/home/v/下载/RWKV-LM-LoRA-main/RWKV-v4neo/chat.py", line 157, in run_rnn
current_state = model.forward(model_tokens, current_state, preprocess_only = True)
File "/home/v/下载/RWKV-LM-LoRA-main/RWKV-v4neo/src/model_run.py", line 225, in forward
x = w.emb.weight[ctx[-1]]
AttributeError: 'types.SimpleNamespace' object has no attribute 'emb'
v@v-virtual-machine:~/下载/RWKV-LM-LoRA-main/RWKV-v4neo$

@Blealtan
Copy link
Owner

正常的模型文件不应该出现这种问题。你是不是直接把LoRA的增量checkpoint路径填进了模型路径 MODEL_NAME,结果只加载了lora而没有加载基座?应该同时加载二者,LoRA的增量checkpoint路径是写在 MODEL_LORA 里的。

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