Spaces:
Sleeping
Sleeping
victormiller
commited on
Commit
•
e3d27b8
1
Parent(s):
2d1895d
Update results.py
Browse files- results.py +52 -46
results.py
CHANGED
@@ -16,62 +16,68 @@ perp1_div = Div(
|
|
16 |
P("For each bucket, we aggregated all the chunks that belong to a single year and calculated the average perplexity for each (bucket, year) data point."),
|
17 |
Img(src="images/prep-diff-buckets-global.png", height = "300", width = "600" ),
|
18 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
)
|
20 |
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
|
24 |
-
perp_v_years = P("Taking the same data, we can convert it into a graph indicating the yearly trend. For most buckets, the average perplexity of dumps from more recent years seem to be lower than that of former years.")
|
25 |
-
perp_v_years_img = Img(src="images/prep-across-diff-year-global-dup-buckets.png")
|
26 |
-
perp_v_docdup = P("We can also break each bucket into distinct document counts. The graph becomes a bit noisy at the end because of insufficient samples with larger duplication counts.")
|
27 |
-
perp_v_docdup_img = Img(src="images/prep-across-diff-docs-dup-count-global.png")
|
28 |
-
perp_v_dumpdup = P("We are also interested in how the number of dumps a document is in affect data quality. From the graph below we can see that documents that are duplicated across around 40 - 60 dumps usually have lower perplexity.")
|
29 |
-
perp_v_dumpdup_img = Img(src="images/prep-across-diff-dump-dup-counts-global.png")
|
30 |
-
perp_v_localbuck = P("Previously we have seen that documents in recent dumps tend to have lower perplexity. This might be related to the way how global deduplication was implemented. During global deduplication, we only keep copy in the latest dump. Hence documents that are duplicated across multiple dumps only appear in the latest one. To avoid bias brought by this strategy, we tried to recover the states before the global deduplication by reading the metadata attached with each document.")
|
31 |
-
perp_v_localbuck_img = Img(src="images/prep-across-diff-buckets-local.png")
|
32 |
-
perp_v_localdump = P("Following the same practice, we can plot the local version of the graph of average perplexity with respect to dump duplication.")
|
33 |
-
perp_v_localdump_img = Img(src="images/prep-diff-dump-dump-counts-local.png")
|
34 |
-
|
35 |
-
llama_explan = P("For comparison purpose, we run the same perplexity evaluation with llama 3.1 8B model.")
|
36 |
-
llama_perp_v_buckets_img = Img(src="images/perp-across-diff-buckets-global.png")
|
37 |
-
llama_perp_v_years_img = Img(src="images/prep-across-diff-years-global.png")
|
38 |
-
llama_perp_v_dumpdup_img = Img(src="images/prep-vs-dump-dup-global.png")
|
39 |
-
llama_perp_v_localbuck_img = Img(src="images/prep-diff-buckets-local.png")
|
40 |
-
llama_perp_v_localdump_img = Img(src="images/prep-vs-dump-dup-global.png")
|
41 |
-
|
42 |
def results():
|
43 |
return Div(
|
44 |
Section(
|
45 |
intro_div,
|
46 |
perp1_div,
|
47 |
-
|
48 |
-
#H3("Perplexity vs Years"),
|
49 |
-
# perp_v_years,
|
50 |
-
# perp_v_years_img,
|
51 |
-
# H3("Perplexity vs Document Duplication"),
|
52 |
-
# perp_v_docdup,
|
53 |
-
# perp_v_docdup_img,
|
54 |
-
# H3("Perplexity vs Dump Duplication"),
|
55 |
-
# perp_v_dumpdup,
|
56 |
-
# perp_v_dumpdup_img,
|
57 |
-
# H3("Perplexity vs Local Buckets"),
|
58 |
-
# perp_v_localbuck,
|
59 |
-
# perp_v_localbuck_img,
|
60 |
-
# H3("Perplexity vs Local Dump Duplication"),
|
61 |
-
# perp_v_localdump,
|
62 |
-
# perp_v_localdump_img,
|
63 |
-
# H2("Llama 3.1 8B"),
|
64 |
-
# llama_explan,
|
65 |
-
# H3("Perplexity vs Buckets"),
|
66 |
-
# llama_perp_v_buckets_img,
|
67 |
-
# H3("Perplexity vs Years"),
|
68 |
-
# llama_perp_v_years_img,
|
69 |
-
# H3("Perplexity vs Dump Duplication"),
|
70 |
-
# llama_perp_v_dumpdup_img,
|
71 |
-
# H3("Perplexity vs Local Buckets"),
|
72 |
-
# llama_perp_v_localbuck_img,
|
73 |
-
# H3("Perplexity vs Local Dump Duplication"),
|
74 |
-
# llama_perp_v_localdump_img,
|
75 |
id="inner-text"
|
76 |
)
|
77 |
)
|
|
|
16 |
P("For each bucket, we aggregated all the chunks that belong to a single year and calculated the average perplexity for each (bucket, year) data point."),
|
17 |
Img(src="images/prep-diff-buckets-global.png", height = "300", width = "600" ),
|
18 |
),
|
19 |
+
Section(
|
20 |
+
H3("Perplexity vs Years"),
|
21 |
+
P("Taking the same data, we can convert it into a graph indicating the yearly trend. For most buckets, the average perplexity of dumps from more recent years seem to be lower than that of former years."),
|
22 |
+
Img(src="images/prep-across-diff-year-global-dup-buckets.png", height = "300", width = "600" ),
|
23 |
+
),
|
24 |
+
Section(
|
25 |
+
H3("Perplexity vs Document Duplication"),
|
26 |
+
P("We can also break each bucket into distinct document counts. The graph becomes a bit noisy at the end because of insufficient samples with larger duplication counts."),
|
27 |
+
Img(src="images/prep-across-diff-docs-dup-count-global.png", height = "300", width = "600" ),
|
28 |
+
),
|
29 |
+
Section(
|
30 |
+
H3("Perplexity vs Dump Duplication"),
|
31 |
+
P("We are also interested in how the number of dumps a document is in affect data quality. From the graph below we can see that documents that are duplicated across around 40 - 60 dumps usually have lower perplexity."),
|
32 |
+
Img(src="images/prep-across-diff-dump-dup-counts-global.png", height = "300", width = "600" ),
|
33 |
+
),
|
34 |
+
Section(
|
35 |
+
H3("Perplexity vs Local Buckets"),
|
36 |
+
P("Previously we have seen that documents in recent dumps tend to have lower perplexity. This might be related to the way how global deduplication was implemented. During global deduplication, we only keep copy in the latest dump. Hence documents that are duplicated across multiple dumps only appear in the latest one. To avoid bias brought by this strategy, we tried to recover the states before the global deduplication by reading the metadata attached with each document."),
|
37 |
+
Img(src="images/prep-across-diff-buckets-local.png", height = "300", width = "600" ),
|
38 |
+
),
|
39 |
+
Section(
|
40 |
+
H3("Perplexity vs Local Dump Duplication"),
|
41 |
+
P("Following the same practice, we can plot the local version of the graph of average perplexity with respect to dump duplication."),
|
42 |
+
Img(src="images/prep-diff-dump-dump-counts-local.png", height = "300", width = "600" ),
|
43 |
+
),
|
44 |
)
|
45 |
|
46 |
|
47 |
+
llama_div = Div(
|
48 |
+
Section(
|
49 |
+
H2("Llama 3.1 8B"),
|
50 |
+
P("For comparison purpose, we run the same perplexity evaluation with llama 3.1 8B model.")
|
51 |
+
)
|
52 |
+
Section(
|
53 |
+
H3("Perplexity vs Buckets"),
|
54 |
+
Img(src="images/perp-across-diff-buckets-global.png", height = "300", width = "600" ),
|
55 |
+
),
|
56 |
+
Section(
|
57 |
+
H3("Perplexity vs Years"),
|
58 |
+
Img(src="images/prep-across-diff-years-global.png", height = "300", width = "600" ),
|
59 |
+
),
|
60 |
+
Section(
|
61 |
+
H3("Perplexity vs Dump Duplication"),
|
62 |
+
Img(src="images/prep-vs-dump-dup-global.png", height = "300", width = "600" ),
|
63 |
+
),
|
64 |
+
Section(
|
65 |
+
H3("Perplexity vs Local Buckets"),
|
66 |
+
Img(src="images/prep-diff-buckets-local.png", height = "300", width = "600" ),
|
67 |
+
),
|
68 |
+
Section(
|
69 |
+
H3("Perplexity vs Local Dump Duplication"),
|
70 |
+
Img(src="images/prep-vs-dump-dup-global.png", height = "300", width = "600" ),
|
71 |
+
),
|
72 |
+
)
|
73 |
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
def results():
|
76 |
return Div(
|
77 |
Section(
|
78 |
intro_div,
|
79 |
perp1_div,
|
80 |
+
llama_div,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
id="inner-text"
|
82 |
)
|
83 |
)
|