InternLM / InternLM/lmdeploy

S-LoRA with pytorch backend is very slow

Open
#1,370 4 comments 0 reactions 1 assignee Claimed by @grimoire View on GitHub
Dominant language
Python
Stars
8.1k
Forks
748
Avg merge
6d 2h
Merged PRs (30d)
54

Description

### Motivation

I using the scripts to **benchmark s-lora** with lmdeploy 0.2.6 on 2*A30. Firstly I only benchmark the base model lama2-13b-hf, the performance of pytorch backend **is obviously lower** than using turbormind backend, **It is almost unusable**.

Besides, if the `tp=2`, the utilization of gpu 0 is almost 0 but the gpu1 is always 100%, why?

```bash
# benchmark/benchmark_pytorch_engine_a100.sh
# https://github.com/InternLM/lmdeploy/blob/main/benchmark/profile_throughput.py
python3 profile_throughput.py data.csv /data/models/Llama-2-13b-hf/ \
--backend pytorch --tp 2 --concurrency 1 --cache-max-entry-count 0.5 \
--request_out_len 256 --top-k 3 --top-p 0.95 --temperature 0.0 --repetition-penalty 1.15 \
--num-prompts 10 --csv perf.csv

```

![image](https://github.com/InternLM/lmdeploy/assets/24476563/11f488b1-53fe-420c-a8c7-6c58c10f254e)
![image](https://github.com/InternLM/lmdeploy/assets/24476563/15032b03-97d3-42af-bfe3-616903f45f8b)

![image](https://github.com/InternLM/lmdeploy/assets/24476563/36ef25fa-1a87-4a5b-96df-679747871fdf)

### Related resources

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.