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
UMT5_pytorch
Commits
3d0ce953
Commit
3d0ce953
authored
May 15, 2024
by
wanglch
Browse files
Update umt5_summary.py
parent
b84362fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
umt5_summary.py
umt5_summary.py
+1
-0
No files found.
umt5_summary.py
View file @
3d0ce953
...
...
@@ -9,6 +9,7 @@ os.environ["HIP_VISIBLE_DEVICES"] = "4,5"
device
=
'cuda'
if
torch
.
cuda
.
is_available
()
else
'cpu'
print
(
f
'Using
{
device
}
device'
)
# 根据用户路径修改对应路径即可
model_checkpoint
=
"/umt5/umt5_base"
trained_model_weights
=
'/umt5/saves/train_dtk_weights/epoch_1_valid_rouge_23.4347_model_dtk_weights.bin'
tokenizer
=
AutoTokenizer
.
from_pretrained
(
model_checkpoint
)
...
...
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