[TEST] Add Qwen3-32b-w8a8 acc/perf A2/A3 test (#3541)
### What this PR does / why we need it? This PR Qwen3-32b-w8a8 acc/perf 8 cases on A2 and A3, we need test them daily. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? by running the test - vLLM version: v0.11.0rc3 - vLLM main: https://github.com/vllm-project/vllm/commit/v0.11.0 --------- Signed-off-by: jiangyunfan1 <jiangyunfan1@h-partners.com> Signed-off-by: wangli <wangli858794774@gmail.com> Signed-off-by: Yikun Jiang <yikunkero@gmail.com> Signed-off-by: root <root@hostname-2pbfv.foreman.pxe> Co-authored-by: wangli <wangli858794774@gmail.com> Co-authored-by: Yikun Jiang <yikunkero@gmail.com>
This commit is contained in:
@@ -101,6 +101,9 @@ class AisbenchRunner:
|
||||
if self.task_type == "performance":
|
||||
conf_path = os.path.join(DATASET_CONF_DIR,
|
||||
f'{self.dataset_conf}.py')
|
||||
if self.dataset_conf.startswith("textvqa"):
|
||||
self.dataset_path = os.path.join(self.dataset_path,
|
||||
"textvqa_val.jsonl")
|
||||
with open(conf_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
content = re.sub(r'path=.*', f'path="{self.dataset_path}",',
|
||||
@@ -180,9 +183,13 @@ class AisbenchRunner:
|
||||
def _get_result_performance(self):
|
||||
result_dir = re.search(r'Performance Result files locate in (.*)',
|
||||
self.result_line).group(1)[:-1]
|
||||
result_csv_file = os.path.join(result_dir, "gsm8kdataset.csv")
|
||||
result_json_file = os.path.join(result_dir, "gsm8kdataset.json")
|
||||
dataset_type = self.dataset_conf.split('/')[0]
|
||||
result_csv_file = os.path.join(result_dir,
|
||||
f"{dataset_type}dataset.csv")
|
||||
result_json_file = os.path.join(result_dir,
|
||||
f"{dataset_type}dataset.json")
|
||||
self.result_csv = pd.read_csv(result_csv_file)
|
||||
print("Getting performance results from file: ", result_json_file)
|
||||
with open(result_json_file, 'r', encoding='utf-8') as f:
|
||||
self.result_json = json.load(f)
|
||||
|
||||
|
||||
49
tools/send_mm_request.py
Normal file
49
tools/send_mm_request.py
Normal file
@@ -0,0 +1,49 @@
|
||||
import base64
|
||||
import os
|
||||
|
||||
import requests
|
||||
from modelscope import snapshot_download # type: ignore
|
||||
|
||||
mm_dir = snapshot_download("vllm-ascend/mm_request", repo_type='dataset')
|
||||
image_path = os.path.join(mm_dir, "test_mm2.jpg")
|
||||
with open(image_path, 'rb') as image_file:
|
||||
image_data = base64.b64encode(image_file.read()).decode('utf-8')
|
||||
|
||||
data = {
|
||||
"messages": [{
|
||||
"role":
|
||||
"user",
|
||||
"content": [{
|
||||
"type": "text",
|
||||
"text": "What is the content of this image?"
|
||||
}, {
|
||||
"type": "image_url",
|
||||
"image_url": {
|
||||
"url": f"data:image/jpeg;base64,{image_data}"
|
||||
}
|
||||
}]
|
||||
}],
|
||||
"eos_token_id": [1, 106],
|
||||
"pad_token_id":
|
||||
0,
|
||||
"top_k":
|
||||
64,
|
||||
"top_p":
|
||||
0.95,
|
||||
"max_tokens":
|
||||
8192,
|
||||
"stream":
|
||||
False
|
||||
}
|
||||
|
||||
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
|
||||
|
||||
|
||||
def send_image_request(model, server):
|
||||
data["model"] = model
|
||||
url = server.url_for("v1", "chat", "completions")
|
||||
response = requests.post(url, headers=headers, json=data)
|
||||
print("Status Code:", response.status_code)
|
||||
response_json = response.json()
|
||||
print("Response:", response_json)
|
||||
assert response_json["choices"][0]["message"]["content"], "empty response"
|
||||
Reference in New Issue
Block a user