Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add modeler mirror & NLP SIG introdution #1787

Merged
merged 1 commit into from
Oct 29, 2024
Merged
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
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@

## Table of Contents

- [News 📢](#news-)
- [Installation](#installation)
- [Install from Pypi](#install-from-pypi)
- [Daily build](#daily-build)
- [Install from source](#install-from-source)
- [Version Compatibility](#version-compatibility)
- [Introduction](#introduction)
- [Major Features](#major-features)
- [Supported models](#supported-models)
- [License](#license)
- [Feedbacks and Contact](#feedbacks-and-contact)
- [Acknowledgement](#acknowledgement)
- [Citation](#citation)
- [ MindNLP](#-mindnlp)
- [Table of Contents](#table-of-contents)
- [News 📢](#news-)
- [Installation](#installation)
- [Install from Pypi](#install-from-pypi)
- [Daily build](#daily-build)
- [Install from source](#install-from-source)
- [Version Compatibility](#version-compatibility)
- [Introduction](#introduction)
- [Major Features](#major-features)
- [Supported models](#supported-models)
- [License](#license)
- [Feedbacks and Contact](#feedbacks-and-contact)
- [MindSpore NLP SIG](#mindspore-nlp-sig)
- [Acknowledgement](#acknowledgement)
- [Citation](#citation)

## News 📢

Expand Down Expand Up @@ -121,6 +124,16 @@ This project is released under the [Apache 2.0 license](LICENSE).

The dynamic version is still under development, if you find any issue or have an idea on new features, please don't hesitate to contact us via [Github Issues](https://github.com/mindspore-lab/mindnlp/issues).


## MindSpore NLP SIG

MindSpore NLP SIG (Natural Language Processing Special Interest Group) is the main development team of the MindNLP framework. It aims to collaborate with developers from both industry and academia who are interested in research, application development, and the practical implementation of natural language processing. Our goal is to create the best NLP framework based on the domestic framework MindSpore. Additionally, we regularly hold NLP technology sharing sessions and offline events. Interested developers can join our SIG group using the QR code below.

<div align="center">
<img src="./assets/qrcode_qq_group.jpg" width="250" />
</div>


## Acknowledgement

MindSpore is an open source project that welcomes any contribution and feedback.
Expand Down
Binary file added assets/qrcode_qq_group.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions mindnlp/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ def http_get(url, path=None, md5sum=None, download_file_name=None, proxies=None,
retry_cnt += 1
else:
raise HTTPError(
f"Download from {url} failed. " "Retry limit reached")
f"Download from {url} failed. " "Retry limit reached. \n"
f"If you want to speedup the download, please use `AutoModel.from_pretrained('model_id', mirror='modeler')` instead.\n"
f'The optional mirrors can be ["modeler", "modelscope", "wisemodel", "gitee", "aifast"]')

return file_path

Expand Down Expand Up @@ -884,6 +886,7 @@ def get_checkpoint_shard_files(
'wisemodel': "https://awsdownload.wisemodel.cn/file-proxy/{}/-/raw/{}/{}",
'gitee': "https://ai.gitee.com/huggingface/{}/resolve/{}/{}",
'aifast': "https://aifasthub.com/models/{}/{}",
'modeler': "https://modelers.cn/coderepo/web/v1/file/{}/{}/media/{}"
}

def build_download_url(
Expand All @@ -901,8 +904,8 @@ def build_download_url(
revision = 'main'
if mirror not in MIRROR_MAP:
raise ValueError('The mirror name not support, please use one of the mirror website below: '
'["huggingface", "modelscope", "wisemodel", "gitee", "aifast"]')
if mirror in ('huggingface', 'gitee', 'modelscope', 'wisemodel'):
'["huggingface", "modelscope", "wisemodel", "gitee", "aifast", "modeler"]')
if mirror in ('huggingface', 'gitee', 'modelscope', 'wisemodel', 'modeler'):
if mirror == 'modelscope' and revision == 'main':
revision = 'master'
return MIRROR_MAP[mirror].format(repo_id, revision, filename)
Expand Down
Loading