|
30 | 30 | HF_TOKEN = ""
|
31 | 31 | NEW_GENERATION_TOKENS = 10
|
32 | 32 | test_models_config = [
|
| 33 | + # CONFIG PARAMS NEEDED FOR A MODEL TO BE TESTED |
| 34 | + # ( |
| 35 | + # model_name, |
| 36 | + # batch_size, |
| 37 | + # prompt_len, |
| 38 | + # ctx_len, |
| 39 | + # img_size, |
| 40 | + # img_url", |
| 41 | + # text_prompt, |
| 42 | + # number of layers of the model, |
| 43 | + # ), |
33 | 44 | (
|
34 | 45 | "llava-hf/llava-1.5-7b-hf",
|
35 | 46 | 1,
|
|
40 | 51 | "What does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud",
|
41 | 52 | 1,
|
42 | 53 | ),
|
43 |
| - ( |
44 |
| - "meta-llama/Llama-3.2-11B-Vision-Instruct", |
45 |
| - 1, |
46 |
| - 32, |
47 |
| - 512, |
48 |
| - 560, |
49 |
| - "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg", |
50 |
| - "Explain this image", |
51 |
| - 4, |
52 |
| - ), |
| 54 | + # ( |
| 55 | + # "meta-llama/Llama-3.2-11B-Vision-Instruct", |
| 56 | + # 1, |
| 57 | + # 32, |
| 58 | + # 512, |
| 59 | + # 560, |
| 60 | + # "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg", |
| 61 | + # "Explain this image", |
| 62 | + # 4, |
| 63 | + # ), |
53 | 64 | ]
|
54 | 65 |
|
55 | 66 | intern_model_config = [
|
@@ -127,7 +138,6 @@ def check_image_text_to_text_pytorch_vs_kv_vs_ort_vs_ai100(
|
127 | 138 | config = AutoConfig.from_pretrained(
|
128 | 139 | model_config["model_name"], token=HF_TOKEN, trust_remote_code=True, padding=True
|
129 | 140 | )
|
130 |
| - config._attn_implementation = "eager" |
131 | 141 | config = set_num_layers(config, n_layer=n_layer)
|
132 | 142 | model_hf, _ = load_image_text_to_text_model(config)
|
133 | 143 | processor = AutoProcessor.from_pretrained(model_name, token=HF_TOKEN, trust_remote_code=True, padding=True)
|
@@ -278,6 +288,7 @@ def check_intern_image_text_to_text_pytorch_vs_kv_vs_ort_vs_ai100(
|
278 | 288 |
|
279 | 289 |
|
280 | 290 | @pytest.mark.on_qaic
|
| 291 | +@pytest.mark.multimodal |
281 | 292 | @pytest.mark.parametrize(
|
282 | 293 | "model_name, batch_size, prompt_len, ctx_len, img_size, img_url, query, n_layer", test_models_config
|
283 | 294 | )
|
@@ -306,6 +317,7 @@ def test_image_text_to_text_pytorch_vs_kv_vs_ort_vs_ai100(
|
306 | 317 |
|
307 | 318 |
|
308 | 319 | @pytest.mark.on_qaic
|
| 320 | +@pytest.mark.multimodal |
309 | 321 | @pytest.mark.parametrize("model_name, batch_size, prompt_len, ctx_len, img_url, query, n_layer", intern_model_config)
|
310 | 322 | def test_image_text_to_text_intern_pytorch_vs_kv_vs_ort_vs_ai100(
|
311 | 323 | model_name, batch_size, prompt_len, ctx_len, img_url, query, n_layer
|
|
0 commit comments