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
ModuleNotFoundError: No module named 'mmengine' #546
Comments
尝试一下这几行代码能否正常运行? import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_path = "internlm/internlm2-chat-7b"
model = AutoModelForCausalLM.from_pretrained(
model_path,
trust_remote_code=True,
torch_dtype=torch.float16,
device_map='auto',
quantization_config=dict(
type=BitsAndBytesConfig,
load_in_4bit=True,
load_in_8bit=False,
llm_int8_threshold=6.0,
llm_int8_has_fp16_weight=False,
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type='nf4'))
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = model.eval()
response, history = model.chat(tokenizer, "hello", history=[])
print(response) |
|
@52THANOS |
好的我去试试 |
可是我用gemma的config也这样,直接就结束了,alpaca是会自动下载的吗 |
@52THANOS alpaca 会自动下载。排除一下数据集的影响,再就是检查一下 train.py 是否有改动? |
|
@52THANOS |
依旧不行,失败了 |
查看一下打印出来的 python 路径是哪一个? |
就是我当前环境下的exe |
那 ModuleNotFoundError 应该就是安装的问题,没有安装上mmengine |
可是我无论是用openmim安装还是直接安装mmengine,他好像都显示有问题 |
创建新环境,直接安装 |
我都能直接ctrol进去,但是他就是显示没有。我想问一下,xtuner train 和python tools/train.py 启动有啥区别啊 |
here is my config and warning.
the program stopped at here. Only giving some warnings
The text was updated successfully, but these errors were encountered: