LLMLingua icon indicating copy to clipboard operation
LLMLingua copied to clipboard

run local error

Open songsh opened this issue 1 year ago • 3 comments

i run in local, error is: Loading checkpoint shards: 屏幕快照 2024-01-21 下午4 48 08

### Tasks
- [ ] support chinese?

songsh avatar Jan 21 '24 08:01 songsh

Hi @songsh,

It appears there was an interruption while loading the model. Could you please try to load the model normally using the following code?

from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer

model_name = "NousResearch/Llama-2-7b-hf"
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="cuda",
    ignore_mismatched_sizes=True,
)

iofu728 avatar Jan 22 '24 08:01 iofu728

can model support chinese? i use chinese, answer has Garbled code

songsh avatar Jan 22 '24 11:01 songsh

Hi @songsh, currently, this issue does occur #4. We plan to fix it in the future. For now, we recommend using a Chinese small language model, such as Skyword.

iofu728 avatar Jan 23 '24 08:01 iofu728