Skip to content

Conversation

@liuchuting
Copy link
Contributor

@liuchuting liuchuting commented Jun 4, 2025

What does this PR do?

Add convbert model

Fixes # (issue)

Adds # (feature)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [√] Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes? E.g. record bug fixes or new features in What's New. Here are the
    documentation guidelines
  • [√] Did you build and run the code without any errors?
  • Did you report the running environment (NPU type/MS version) and performance in the doc? (better record it for data loading, model inference, or training tasks)
  • [√] Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@xxx

@liuchuting liuchuting requested a review from vigo999 as a code owner June 4, 2025 03:26
@liuchuting liuchuting force-pushed the convbert branch 3 times, most recently from a66e02b to 69765bf Compare June 9, 2025 03:03
@liuchuting liuchuting force-pushed the convbert branch 3 times, most recently from bb48d2f to 77f4f17 Compare July 8, 2025 08:37
@Mark-ZhouWX Mark-ZhouWX self-requested a review July 9, 2025 06:32
_CONFIG_FOR_DOC = "ConvBertConfig"


def load_tf_weights_in_convbert(model, config, tf_checkpoint_path):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同cannie模型,看下是否需要提公共函数

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

位置和原仓是一致的

import tensorflow as tf
except ImportError:
logger.error(
"Loading a TensorFlow model in PyTorch, requires TensorFlow to be installed. Please see "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyTorch->mindspore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done



CONVBERT_START_DOCSTRING = r"""
This model is a PyTorch [nn.Cell](https://www.mindspore.cn/docs/en/r2.5.0/api_python/nn/mindspore.nn.Cell.html) sub-class. Use
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytorch->mindspore,全局搜索下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@zhanghuiyao zhanghuiyao added this pull request to the merge queue Jul 24, 2025
Merged via the queue into mindspore-lab:master with commit f95a148 Jul 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants