Spaces:
Running
Running
victormiller
commited on
Commit
•
feb6fe5
1
Parent(s):
e137e27
Update results.py
Browse files- results.py +79 -1
results.py
CHANGED
@@ -2,6 +2,84 @@ from fasthtml.common import *
|
|
2 |
from fasthtml.components import *
|
3 |
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
def results():
|
6 |
-
return Div(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
|
|
2 |
from fasthtml.components import *
|
3 |
|
4 |
|
5 |
+
intro_div = Div(
|
6 |
+
H2("Perplexity Evaluation on Duplicate Data"),
|
7 |
+
H3("Model based Quality Estimation"),
|
8 |
+
P("We took one of the model-based data quality evaluation strategies adopted by [DataComp-LM](https://arxiv.org/abs/2406.11794), which used perplexity filtering as a candidate for quality filtering. DataComp-LM followed [CCNet’s](https://arxiv.org/abs/1911.00359) practice to use a 5-gram Kneser-Ney model as implemented in the [KenLM](https://github.com/kpu/kenlm) library for efficient perplexity calculation. Following this practice, we estimated data quality by taking a KenLM model (from [edugp/kenlm](https://huggingface.co/edugp/kenlm)) trained on English Wikipedia data to compute perplexity on data with different duplication patterns. Lower perplexity is regarded as a signal of higher quality."),
|
9 |
+
H3("Sampling Strategy"),
|
10 |
+
P("We started from a processed Common Crawl (CC) ablation dataset divided by the number of duplicates of each document. For each CC dump, we have different buckets each holding chunks of document with different duplicate count ranges (1-1, 2-5, 6-10, 11-100, 101-1000, 1001-30000000). We sampled the first 10k documents from each chunk with their meta data."),
|
11 |
+
|
12 |
+
)
|
13 |
+
|
14 |
+
perp1_div = Div(
|
15 |
+
Section(
|
16 |
+
H3("Perplexity vs Buckets"),
|
17 |
+
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."),
|
18 |
+
Img(src="images/prep-diff-buckets-global.png", height = "300", width = "600" ),
|
19 |
+
),
|
20 |
+
Section(
|
21 |
+
H3("Perplexity vs Years"),
|
22 |
+
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."),
|
23 |
+
Img(src="images/prep-across-diff-year-global-dup-buckets.png", height = "300", width = "600" ),
|
24 |
+
),
|
25 |
+
Section(
|
26 |
+
H3("Perplexity vs Document Duplication"),
|
27 |
+
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."),
|
28 |
+
Img(src="images/prep-across-diff-docs-dup-count-global.png", height = "300", width = "600" ),
|
29 |
+
),
|
30 |
+
Section(
|
31 |
+
H3("Perplexity vs Dump Duplication"),
|
32 |
+
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."),
|
33 |
+
Img(src="images/prep-across-diff-dump-dup-counts-global.png", height = "300", width = "600" ),
|
34 |
+
),
|
35 |
+
Section(
|
36 |
+
H3("Perplexity vs Local Buckets"),
|
37 |
+
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."),
|
38 |
+
Img(src="images/prep-across-diff-buckets-local.png", height = "300", width = "600" ),
|
39 |
+
),
|
40 |
+
Section(
|
41 |
+
H3("Perplexity vs Local Dump Duplication"),
|
42 |
+
P("Following the same practice, we can plot the local version of the graph of average perplexity with respect to dump duplication."),
|
43 |
+
Img(src="images/prep-diff-dump-dump-counts-local.png", height = "300", width = "600" ),
|
44 |
+
),
|
45 |
+
)
|
46 |
+
|
47 |
+
|
48 |
+
llama_div = Div(
|
49 |
+
Section(
|
50 |
+
H2("Llama 3.1 8B"),
|
51 |
+
P("For comparison purpose, we run the same perplexity evaluation with llama 3.1 8B model.")
|
52 |
+
),
|
53 |
+
Section(
|
54 |
+
H3("Perplexity vs Buckets"),
|
55 |
+
Img(src="images/perp-across-diff-buckets-global.png", height = "300", width = "600" ),
|
56 |
+
),
|
57 |
+
Section(
|
58 |
+
H3("Perplexity vs Years"),
|
59 |
+
Img(src="images/prep-across-diff-years-global.png", height = "300", width = "600" ),
|
60 |
+
),
|
61 |
+
Section(
|
62 |
+
H3("Perplexity vs Dump Duplication"),
|
63 |
+
Img(src="images/prep-vs-dump-dup-global.png", height = "300", width = "600" ),
|
64 |
+
),
|
65 |
+
Section(
|
66 |
+
H3("Perplexity vs Local Buckets"),
|
67 |
+
Img(src="images/prep-diff-buckets-local.png", height = "300", width = "600" ),
|
68 |
+
),
|
69 |
+
Section(
|
70 |
+
H3("Perplexity vs Local Dump Duplication"),
|
71 |
+
Img(src="images/prep-vs-dump-dup-global.png", height = "300", width = "600" ),
|
72 |
+
),
|
73 |
+
)
|
74 |
+
|
75 |
+
|
76 |
def results():
|
77 |
+
return Div(
|
78 |
+
Section(
|
79 |
+
intro_div,
|
80 |
+
perp1_div,
|
81 |
+
llama_div,
|
82 |
+
id="inner-text"
|
83 |
+
)
|
84 |
+
)
|
85 |
|