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

利用bloomz.cpp转化模型的时候出错 #9

Closed
dihin11 opened this issue Mar 22, 2023 · 5 comments
Closed

利用bloomz.cpp转化模型的时候出错 #9

dihin11 opened this issue Mar 22, 2023 · 5 comments

Comments

@dihin11
Copy link

dihin11 commented Mar 22, 2023

OSError: Unable to load weights from pytorch checkpoint file for './bigscience/bloomz-7b1/pytorch_model.bin' at './bigscience/bloomz-7b1/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

如果将from_tf设置为true的话,又会收到以下错误:
Loading model: ./bigscience/bloomz-7b1
Traceback (most recent call last):
File "/home/ubuntu/bloomz.cpp/convert-hf-to-ggml.py", line 84, in
model = AutoModelForCausalLM.from_pretrained(model_name, config=config, torch_dtype=torch.float16 if ftype == 1 else torch.float32, low_cpu_mem_usage=True, from_tf=True)
File "/usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py", line 471, in from_pretrained
return model_class.from_pretrained(
File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py", line 2613, in from_pretrained
model, loading_info = load_tf2_checkpoint_in_pytorch_model(
File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_tf_pytorch_utils.py", line 407, in load_tf2_checkpoint_in_pytorch_model
tf_model_class = getattr(transformers, tf_model_class_name)
File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1119, in getattr
raise AttributeError(f"module {self.name} has no attribute {name}")
AttributeError: module transformers has no attribute TFBloomForCausalLM

@bestpredicts
Copy link
Collaborator

bloomz.cpp目前看上去官方实现上面可能存在问题,我们预计本周会发布一个8bit量化的版本和提供对应的推理代码.

@Yif1999
Copy link

Yif1999 commented Mar 22, 2023

bloomz.cpp目前看上去官方实现上面可能存在问题,我们预计本周会发布一个8bit量化的版本和提供对应的推理代码.

将会支持连续对话嘛

@bestpredicts
Copy link
Collaborator

bloomz.cpp目前看上去官方实现上面可能存在问题,我们预计本周会发布一个8bit量化的版本和提供对应的推理代码.

将会支持连续对话嘛
会的,目前的模型也可以进行多轮对话推理,只需要通过拼接上文,但是我们开源的版本暂时没有针对连续对话进行优化。后续会有针对连续对话优化的版本开源。欢迎持续关注我们项目。

@Soulscb
Copy link

Soulscb commented May 17, 2023

请问你的问题解决了吗

@Soulscb
Copy link

Soulscb commented May 17, 2023

我这边也遇到了相同的问题 AttributeError: module transformers has no attribute TFBloomForCausalLM

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

4 participants