SuperAdapters icon indicating copy to clipboard operation
SuperAdapters copied to clipboard

Error in ChatGLM inference

Open sudusuperman opened this issue 10 months ago • 3 comments

I'm testing ChatGLM After following the instructions in README.md

python finetune.py --model_type chatglm --data "data/train/" --model_path "LLMs/chatglm/chatglm-6b/" --adapter "lora" --output_dir "output/chatglm"

And then

python inference.py --model_type chatglm --instruction "Who are you?" --model_path "LLMs/chatglm/chatglm-6b/" --adapter_weights "output/chatglm" --max_new_tokens 256

I get: ... Loading checkpoint shards: 100%|██████████████████| 8/8 [00:04<00:00, 1.73it/s] Find 1 cases The dtype of attention mask (torch.int64) is not bool

LLM says: Eval Error


Reproduce:

1 Training data that I'm using: {"id": "seed_task_0", "name": "breakfast_suggestion", "instruction": "who are you??", "input": "Who are you?", "output": "Yes, you can have 1 oatmeal banana protein shake and 4 strips of bacon. The oatmeal banana protein shake may contain 1/2 cup oatmeal, 60 grams whey protein powder, 1/2 medium banana, 1tbsp flaxseed oil and 1/2 cup watter, totalling about 550 calories. The 4 strips of bacon contains about 200 calories.", "is_classification": false} {"id": "seed_task_1", "name": "breakfast_suggestion", "instruction": "who are you??", "input": "Who are you?", "output": "Yes, you can have 1 oatmeal banana protein shake and 4 strips of bacon. The oatmeal banana protein shake may contain 1/2 cup oatmeal, 60 grams whey protein powder, 1/2 medium banana, 1tbsp flaxseed oil and 1/2 cup watter, totalling about 550 calories. The 4 strips of bacon contains about 200 calories.", "is_classification": false} {"id": "seed_task_2", "name": "breakfast_suggestion", "instruction": "who are you??", "input": "Who are you?", "output": "Yes, you can have 1 oatmeal banana protein shake and 4 strips of bacon. The oatmeal banana protein shake may contain 1/2 cup oatmeal, 60 grams whey protein powder, 1/2 medium banana, 1tbsp flaxseed oil and 1/2 cup watter, totalling about 550 calories. The 4 strips of bacon contains about 200 calories.", "is_classification": false} {"id": "seed_task_3", "name": "breakfast_suggestion", "instruction": "who are you??", "input": "Who are you?", "output": "Yes, you can have 1 oatmeal banana protein shake and 4 strips of bacon. The oatmeal banana protein shake may contain 1/2 cup oatmeal, 60 grams whey protein powder, 1/2 medium banana, 1tbsp flaxseed oil and 1/2 cup watter, totalling about 550 calories. The 4 strips of bacon contains about 200 calories.", "is_classification": false}

2 Some dependency version different from requirement.txt: torch==2.1.0.dev20230830 torchaudio==2.1.0.dev20230830 torchvision==0.16.0.dev20230830 icetk==0.0.4

sudusuperman avatar Aug 31 '23 09:08 sudusuperman