Platform
Resources
Pricing
Sign in
Get started
Tassilo Klein
AI Research Scientist, Director of SAP AI Research
Workspace
Fork
Published unlisted
By
Tassilo Klein
Edited
Feb 11, 2022
Fork of
Transformer Language Model Dynamics
1
Insert cell
#
Transformer Language Model Dynamics
Insert cell
Insert cell
Insert cell
d3
=
require
(
"d3@5"
)
Insert cell
margin
=
(
{
top
:
0
,
right
:
0
,
bottom
:
0
,
left
:
0
}
)
Insert cell
width
=
600
-
margin
.
left
-
margin
.
right
Insert cell
height
=
300
-
margin
.
top
-
margin
.
bottom
Insert cell
//data = (await fetch(url)).json()
data
=
FileAttachment
(
"highres_transformer.json"
)
.
json
(
)
Insert cell
function
kde
(
kernel
,
thresholds
,
data
)
{
return
thresholds
.
map
(
t
=>
[
t
,
d3
.
mean
(
data
,
d
=>
kernel
(
t
-
d
)
)
]
)
;
}
Insert cell
function
epanechnikov
(
bandwidth
)
{
return
x
=>
Math
.
abs
(
x
/=
bandwidth
)
<=
1
?
0.75
*
(
1
-
x
*
x
)
/
bandwidth
:
0
;
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
margin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
width
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
kde
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
epanechnikov
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML