forked from jamescalam/transformers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdpr.drawio
163 lines (163 loc) · 15.8 KB
/
dpr.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<mxfile host="app.diagrams.net" modified="2021-03-28T18:41:39.231Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Safari/537.36" etag="-villHFQuSL_59FNqVmz" version="14.4.9" type="github">
<diagram id="t-4teoGzYbHruD1Xy2gf" name="Page-1">
<mxGraphModel dx="442" dy="565" grid="0" 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="bZoExHBJ97mr-YX_5Zwz-29" value="" style="group" vertex="1" connectable="0" parent="1">
<mxGeometry x="80" y="80" width="350" height="186" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-12" value="" style="shape=table;html=1;whiteSpace=wrap;startSize=0;container=1;collapsible=0;childLayout=tableLayout;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-29">
<mxGeometry y="30" width="350" height="156" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-13" value="" style="shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-12">
<mxGeometry width="350" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-14" value="question <i style="font-weight: normal">(q)</i>" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-13">
<mxGeometry width="145" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-15" value="context <i style="font-weight: normal">(p)</i>" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-13">
<mxGeometry x="145" width="205" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-16" value="" style="shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-12">
<mxGeometry y="34" width="350" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-17" value="In what country is Normandy located?" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-16">
<mxGeometry width="145" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-18" value="The Normans were... to Normany, a region in France. They were..." style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-16">
<mxGeometry x="145" width="205" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-19" value="" style="shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-12">
<mxGeometry y="68" width="350" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-20" value="When were the Normans in Normandy?" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-19">
<mxGeometry width="145" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-21" value="<span>The Normans were... to Normany, a region in France. They were...</span>" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-19">
<mxGeometry x="145" width="205" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-22" value="" style="shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-12">
<mxGeometry y="102" width="350" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-23" value="..." style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-22">
<mxGeometry width="145" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-24" value="..." style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-22">
<mxGeometry x="145" width="205" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-25" value="" style="shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-12">
<mxGeometry y="122" width="350" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-26" value="When did Beyonc<span style="background-color: rgb(255 , 255 , 255) ; text-align: left"><font style="font-size: 12px">e</font></span><span>&nbsp;start becoming popular?</span>" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-25">
<mxGeometry width="145" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-27" value="Beyonc<span style="text-align: left ; background-color: rgb(255 , 255 , 255)">é</span>&nbsp;Giselle Knowles-Carter is an American singer..." style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-25">
<mxGeometry x="145" width="205" height="34" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-28" value="Training Data Pairs" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;" vertex="1" parent="bZoExHBJ97mr-YX_5Zwz-29">
<mxGeometry width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-30" style="edgeStyle=orthogonalEdgeStyle;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.202;exitY=0.982;exitDx=0;exitDy=0;fontSize=16;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=1;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-25" target="bZoExHBJ97mr-YX_5Zwz-33">
<mxGeometry relative="1" as="geometry">
<mxPoint x="360" y="440" as="targetPoint" />
<Array as="points">
<mxPoint x="151" y="440" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-34" value="questions" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" vertex="1" connectable="0" parent="bZoExHBJ97mr-YX_5Zwz-30">
<mxGeometry x="-0.5045" y="-1" relative="1" as="geometry">
<mxPoint x="40.3" y="19.61" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-31" style="edgeStyle=orthogonalEdgeStyle;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.684;exitY=0.999;exitDx=0;exitDy=0;fontSize=16;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=1;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-25" target="bZoExHBJ97mr-YX_5Zwz-32">
<mxGeometry relative="1" as="geometry">
<mxPoint x="360" y="360" as="targetPoint" />
<Array as="points">
<mxPoint x="319" y="313" />
<mxPoint x="319" y="313" />
<mxPoint x="319" y="360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-35" value="contexts" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=16;" vertex="1" connectable="0" parent="bZoExHBJ97mr-YX_5Zwz-31">
<mxGeometry x="-0.4161" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-32" target="bZoExHBJ97mr-YX_5Zwz-37">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-32" value="E<sub>P</sub> BERT Encoder" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;fillColor=#08C6AB;strokeColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
<mxGeometry x="360" y="330" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-33" target="bZoExHBJ97mr-YX_5Zwz-36">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-33" value="E<sub>Q</sub> BERT Encoder" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;fillColor=#08C6AB;strokeColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
<mxGeometry x="360" y="410" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-42" style="edgeStyle=orthogonalEdgeStyle;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;rounded=1;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-36" target="bZoExHBJ97mr-YX_5Zwz-38">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="630" y="440" />
<mxPoint x="630" y="400" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-36" value="E<sub>Q</sub> Vector" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" vertex="1" parent="1">
<mxGeometry x="520" y="410" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-43" style="edgeStyle=orthogonalEdgeStyle;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;rounded=1;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-37" target="bZoExHBJ97mr-YX_5Zwz-38">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="630" y="360" />
<mxPoint x="630" y="400" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-37" value="E<sub>P</sub> Vector" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;" vertex="1" parent="1">
<mxGeometry x="520" y="330" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-49" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=13;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-38" target="bZoExHBJ97mr-YX_5Zwz-48">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-38" value="Dot Product" style="rounded=1;whiteSpace=wrap;html=1;fontSize=16;fontColor=#FFFFFF;strokeColor=none;fillColor=#08C6AB;" vertex="1" parent="1">
<mxGeometry x="660" y="370" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-39" value="<span style="font-size: 14px">sim(q,p) = E</span><sub>Q</sub><span style="font-size: 14px">(q)<sup>T</sup>E<sub>P</sub>(p)</span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;" vertex="1" parent="1">
<mxGeometry x="645" y="440" width="150" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-40" value="<span style="font-size: 14px">E</span><sub>Q</sub><span style="font-size: 14px">(q)</span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;" vertex="1" parent="1">
<mxGeometry x="590" y="480" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-41" value="<span style="font-size: 14px">E</span><sub>P</sub><span style="font-size: 14px">(p)</span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;" vertex="1" parent="1">
<mxGeometry x="590" y="300" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-46" value="<span style="font-size: 11px;">smaller distance = larger sim(q,p)</span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=11;fontStyle=2" vertex="1" parent="1">
<mxGeometry x="660" y="320" width="115" height="40" as="geometry" />
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-50" style="edgeStyle=orthogonalEdgeStyle;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontSize=13;curved=1;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-48" target="bZoExHBJ97mr-YX_5Zwz-33">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="880" y="510" />
<mxPoint x="420" y="510" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-51" style="edgeStyle=orthogonalEdgeStyle;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=13;curved=1;" edge="1" parent="1" source="bZoExHBJ97mr-YX_5Zwz-48" target="bZoExHBJ97mr-YX_5Zwz-32">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="880" y="290" />
<mxPoint x="420" y="290" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="bZoExHBJ97mr-YX_5Zwz-48" value="<b>Optimize</b> E<sub>P</sub> and E<sub>Q</sub> weights to increase similarity" style="rounded=1;whiteSpace=wrap;html=1;fontSize=13;strokeColor=none;fillColor=#08C6AB;fontColor=#FFFFFF;" vertex="1" parent="1">
<mxGeometry x="820" y="370" width="120" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>