Skip to content

Commit 6a6a7a7

Browse files
committed
fix tutorial visualize
2 parents 798312d + ef2189d commit 6a6a7a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/tutorial/2_with_bmtrain.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# adapted from https://github.com/OpenBMB/ModelCenter/blob/main/examples/bert/finetune_bert.py
22

3+
# For ModelCenter, `pip install model_center >= 1.0.0`
4+
# For BMTrain, `git clone https://github.com/OpenBMB/BMTrain.git` and `python3 setup.py install` locally, as it has not been released currently.
5+
36
import time
47
import os
58

@@ -57,6 +60,7 @@ def get_model(args):
5760
"WiC" : 2,
5861
}
5962
model = BertModel(args, num_types[args.dataset_name])
63+
from bigmodelvis import Visualization
6064
Visualization(model).structure_graph()
6165

6266
if args.delta_type == "lora":

0 commit comments

Comments
 (0)