Atrribute Error: 'AlignConfig' object has no attribute 'encoder', 'PoolFormerConfig' object has no attribute 'encoder'.
Author: PriyaBSavithiri
Pull request: no

Hi! I am using python==3.10, torch==1.13.0+cpu, transformers==4.35.0. I am trying to (cpu)benchmark the transformer models in pytorch framework using the command:

`python run_benchmark.py --models kakaobrain/align-base --batch_sizes 1  --sequence_lengths 384`

when I execute the command, am getting the atrribute error as:

***********************************************************************************
FutureWarning: The class <class 'transformers.benchmark.benchmark.PyTorchBenchmark'> is deprecated. Hugging Face Benchmarking utils are deprecated in general and it is advised to use external Benchmarking libraries to benchmark Transformer models.
warnings.warn(
1 / 1

**'AlignConfig' object has no attribute 'encoder'
'AlignConfig' object has no attribute 'encoder'**

Traceback (most recent call last):
File "/home/priya/priya/transformers/examples/pytorch/benchmarking/run_benchmark.py", line 50, in
main()
File "/home/priya/priya/transformers/examples/pytorch/benchmarking/run_benchmark.py", line 46, in main
benchmark.run()
File "/home/priya/miniconda3/envs/pyo/lib/python3.10/site-packages/transformers/benchmark/benchmark_utils.py", line 710, in run
memory, inference_summary = self.inference_memory(model_name, batch_size, sequence_length)
ValueError: too many values to unpack (expected 2)
***********************************************************************************************

I have encountered the same issue while trying to install the transformers package using pip as well as from the source code.
And the same issue persists in many transformer models. Hereby, am listing few of them:

1. kakaobrain/align-base
2. BAAI/AltCLIP
3. SenseTime/deformable-detr
4. sail/poolformer_s12

etc.,

Am I missing something ?

Any assistance on this issue is greatly appreciated, thankyou!

Comments:
Hi @PriyaBSavithiri, thanks for opening an issue! 

As noted in the warning message, Hugging Face Benchmarking utilis are deprecated and we are no longer actively maintaining them. To benchmark models, please use external benchmarking libraries. 

Thanks for the update @amyeroberts . I understand the deprecation of Hugging Face Benchmarking utilities.

I'm curious if there are any community members who are still using or have information on alternative benchmarking tools. Is there a discussion or resources we can tap into regarding this issue?



@PriyaBSavithiri I don't know of any particular members of the community who are using these tools.  I'd suggest searching past issues to see if there's any relevant information. There's also the [HF discord server](https://discord.com/invite/hugging-face-879548962464493619) and [forum](https://discuss.huggingface.co/) where you can post questions. 

Of course, other people might find this issue and comment here too :) 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.