File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ import os
2
+
3
+ import pytest
4
+
5
+ from tests .conftest import VllmRunner
6
+ from tests .model_utils import check_outputs_equal
7
+
8
+
9
+ @pytest .mark .skipif (os .getenv ("VLLM_USE_V1" ) == "0" ,
10
+ reason = "ep is not supported on v0" )
11
+ @pytest .mark .parametrize ("model_name" , ["deepseek-ai/DeepSeek-V2-Lite-Chat" ])
12
+ def test_e2e_ep_etp_correctness (model_name ):
13
+ example_prompts = [
14
+ "Hello, my name is" ,
15
+ "The president of the United States is" ,
16
+ "The capital of France is" ,
17
+ "The future of AI is" ,
18
+ ]
19
+ max_tokens = 5
20
+
21
+ with VllmRunner (model_name ,
22
+ tensor_parallel_size = 2 ,
23
+ additional_config = {
24
+ "expert_tensor_parallel_size" : 2 ,
25
+ }) as vllm_model :
26
+ etp_output = vllm_model .generate_greedy (example_prompts , max_tokens )
27
+
28
+ with VllmRunner (model_name ,
29
+ tensor_parallel_size = 2 ,
30
+ enable_expert_parallel = True ) as vllm_model :
31
+ ep_output = vllm_model .generate_greedy (example_prompts , max_tokens )
32
+
33
+ check_outputs_equal (
34
+ outputs_0_lst = ep_output ,
35
+ outputs_1_lst = etp_output ,
36
+ name_0 = "ep_output" ,
37
+ name_1 = "etp_output" ,
38
+ )
You can’t perform that action at this time.
0 commit comments