lm-sys / lm-sys/FastChat

--load-8bit not compatiable for fastchat-t5-3b-v1.0

Open
#1,099 0 comments 0 reactions 1 assignee View on GitHub

@DachengLi1 is already working on this.

Since May 22, 2023.

bug good first issue
Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

main branch

`python3 -m fastchat.serve.cli --model-path lmsys/fastchat-t5-3b-v1.0 --max-gpu-memory 7Gib --load-8bit`

```
...FastChat/fastchat/model/compression.py:110 in load_compress_model │
│ │
│ 107 │ │ config = AutoConfig.from_pretrained( │
│ 108 │ │ │ model_path, low_cpu_mem_usage=True, torch_dtype=torch_dtype │
│ 109 │ │ ) │
│ ❱ 110 │ │ model = AutoModelForCausalLM.from_config(config) │
│ 111 │ │ linear_weights = get_compressed_list(model) │
│ 112 │ │
│ 113 │ compressed_state_dict = {}

......

ValueError: Unrecognized configuration class for this kind of AutoModel:
AutoModelForCausalLM.
Model type should be one of BartConfig, BertConfig, BertGenerationConfig, BigBirdConfig,
BigBirdPegasusConfig, BioGptConfig, BlenderbotConfig, BlenderbotSmallConfig, BloomConfig,
CamembertConfig, CodeGenConfig, CpmAntConfig, CTRLConfig, Data2VecTextConfig, ElectraConfig,
ErnieConfig, GitConfig, GPT2Config, GPT2Config, GPTBigCodeConfig, GPTNeoConfig, GPTNeoXConfig,
GPTNeoXJapaneseConfig, GPTJConfig, LlamaConfig, MarianConfig, MBartConfig, MegaConfig,
MegatronBertConfig, MvpConfig, OpenAIGPTConfig, OPTConfig, PegasusConfig, PLBartConfig,
ProphetNetConfig, QDQBertConfig, ReformerConfig, RemBertConfig, RobertaConfig,
RobertaPreLayerNormConfig, RoCBertConfig, RoFormerConfig, Speech2Text2Config, TransfoXLConfig,
TrOCRConfig, XGLMConfig, XLMConfig, XLMProphetNetConfig, XLMRobertaConfig, XLMRobertaXLConfig,
XLNetConfig, XmodConfig.
```

I tried to load the model with `model = AutoModelForSeq2SeqLM.from_pretrained(model_path, low_cpu_mem_usage=True)`, it works ok. And then it crash when I input some text.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.