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
ModelZoo
bert-large_oneflow
Commits
ba38aeb1
Commit
ba38aeb1
authored
Sep 27, 2023
by
“yuguo”
Browse files
update readme
parent
c3e8a30b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
README.md
README.md
+1
-1
libai/data/datasets/bert_dataset.py
libai/data/datasets/bert_dataset.py
+2
-2
model.properties
model.properties
+2
-2
requirements.txt
requirements.txt
+1
-1
No files found.
README.md
View file @
ba38aeb1
...
...
@@ -63,7 +63,7 @@ train.dist.pipeline_parallel_size = 1
预训练命令:
cd bert-large_oneflow
cd
home/
bert-large_oneflow
bash tools/train.sh tools/train_net.py configs/bert_large_pretrain.py 4
### 精度
...
...
libai/data/datasets/bert_dataset.py
View file @
ba38aeb1
...
...
@@ -233,7 +233,7 @@ def pad_and_convert_to_numpy(
tokentypes_np
=
np
.
array
(
tokentypes
+
filler
,
dtype
=
np
.
int64
)
# Padding mask.
padding_mask_np
=
np
.
array
([
1
]
*
num_tokens
+
[
0
]
*
padding_length
,
dtype
=
np
.
bool
)
padding_mask_np
=
np
.
array
([
1
]
*
num_tokens
+
[
0
]
*
padding_length
,
dtype
=
np
.
bool
_
)
# Lables and loss mask.
labels
=
[
-
1
]
*
max_seq_length
...
...
@@ -243,7 +243,7 @@ def pad_and_convert_to_numpy(
labels
[
masked_positions
[
i
]]
=
masked_labels
[
i
]
loss_mask
[
masked_positions
[
i
]]
=
1
labels_np
=
np
.
array
(
labels
,
dtype
=
np
.
int64
)
loss_mask_np
=
np
.
array
(
loss_mask
,
dtype
=
np
.
bool
)
loss_mask_np
=
np
.
array
(
loss_mask
,
dtype
=
np
.
bool
_
)
return
tokens_np
,
tokentypes_np
,
labels_np
,
padding_mask_np
,
loss_mask_np
...
...
model.properties
View file @
ba38aeb1
# 模型唯一标识
modelCode
=
65
# 模型名称
modelName
=
B
ert-
L
arge_oneflow
modelName
=
b
ert-
l
arge_oneflow
# 模型描述
modelDescription
=
基于OneFlow框架的Bert-Large模型
# 应用场景
appScenario
=
训练,推理,
train,inference,
nlp,智能聊天助手
appScenario
=
训练,推理,nlp,智能聊天助手
,科研
# 框架类型
frameType
=
OneFlow,Libai
requirements.txt
View file @
ba38aeb1
...
...
@@ -22,7 +22,7 @@ portalocker
dill
flake8
==3.8.1
isort
==5.10.1
black
==21.4b
2
black
==21.4b
autoflake
tensorboardX
pytest
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