DeepSpeed-MII ``` ValueError: 不支持的模型类型 roberta ```

iyzzxitl  于 2个月前  发布在  其他
关注(0)|答案(2)|浏览(115)

尝试加载一个微调过的roberta模型,但出现了错误。

3xiyfsfu

3xiyfsfu1#

你好,@pradeepdev-1995 ,我们在这里列出了支持最新DeepSpeed-MII的模型:https://github.com/microsoft/DeepSpeed-MII?tab=readme-ov-file#supported-models
如果你想运行一个Roberta模型,你需要使用MII-Legacy API:https://github.com/microsoft/DeepSpeed-MII/tree/main/mii/legacy
特别是,请查看这个示例:https://github.com/microsoft/DeepSpeed-MII/blob/main/mii/legacy/examples/local/question-answering-example.py

1wnzp6jl

1wnzp6jl2#

我尝试了官方文档中的以下代码

import mii
mii_configs = {"tensor_parallel": 1, "dtype": "fp16"}
mii.deploy(task="text-classification",model="roberta-large-mnli",deployment_name="roberta_deployment",mii_config=mii_configs)

但是它报错了

text-classification is not supported by roberta-large-mnli. This task is supported by 53415 other models. See which models with `mii.get_supported_models(mii.text-classification)`. (type=assertion_error)

所以我尝试了 mii.get_supported_models(mii.text-classification) 命令,但是它显示

AttributeError: module 'mii' has no attribute 'text'

使用包版本时

deepspeed==0.14.0
deepspeed-kernels==0.0.1.dev1698255861
deepspeed-mii==0.2.3

相关问题