Skip to content

Commit 798312d

Browse files
committed
fix tutorial visualize
1 parent 62e31a6 commit 798312d

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

docs/source/notes/autodelta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Then use the config to add a delta model to the backbone model
3434
delta_model = AutoDeltaModel.from_config(delta_config, backbone_model=backbone_model)
3535

3636
# now visualize the modified backbone_model
37-
from opendelta import Visualization
37+
from bigmodelvis import Visualization
3838
Visualizaiton(backbone_model).structure_graph()
3939
```
4040

docs/source/notes/custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Delta tuning's core change in the structure of the base model is to decorate (mo
1515
We should first know the name of the feedforward layer in the BART model by visualization. <img src="../imgs/hint-icon-2.jpg" height="30px"> *For more about visualization, see [Visualization](visualization).*
1616

1717
```python
18-
from opendelta import Visualization
18+
from bigmodelvis import Visualization
1919
Visualization(model).structure_graph()
2020
```
2121

docs/source/notes/inspect.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ name: raw_print
3030
The original presentation of models is **not tailored for repeated structures, big models, or parameters-centric tasks**.
3131

3232

33-
## Using visualization from opendelta.
33+
## Using visualization from bigmodelvis.
3434

3535
First let's visualize all the parameters in the bert model. As we can see, structure inside a bert model, and the all the paramters location of the model are neatly represented in tree structure. (See [color scheme](color_schema) for the colors)
3636

3737
```python
38-
from opendelta import Visualization
38+
from bigmodelvis import Visualization
3939
model_vis = Visualization(backbone_model)
4040
model_vis.structure_graph()
4141
```

docs/source/notes/namebasedaddr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ print(root.name_b[0].name_a)
3535
We can visualize the model (For details, see [visualization](visualization))
3636

3737
```python
38-
from opendelta import Visualization
38+
from bigmodelvis import Visualization
3939
Visualization(root).structure_graph()
4040
```
4141

examples/tutorial/2_with_bmtrain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def get_args():
2828
import opendelta as od
2929
from opendelta import LoraModel, AdapterModel, CompacterModel, LowRankAdapterModel, BitFitModel, ParallelAdapterModel
3030
from opendelta.utils.inspect import inspect_optimizer_statistics
31+
from bigmodelvis import Visualization
3132
print("before modify")
3233

3334
class BertModel(torch.nn.Module):
@@ -56,7 +57,7 @@ def get_model(args):
5657
"WiC" : 2,
5758
}
5859
model = BertModel(args, num_types[args.dataset_name])
59-
# od.Visualization(model).structure_graph()
60+
Visualization(model).structure_graph()
6061

6162
if args.delta_type == "lora":
6263
delta_model = LoraModel(backbone_model=model, modified_modules=['project_q', 'project_k'], backend='bmt')

0 commit comments

Comments
 (0)