microsoft / TransformerCompression

For releasing code related to compression methods for transformers, accompanying our publications
MIT License
356 stars 31 forks source link

Fix dataset handling in run_benchmark #90

Closed lopusz closed 7 months ago

lopusz commented 7 months ago

Hi All,

First of all - thank you for open sourcing SliceGPT. It is a very nice package.

While running various exepriments I bumped into little problem in the tool run_benchmark.py.

The invokation:

python run_benchmark.py \
           --model facebook/opt-1.3b \
           --sparsity 0.30 \
           --load-model-path out_sliced/*.pt \
           --no-wandb \
           --device cuda:0 

gives me:

  File "/tmp/run_benchmark.py", line 132, in main                                                              
    train_dataset, _ = data_utils.get_dataset(args.eval_dataset)                                                                                                                                            
ValueError: too many values to unpack (expected 2) 

The tiny fix that solves the issue for me is attached in the PR.

Best regards, Michał