Add Llama 3.1 & 3.2 to Arc Performance test (#12225)
* Add llama3.1 and llama3.2 in arc perf (#12202) * Add llama3.1 and llama3.2 in arc perf * Uninstall trl after arc test on transformers>=4.40 * Fix arc llama3 perf (#12212) * Fix pip uninstall * Uninstall trl after test on transformers==4.43.1 * Fix llama3 arc perf (#12218) --------- Co-authored-by: Jin, Qiao <89779290+JinBridger@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									9ea694484d
								
							
						
					
					
						commit
						b88c1df324
					
				
					 7 changed files with 169 additions and 0 deletions
				
			
		
							
								
								
									
										70
									
								
								.github/workflows/llm_performance_tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										70
									
								
								.github/workflows/llm_performance_tests.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -233,6 +233,76 @@ jobs:
 | 
				
			||||||
          python run.py
 | 
					          python run.py
 | 
				
			||||||
          mv *.csv test_batch1
 | 
					          mv *.csv test_batch1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Test on xpu(transformers==4.43.1)
 | 
				
			||||||
 | 
					        shell: bash
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          source /opt/intel/oneapi/setvars.sh
 | 
				
			||||||
 | 
					          export USE_XETLA=OFF
 | 
				
			||||||
 | 
					          export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
 | 
				
			||||||
 | 
					          # upgrade for default transformers version
 | 
				
			||||||
 | 
					          python -m pip install transformers==4.43.1
 | 
				
			||||||
 | 
					          python -m pip install trl
 | 
				
			||||||
 | 
					          # batch_size 1
 | 
				
			||||||
 | 
					          cp python/llm/test/benchmark/arc-perf-transformers-443.yaml python/llm/dev/benchmark/all-in-one/config.yaml
 | 
				
			||||||
 | 
					          cd python/llm/dev/benchmark/all-in-one
 | 
				
			||||||
 | 
					          # change csv name
 | 
				
			||||||
 | 
					          sed -i 's/test3_batch1/test4_batch1/g' run.py
 | 
				
			||||||
 | 
					          python run.py
 | 
				
			||||||
 | 
					          mv *.csv test_batch1
 | 
				
			||||||
 | 
					          # batch_size 2
 | 
				
			||||||
 | 
					          cd ../../../../../ 
 | 
				
			||||||
 | 
					          cp python/llm/test/benchmark/arc-perf-transformers-443-batch2.yaml python/llm/dev/benchmark/all-in-one/config.yaml
 | 
				
			||||||
 | 
					          cd python/llm/dev/benchmark/all-in-one
 | 
				
			||||||
 | 
					          # change csv name 
 | 
				
			||||||
 | 
					          sed -i 's/batch1/batch2/g' run.py
 | 
				
			||||||
 | 
					          python run.py
 | 
				
			||||||
 | 
					          mv *.csv test_batch2
 | 
				
			||||||
 | 
					          # batch_size 4
 | 
				
			||||||
 | 
					          cd ../../../../../ 
 | 
				
			||||||
 | 
					          cp python/llm/test/benchmark/arc-perf-transformers-443-batch4.yaml python/llm/dev/benchmark/all-in-one/config.yaml
 | 
				
			||||||
 | 
					          cd python/llm/dev/benchmark/all-in-one
 | 
				
			||||||
 | 
					          # change csv name 
 | 
				
			||||||
 | 
					          sed -i 's/batch2/batch4/g' run.py
 | 
				
			||||||
 | 
					          python run.py
 | 
				
			||||||
 | 
					          mv *.csv test_batch4
 | 
				
			||||||
 | 
					          python -m pip uninstall -y trl
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					      - name: Test on xpu(transformers==4.45.0)
 | 
				
			||||||
 | 
					        shell: bash
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          source /opt/intel/oneapi/setvars.sh
 | 
				
			||||||
 | 
					          export USE_XETLA=OFF
 | 
				
			||||||
 | 
					          export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
 | 
				
			||||||
 | 
					          # upgrade for default transformers version
 | 
				
			||||||
 | 
					          python -m pip install transformers==4.45.0
 | 
				
			||||||
 | 
					          python -m pip install trl
 | 
				
			||||||
 | 
					          python -m pip install accelerate==0.33.0
 | 
				
			||||||
 | 
					          # batch_size 1
 | 
				
			||||||
 | 
					          cp python/llm/test/benchmark/arc-perf-transformers-445.yaml python/llm/dev/benchmark/all-in-one/config.yaml
 | 
				
			||||||
 | 
					          cd python/llm/dev/benchmark/all-in-one
 | 
				
			||||||
 | 
					          # change csv name
 | 
				
			||||||
 | 
					          sed -i 's/test4_batch4/test5_batch1/g' run.py
 | 
				
			||||||
 | 
					          python run.py
 | 
				
			||||||
 | 
					          mv *.csv test_batch1
 | 
				
			||||||
 | 
					          # batch_size 2
 | 
				
			||||||
 | 
					          cd ../../../../../ 
 | 
				
			||||||
 | 
					          cp python/llm/test/benchmark/arc-perf-transformers-445-batch2.yaml python/llm/dev/benchmark/all-in-one/config.yaml
 | 
				
			||||||
 | 
					          cd python/llm/dev/benchmark/all-in-one
 | 
				
			||||||
 | 
					          # change csv name 
 | 
				
			||||||
 | 
					          sed -i 's/batch1/batch2/g' run.py
 | 
				
			||||||
 | 
					          python run.py
 | 
				
			||||||
 | 
					          mv *.csv test_batch2
 | 
				
			||||||
 | 
					          # batch_size 4
 | 
				
			||||||
 | 
					          cd ../../../../../ 
 | 
				
			||||||
 | 
					          cp python/llm/test/benchmark/arc-perf-transformers-445-batch4.yaml python/llm/dev/benchmark/all-in-one/config.yaml
 | 
				
			||||||
 | 
					          cd python/llm/dev/benchmark/all-in-one
 | 
				
			||||||
 | 
					          # change csv name 
 | 
				
			||||||
 | 
					          sed -i 's/batch2/batch4/g' run.py
 | 
				
			||||||
 | 
					          python run.py
 | 
				
			||||||
 | 
					          mv *.csv test_batch4
 | 
				
			||||||
 | 
					          python -m pip install accelerate==0.23.0
 | 
				
			||||||
 | 
					          python -m pip uninstall -y trl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Concat csv and generate html
 | 
					      - name: Concat csv and generate html
 | 
				
			||||||
        shell: bash
 | 
					        shell: bash
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					repo_id:
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.1-8B-Instruct'
 | 
				
			||||||
 | 
					local_model_hub: '/mnt/disk1/models'
 | 
				
			||||||
 | 
					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)
 | 
				
			||||||
 | 
					batch_size: 2 # default to 1
 | 
				
			||||||
 | 
					in_out_pairs:
 | 
				
			||||||
 | 
					  - '32-32'
 | 
				
			||||||
 | 
					  - '1024-128'
 | 
				
			||||||
 | 
					  - '2048-256'
 | 
				
			||||||
 | 
					test_api:
 | 
				
			||||||
 | 
					  - "transformer_int4_fp16_gpu"  # on Intel GPU
 | 
				
			||||||
 | 
					cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
 | 
				
			||||||
 | 
					task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					repo_id:
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.1-8B-Instruct'
 | 
				
			||||||
 | 
					local_model_hub: '/mnt/disk1/models'
 | 
				
			||||||
 | 
					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)
 | 
				
			||||||
 | 
					batch_size: 4 # default to 1
 | 
				
			||||||
 | 
					in_out_pairs:
 | 
				
			||||||
 | 
					  - '32-32'
 | 
				
			||||||
 | 
					  - '1024-128'
 | 
				
			||||||
 | 
					  - '2048-256'
 | 
				
			||||||
 | 
					test_api:
 | 
				
			||||||
 | 
					  - "transformer_int4_fp16_gpu"  # on Intel GPU
 | 
				
			||||||
 | 
					cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
 | 
				
			||||||
 | 
					task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
 | 
				
			||||||
							
								
								
									
										16
									
								
								python/llm/test/benchmark/arc-perf-transformers-443.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								python/llm/test/benchmark/arc-perf-transformers-443.yaml
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					repo_id:
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.1-8B-Instruct'
 | 
				
			||||||
 | 
					local_model_hub: '/mnt/disk1/models'
 | 
				
			||||||
 | 
					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)
 | 
				
			||||||
 | 
					batch_size: 1 # default to 1
 | 
				
			||||||
 | 
					in_out_pairs:
 | 
				
			||||||
 | 
					  - '32-32'
 | 
				
			||||||
 | 
					  - '1024-128'
 | 
				
			||||||
 | 
					  - '2048-256'
 | 
				
			||||||
 | 
					test_api:
 | 
				
			||||||
 | 
					  - "transformer_int4_fp16_gpu"  # on Intel GPU
 | 
				
			||||||
 | 
					cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
 | 
				
			||||||
 | 
					task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					repo_id:
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.2-1B-Instruct'
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.2-3B-Instruct'
 | 
				
			||||||
 | 
					local_model_hub: '/mnt/disk1/models'
 | 
				
			||||||
 | 
					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)
 | 
				
			||||||
 | 
					batch_size: 2 # default to 1
 | 
				
			||||||
 | 
					in_out_pairs:
 | 
				
			||||||
 | 
					  - '32-32'
 | 
				
			||||||
 | 
					  - '1024-128'
 | 
				
			||||||
 | 
					  - '2048-256'
 | 
				
			||||||
 | 
					test_api:
 | 
				
			||||||
 | 
					  - "transformer_int4_fp16_gpu"  # on Intel GPU
 | 
				
			||||||
 | 
					cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
 | 
				
			||||||
 | 
					task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					repo_id:
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.2-1B-Instruct'
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.2-3B-Instruct'
 | 
				
			||||||
 | 
					local_model_hub: '/mnt/disk1/models'
 | 
				
			||||||
 | 
					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)
 | 
				
			||||||
 | 
					batch_size: 4 # default to 1
 | 
				
			||||||
 | 
					in_out_pairs:
 | 
				
			||||||
 | 
					  - '32-32'
 | 
				
			||||||
 | 
					  - '1024-128'
 | 
				
			||||||
 | 
					  - '2048-256'
 | 
				
			||||||
 | 
					test_api:
 | 
				
			||||||
 | 
					  - "transformer_int4_fp16_gpu"  # on Intel GPU
 | 
				
			||||||
 | 
					cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
 | 
				
			||||||
 | 
					task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
 | 
				
			||||||
							
								
								
									
										17
									
								
								python/llm/test/benchmark/arc-perf-transformers-445.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								python/llm/test/benchmark/arc-perf-transformers-445.yaml
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					repo_id:
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.2-1B-Instruct'
 | 
				
			||||||
 | 
					  - 'meta-llama/Llama-3.2-3B-Instruct'
 | 
				
			||||||
 | 
					local_model_hub: '/mnt/disk1/models'
 | 
				
			||||||
 | 
					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)
 | 
				
			||||||
 | 
					batch_size: 1 # default to 1
 | 
				
			||||||
 | 
					in_out_pairs:
 | 
				
			||||||
 | 
					  - '32-32'
 | 
				
			||||||
 | 
					  - '1024-128'
 | 
				
			||||||
 | 
					  - '2048-256'
 | 
				
			||||||
 | 
					test_api:
 | 
				
			||||||
 | 
					  - "transformer_int4_fp16_gpu"  # on Intel GPU
 | 
				
			||||||
 | 
					cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
 | 
				
			||||||
 | 
					task: 'continuation' # task can be 'continuation', 'QA' and 'summarize'
 | 
				
			||||||
		Loading…
	
		Reference in a new issue