[LLM] Add more performance tests for win iGPU (more in-out pairs, RWKV model) (#9626)

* Add supports for loading rwkv models using from_pretrained api

* Temporarily enable pr tests

* Add RWKV in tests and more in-out pairs

* Add rwkv for 512 tests

* Make iterations smaller

* Change back to nightly trigger
This commit is contained in:
Yuwen Hu 2023-12-07 18:55:16 +08:00 committed by GitHub
parent d9b0c01de3
commit 6f34978b94
4 changed files with 13 additions and 4 deletions

View file

@ -299,6 +299,9 @@ def _optimize_pre(model):
logger.info("Only HuggingFace Transformers models are currently "
"supported for further optimizations")
return model
# for rwkv models (verified RWKV/rwkv-4-world-7b)
if model.config.model_type == "rwkv":
model.rwkv._rescale_layers()
# process NormHead module in Baichuan2 7B and 13B
if model.config.model_type == "baichuan" and model.config.vocab_size == 125696:
# NormHead do normalization on the weights just once at inference time.

View file

@ -1,12 +1,14 @@
repo_id:
- 'mistralai/Mistral-7B-Instruct-v0.1'
local_model_hub: 'path to your local model hub'
warm_up: 3
num_trials: 5
warm_up: 1
num_trials: 3
num_beams: 1 # default to greedy search
low_bit: 'sym_int4' # default to use 'sym_int4' (i.e. symmetric int4)
in_out_pairs:
- '32-32'
- '32-256'
- '32-512'
# - '1024-128'
test_api:
# - "transformer_int4"

View file

@ -11,13 +11,16 @@ repo_id:
- 'tiiuae/falcon-7b-instruct-with-patch'
- 'mosaicml/mpt-7b-chat'
- 'liuhaotian/llava-v1.5-7b'
- 'RWKV/rwkv-4-world-7b'
local_model_hub: 'path to your local model hub'
warm_up: 3
num_trials: 5
warm_up: 1
num_trials: 3
num_beams: 1 # default to greedy search
low_bit: 'sym_int4' # default to use 'sym_int4' (i.e. symmetric int4)
in_out_pairs:
- '32-32'
- '32-256'
- '32-512'
# - '1024-128'
test_api:
# - "transformer_int4"

View file

@ -11,6 +11,7 @@ repo_id:
- 'tiiuae/falcon-7b-instruct-with-patch'
- 'mosaicml/mpt-7b-chat'
# - 'liuhaotian/llava-v1.5-7b'
- 'RWKV/rwkv-4-world-7b'
local_model_hub: 'path to your local model hub'
warm_up: 1
num_trials: 3