Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
panhb
bert_tensorflow
Commits
2d2e7714
Commit
2d2e7714
authored
Nov 13, 2023
by
hepj987
Browse files
调整算法类别
parent
b65b9e0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
6 deletions
+31
-6
README.md
README.md
+30
-5
model.properties
model.properties
+1
-1
No files found.
README.md
View file @
2d2e7714
...
...
@@ -68,24 +68,49 @@ squad-v1.1 eval脚本:[evaluate-v1.1.py](https://github.com/allenai/bi-att-flo
推荐使用docker方式运行,提供
[
光源
](
https://www.sourcefind.cn/#/main-page
)
镜像,可以dockerpull拉取
### Docker(方式一)
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.7.0-centos7.6-dtk-22.10.1-py37-latest
docker run -dit --network=host --name=bert_tensorflow --privileged --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size=16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -u root --ulimit stack=-1:-1 --ulimit memlock=-1:-1 image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.7.0-centos7.6-dtk-22.10.1-py37-latest
docker exec -it bert_tensorflow /bin/bash
pip install -r requirements.txt
```
安装过程可能顶掉DCU版本的tensorflow,可以到
[
开发者社区
](
https://cancon.hpccube.com:65024/4/main/tensorflow/dtk22.10
)
下载DCU版本对应包
### Dockerfile(方式二)
```
docker build -t bert:latest .
docker run -dit --network=host --name=bert_tensorflow --privileged --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size=16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -u root --ulimit stack=-1:-1 --ulimit memlock=-1:-1 bert:latest
docker exec -it bert_tensorflow /bin/bash
pip install -r requirements.txt
```
### Conda(方式三)
```
conda create -n bert_tensorflow python=3.7
pip install -r requirements.txt
```
pip install requirements.txt
遇到AttributeError: module 'typing' has no attribute '_ClassVar'则是由于新版本的python更换属性名导致的
安装过程可能顶掉DCU版本的tensorflow,可以到
[
开发者社区
](
https://cancon.hpccube.com:65024/4/main/tensorflow/dtk22.10
)
下载DCU版本对应包
[
tensorflow2.7
](
https://cancon.hpccube.com:65024/directlink/4/tensorflow/dtk22.10/tensorflow-2.7.0+git67f0ade9.dtk2210-cp37-cp37m-manylinux2014_x86_64.whl
)
[
DTK22.10.1
](
https://cancon.hpccube.com:65024/directlink/1/DTK-22.10.1/CentOS7.6/DTK-22.10.1-CentOS7.6-x86_64.tar.gz
)
### python版本兼容
```
搭建环境时会遇到AttributeError: module 'typing' has no attribute '_ClassVar'则是由于新版本的python更换属性名导致的
修改python3.7/site-packages/dataclasses.py 550行
return type(a_type) is typing._ClassVar
改为
return type(a_type) is typing.ClassVar
```
## 训练
### 数据转化-MNLI
...
...
@@ -248,11 +273,11 @@ sh bert_squad_gpus.sh
## 算法类别
`
自然语言处理
`
`
对话问答,文本分类
`
## 热点应用行业
`互联网
,智能聊天
`
`互联网`
# 源码仓库及问题反馈
...
...
model.properties
View file @
2d2e7714
...
...
@@ -5,6 +5,6 @@ modelName=bert_tensorflow
# 模型描述
modelDescription
=
bert是一种预训练的语言表征模型。
# 应用场景
appScenario
=
训练,互联网,
智能聊天
appScenario
=
训练,互联网,
对话问答,文本分类
# 框架类型
frameType
=
tensorflow
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment