Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mindone/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@
ErnieModel,
ErniePreTrainedModel,
)
from .models.ernie4_5 import Ernie4_5ForCausalLM, Ernie4_5Model, Ernie4_5PreTrainedModel
from .models.ernie4_5_moe import Ernie4_5_MoeForCausalLM, Ernie4_5_MoeModel, Ernie4_5_MoePreTrainedModel
from .models.esm import (
EsmForMaskedLM,
EsmForSequenceClassification,
Expand Down
2 changes: 2 additions & 0 deletions mindone/transformers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
encodec,
encoder_decoder,
ernie,
ernie4_5,
ernie4_5_moe,
esm,
falcon,
falcon_mamba,
Expand Down
4 changes: 4 additions & 0 deletions mindone/transformers/models/auto/configuration_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
("emu3", "Emu3Config"),
("encodec", "EncodecConfig"),
("encoder-decoder", "EncoderDecoderConfig"),
("ernie4_5", "Ernie4_5Config"),
("ernie4_5_moe", "Ernie4_5_MoeConfig"),
("esm", "EsmConfig"),
("falcon", "FalconConfig"),
("falcon_mamba", "FalconMambaConfig"),
Expand Down Expand Up @@ -363,6 +365,8 @@
("emu3", "Emu3"),
("encodec", "Encodec"),
("encoder-decoder", "Encoder decoder"),
("ernie4_5", "Ernie4_5"),
("ernie4_5_moe", "Ernie4_5_MoE"),
("esm", "ESM"),
("falcon", "Falcon"),
("falcon_mamba", "FalconMamba"),
Expand Down
4 changes: 4 additions & 0 deletions mindone/transformers/models/auto/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
("efficientnet", "EfficientNetModel"),
("electra", "ElectraModel"),
("encodec", "EncodecModel"),
("ernie4_5", "Ernie4_5Model"),
("ernie4_5_moe", "Ernie4_5_MoeModel"),
("esm", "EsmModel"),
("falcon", "FalconModel"),
("falcon_mamba", "FalconMambaModel"),
Expand Down Expand Up @@ -430,6 +432,8 @@
("data2vec-text", "Data2VecTextForCausalLM"),
("diffllama", "DiffLlamaForCausalLM"),
("emu3", "Emu3ForCausalLM"),
("ernie4_5", "Ernie4_5ForCausalLM"),
("ernie4_5_moe", "Ernie4_5_MoeForCausalLM"),
("falcon", "FalconForCausalLM"),
("fuyu", "FuyuForCausalLM"),
("falcon_mamba", "FalconMambaForCausalLM"),
Expand Down
17 changes: 17 additions & 0 deletions mindone/transformers/models/ernie4_5/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# This code is adapted from https://github.com/huggingface/transformers
# with modifications to run transformers on mindspore.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .modeling_ernie4_5 import *
Loading