forked from jamescalam/transformers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbert_mlm.drawio
62 lines (62 loc) · 5.69 KB
/
bert_mlm.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<mxfile host="app.diagrams.net" modified="2021-04-10T16:41:12.927Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36" etag="0PqHIrYF-KS6t3ezDh0i" version="14.5.8" type="github">
<diagram id="QnuWXwE8KHdV2nabuIjv" name="Page-1">
<mxGraphModel dx="1117" dy="374" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="A1K_iQtooFn0aIjgjKIt-1" value="" style="rounded=0;whiteSpace=wrap;html=1;align=center;dashed=1;dashPattern=1 1;perimeterSpacing=0;strokeColor=#212B38;fontColor=#212B38;" parent="1" vertex="1">
<mxGeometry x="230" y="160" width="200" height="130" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="A1K_iQtooFn0aIjgjKIt-5" target="A1K_iQtooFn0aIjgjKIt-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-33" value="hidden_state tensor <i>(typical dimension = 768/1024)</i>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="A1K_iQtooFn0aIjgjKIt-32" vertex="1" connectable="0">
<mxGeometry x="-0.3002" y="1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-5" value="Bert" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#212B38;fontColor=#212B38;fontSize=14;" parent="1" vertex="1">
<mxGeometry x="160" y="320" width="360" height="40" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#212B38;fontColor=#212B38;" parent="1" source="A1K_iQtooFn0aIjgjKIt-7" target="A1K_iQtooFn0aIjgjKIt-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-31" value="output size&nbsp;<i>(= vocab_size)</i>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="A1K_iQtooFn0aIjgjKIt-6" vertex="1" connectable="0">
<mxGeometry x="-0.1535" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-7" value="Linear layer" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=none;fillColor=#08C6AB;fontColor=#FFFFFF;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="260" y="240" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#212B38;fontColor=#212B38;" parent="1" source="A1K_iQtooFn0aIjgjKIt-13" target="A1K_iQtooFn0aIjgjKIt-30" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-13" value="Softmax" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=none;fillColor=#08C6AB;fontColor=#FFFFFF;fontSize=18;" parent="1" vertex="1">
<mxGeometry x="260" y="170" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-14" value="Input Text with [MASK] tokens" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=#212B38;fontColor=#212B38;" parent="1" vertex="1">
<mxGeometry x="230" y="380" width="220" height="26" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-18" value="" style="endArrow=classic;html=1;strokeColor=#212B38;fontColor=#212B38;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" parent="1" source="A1K_iQtooFn0aIjgjKIt-14" target="A1K_iQtooFn0aIjgjKIt-5" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="340" y="370" as="sourcePoint" />
<mxPoint x="490" y="390" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-23" value="MLM Head" style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillColor=#ffffff;fontColor=#212B38;fontSize=14;" parent="1" vertex="1">
<mxGeometry x="210" y="205" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-25" value="Masked Token" style="text;html=1;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#212B38;fontSize=14;" parent="1" vertex="1">
<mxGeometry x="283.75" y="60" width="112.5" height="20" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#212B38;fontColor=#212B38;" parent="1" source="A1K_iQtooFn0aIjgjKIt-30" target="A1K_iQtooFn0aIjgjKIt-25" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="A1K_iQtooFn0aIjgjKIt-30" value="Argmax" style="rounded=1;whiteSpace=wrap;html=1;align=center;strokeColor=#212B38;fontColor=#212B38;fontSize=14;" parent="1" vertex="1">
<mxGeometry x="290" y="100" width="100" height="40" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>