Skip to content

Commit 721c839

Browse files
committed
update ms 2.7.0 perf
1 parent 0365939 commit 721c839

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

examples/transformers/glm4v/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Provides an open-source version supporting both Chinese and English bilingual us
1515
# Get Started
1616

1717
## Requirements:
18-
| mindspore | ascend driver | firmware | cann tookit/kernel|
19-
|-------------|----------------|----------------| --- |
20-
| 2.5.0/2.6.0 | 24.1.RC3.b080 | 7.5.T11.0.B088 | 8.0.RC3.beta1|
18+
| mindspore | ascend driver | firmware | cann tookit/kernel |
19+
|-------------|----------------|----------------|--------------------|
20+
| 2.6.0/2.7.0 | 24.1.RC3.b080 | 7.5.T11.0.B088 | 8.1.RC1 |
2121

2222
### Installation:
2323
```
@@ -45,5 +45,5 @@ python generate.py
4545
## Inference Speed
4646
| model name | mindspore version | precision* | cards | flash attn | tokens/s |
4747
|:---------------------:|:-----------------:|:--------------:|:---: |:----------:|:----------:|
48-
| THUDM/GLM-4.1V-9B-Thinking | 2.5.0 | bf16 | 1 || 1.38 |
4948
| THUDM/GLM-4.1V-9B-Thinking | 2.6.0 | bf16 | 1 || 1.63 |
49+
| THUDM/GLM-4.1V-9B-Thinking | 2.7.0 | bf16 | 1 || 1.06 |

mindone/transformers/models/auto/image_processing_auto.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
2828

2929
# Build the list of all image processors
30+
import transformers
31+
from packaging import version
3032
from transformers import PretrainedConfig
3133
from transformers.dynamic_module_utils import get_class_from_dynamic_module, resolve_trust_remote_code
3234
from transformers.utils import CONFIG_NAME, cached_file
@@ -62,7 +64,6 @@
6264
("dpt", ("DPTImageProcessor",)),
6365
("efficientnet", ("EfficientNetImageProcessor",)),
6466
("flava", ("FlavaImageProcessor",)),
65-
("glm4v", ("Glm4vImageProcessor",)),
6667
("llava_next", ("LlavaNextImageProcessor",)),
6768
("llava_next_video", ("LlavaNextVideoImageProcessor",)),
6869
("llava_onevision", ("LlavaOnevisionImageProcessor",)),
@@ -80,6 +81,10 @@
8081
]
8182
)
8283

84+
85+
if version.parse(transformers.__version__) >= version.parse("4.53.0"):
86+
IMAGE_PROCESSOR_MAPPING_NAMES.update({"glm4v": ("Glm4vImageProcessor",)})
87+
8388
for model_type, image_processors in IMAGE_PROCESSOR_MAPPING_NAMES.items():
8489
slow_image_processor_class, *fast_image_processor_class = image_processors
8590
if not is_vision_available():

mindone/transformers/models/auto/processing_auto.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
from collections import OrderedDict
2626

2727
# Build the list of all feature extractors
28+
import transformers
29+
from packaging import version
2830
from transformers.configuration_utils import PretrainedConfig
2931
from transformers.dynamic_module_utils import get_class_from_dynamic_module, resolve_trust_remote_code
3032
from transformers.models.auto.tokenization_auto import AutoTokenizer
@@ -54,7 +56,6 @@
5456
("chinese_clip", "ChineseCLIPProcessor"),
5557
("colpali", "ColPaliProcessor"),
5658
("flava", "FlavaProcessor"),
57-
("glm4v", "Glm4vProcessor"),
5859
("idefics", "IdeficsProcessor"),
5960
("instructblip", "InstructBlipProcessor"),
6061
("layoutlmv3", "LayoutMv3Processor"),
@@ -72,6 +73,9 @@
7273
]
7374
)
7475

76+
if version.parse(transformers.__version__) >= version.parse("4.53.0"):
77+
PROCESSOR_MAPPING_NAMES.update({"glm4v": "Glm4vProcessor"})
78+
7579
PROCESSOR_MAPPING = _LazyAutoMapping(CONFIG_MAPPING_NAMES, PROCESSOR_MAPPING_NAMES)
7680

7781

0 commit comments

Comments
 (0)