Addressed comments
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ def create_app():
|
|
35 |
margin: 15px 0 10px 0;
|
36 |
font-weight: bold;
|
37 |
font-size: 1.1em !important;
|
|
|
38 |
}
|
39 |
.info-box {
|
40 |
background: #ffffff;
|
@@ -43,10 +44,12 @@ def create_app():
|
|
43 |
padding: 15px;
|
44 |
margin: 10px 0;
|
45 |
font-size: 16px !important;
|
|
|
46 |
}
|
47 |
.info-box p, .info-box li, .info-box ul {
|
48 |
font-size: 16px !important;
|
49 |
line-height: 1.6 !important;
|
|
|
50 |
}
|
51 |
.highlight {
|
52 |
background: #fff3cd;
|
@@ -82,6 +85,89 @@ def create_app():
|
|
82 |
strong {
|
83 |
font-size: inherit !important;
|
84 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
"""
|
86 |
|
87 |
with gr.Blocks(css=custom_css, title="SmolLM3-3B EU Data Transparency") as app:
|
@@ -95,13 +181,16 @@ def create_app():
|
|
95 |
except:
|
96 |
gr.HTML('<div style="height: 120px;"></div>') # Placeholder if image not found
|
97 |
|
98 |
-
with gr.Column(scale=1):
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
105 |
|
106 |
with gr.Column(scale=1):
|
107 |
try:
|
@@ -112,16 +201,16 @@ def create_app():
|
|
112 |
gr.HTML("""
|
113 |
<div style="text-align: center; margin-top: 40px; padding: 20px; background: #f8f9fa; border-radius: 10px;">
|
114 |
<p style="color: #6c757d; margin: 0;">
|
115 |
-
This Space contains the transparency report for the <a href="https://huggingface.co/HuggingFaceTB/SmolLM3-3B">SmolLM3-3B</a> GPAI model
|
116 |
-
For more information, see the <a href="https://digital-strategy.ec.europa.eu/en/library/explanatory-notice-and-template-public-summary-training-content-general-purpose-ai-models" class="dataset-link">Explanatory Notice and Template</a>
|
117 |
</p>
|
118 |
</div>
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
""")
|
126 |
|
127 |
# Section 1: General Information
|
@@ -140,8 +229,12 @@ def create_app():
|
|
140 |
<ul>
|
141 |
<li><strong>Provider name and contact details:</strong>
|
142 |
<ul>
|
143 |
-
<li
|
144 |
-
|
|
|
|
|
|
|
|
|
145 |
</ul>
|
146 |
</li>
|
147 |
</ul>
|
@@ -169,7 +262,8 @@ def create_app():
|
|
169 |
<ul>
|
170 |
<li><strong>TEXT</strong>
|
171 |
<ul>
|
172 |
-
<li><strong>Size:</strong> <strong>more than 10 trillion tokens</strong></li>
|
|
|
173 |
<li>The training corpus for SmolLM3 is made up of several publicly accessible large datasets containing web documents, scientific articles, software code, and synthetically generated textbooks and mathematical data for pre-training in addition to several mid-training and fine-tuning datasets to enable chat interactions, instruction-following and task-solving behaviors.</li>
|
174 |
</ul>
|
175 |
</li>
|
@@ -180,12 +274,12 @@ def create_app():
|
|
180 |
</li>
|
181 |
<li><strong>Description of the linguistic characteristics of the overall training data:</strong>
|
182 |
<ul>
|
183 |
-
<li>The overall training process focuses on 6 languages that are all
|
184 |
</ul>
|
185 |
</li>
|
186 |
<li><strong>Other relevant characteristics of the overall training data:</strong>
|
187 |
<ul>
|
188 |
-
<li>The training data also includes software code in the programming languages included in the Stack v2 dataset (16 languages including C, Python, Java, Markdown, HTML, Shell,
|
189 |
</ul>
|
190 |
</li>
|
191 |
</ul>
|
@@ -196,7 +290,7 @@ def create_app():
|
|
196 |
gr.HTML('<div class="section-header">2. List of data sources</div>')
|
197 |
gr.HTML("""
|
198 |
<div style="padding: 15px; margin: 10px 0; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #667eea;">
|
199 |
-
<p style="margin: 0; font-size: 16px !important; color: #2c3e50;"><strong>TL;DR:</strong> ✅ Publicly available datasets
|
200 |
</div>
|
201 |
""")
|
202 |
with gr.Accordion("👇 Click for full information", open=False):
|
@@ -217,6 +311,8 @@ def create_app():
|
|
217 |
<li>FineWeb2: <a href="https://huggingface.co/datasets/epfml/FineWeb2-HQ" class="dataset-link">https://hf.co/datasets/epfml/FineWeb2-HQ</a></li>
|
218 |
<li>Stack V2: <a href="https://hf.co/datasets/bigcode/the-stack-v2" class="dataset-link">https://hf.co/datasets/bigcode/the-stack-v2</a></li>
|
219 |
<li>pes2o: <a href="https://hf.co/datasets/allenai/peS2o" class="dataset-link">https://hf.co/datasets/allenai/peS2o</a></li>
|
|
|
|
|
220 |
<li>SmolTalk2: <a href="https://huggingface.co/datasets/HuggingFaceTB/smoltalk2" class="dataset-link">https://hf.co/datasets/HuggingFaceTB/smoltalk2</a></li>
|
221 |
</ul>
|
222 |
</li>
|
@@ -284,8 +380,17 @@ def create_app():
|
|
284 |
<div class="subsection-header">2.5. Synthetic data</div>
|
285 |
<ul>
|
286 |
<li><strong>Was synthetic AI-generated data created by the provider or on their behalf to train the model?</strong>
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
</ul>
|
290 |
</div>
|
291 |
""")
|
@@ -329,7 +434,12 @@ def create_app():
|
|
329 |
<ul>
|
330 |
<li><strong>General description of measures taken:</strong>
|
331 |
<ul>
|
332 |
-
<li>
|
|
|
|
|
|
|
|
|
|
|
333 |
</ul>
|
334 |
</li>
|
335 |
</ul>
|
|
|
35 |
margin: 15px 0 10px 0;
|
36 |
font-weight: bold;
|
37 |
font-size: 1.1em !important;
|
38 |
+
color: #2c3e50;
|
39 |
}
|
40 |
.info-box {
|
41 |
background: #ffffff;
|
|
|
44 |
padding: 15px;
|
45 |
margin: 10px 0;
|
46 |
font-size: 16px !important;
|
47 |
+
color: #2c3e50;
|
48 |
}
|
49 |
.info-box p, .info-box li, .info-box ul {
|
50 |
font-size: 16px !important;
|
51 |
line-height: 1.6 !important;
|
52 |
+
color: #2c3e50;
|
53 |
}
|
54 |
.highlight {
|
55 |
background: #fff3cd;
|
|
|
85 |
strong {
|
86 |
font-size: inherit !important;
|
87 |
}
|
88 |
+
|
89 |
+
/* Dark mode adaptations */
|
90 |
+
@media (prefers-color-scheme: dark) {
|
91 |
+
.subsection-header {
|
92 |
+
background: #2d3748 !important;
|
93 |
+
color: #e2e8f0 !important;
|
94 |
+
}
|
95 |
+
.info-box {
|
96 |
+
background: #2d3748 !important;
|
97 |
+
border: 1px solid #4a5568 !important;
|
98 |
+
color: #e2e8f0 !important;
|
99 |
+
}
|
100 |
+
.info-box p, .info-box li, .info-box ul {
|
101 |
+
color: #e2e8f0 !important;
|
102 |
+
}
|
103 |
+
.highlight {
|
104 |
+
background: #553c9a !important;
|
105 |
+
border: 1px solid #667eea !important;
|
106 |
+
color: #e2e8f0 !important;
|
107 |
+
}
|
108 |
+
.dataset-link {
|
109 |
+
color: #90cdf4 !important;
|
110 |
+
}
|
111 |
+
.checkbox-yes {
|
112 |
+
color: #68d391 !important;
|
113 |
+
}
|
114 |
+
.checkbox-no {
|
115 |
+
color: #fc8181 !important;
|
116 |
+
}
|
117 |
+
.tldr-box {
|
118 |
+
background: linear-gradient(90deg, #2a365f 0%, #553c9a 100%) !important;
|
119 |
+
color: #e2e8f0 !important;
|
120 |
+
}
|
121 |
+
.version-box {
|
122 |
+
background: linear-gradient(90deg, #2a365f 0%, #553c9a 100%) !important;
|
123 |
+
color: #e2e8f0 !important;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Gradio dark mode detection - alternative approach */
|
128 |
+
.dark .subsection-header,
|
129 |
+
[data-theme="dark"] .subsection-header {
|
130 |
+
background: #2d3748 !important;
|
131 |
+
color: #e2e8f0 !important;
|
132 |
+
}
|
133 |
+
.dark .info-box,
|
134 |
+
[data-theme="dark"] .info-box {
|
135 |
+
background: #2d3748 !important;
|
136 |
+
border: 1px solid #4a5568 !important;
|
137 |
+
color: #e2e8f0 !important;
|
138 |
+
}
|
139 |
+
.dark .info-box p, .dark .info-box li, .dark .info-box ul,
|
140 |
+
[data-theme="dark"] .info-box p, [data-theme="dark"] .info-box li, [data-theme="dark"] .info-box ul {
|
141 |
+
color: #e2e8f0 !important;
|
142 |
+
}
|
143 |
+
.dark .highlight,
|
144 |
+
[data-theme="dark"] .highlight {
|
145 |
+
background: #553c9a !important;
|
146 |
+
border: 1px solid #667eea !important;
|
147 |
+
color: #e2e8f0 !important;
|
148 |
+
}
|
149 |
+
.dark .dataset-link,
|
150 |
+
[data-theme="dark"] .dataset-link {
|
151 |
+
color: #90cdf4 !important;
|
152 |
+
}
|
153 |
+
.dark .checkbox-yes,
|
154 |
+
[data-theme="dark"] .checkbox-yes {
|
155 |
+
color: #68d391 !important;
|
156 |
+
}
|
157 |
+
.dark .checkbox-no,
|
158 |
+
[data-theme="dark"] .checkbox-no {
|
159 |
+
color: #fc8181 !important;
|
160 |
+
}
|
161 |
+
.dark .tldr-box,
|
162 |
+
[data-theme="dark"] .tldr-box {
|
163 |
+
background: linear-gradient(90deg, #2a365f 0%, #553c9a 100%) !important;
|
164 |
+
color: #e2e8f0 !important;
|
165 |
+
}
|
166 |
+
.dark .version-box,
|
167 |
+
[data-theme="dark"] .version-box {
|
168 |
+
background: linear-gradient(90deg, #2a365f 0%, #553c9a 100%) !important;
|
169 |
+
color: #e2e8f0 !important;
|
170 |
+
}
|
171 |
"""
|
172 |
|
173 |
with gr.Blocks(css=custom_css, title="SmolLM3-3B EU Data Transparency") as app:
|
|
|
181 |
except:
|
182 |
gr.HTML('<div style="height: 120px;"></div>') # Placeholder if image not found
|
183 |
|
184 |
+
with gr.Column(scale=1.5):
|
185 |
+
gr.HTML("""
|
186 |
+
<div style="text-align: center; padding: 20px;">
|
187 |
+
<h1 style="color: #2c3e50; margin: 0; font-size: 2.25em !important;">SmolLM3-3B</h1>
|
188 |
+
<h2 style="color: #667eea; margin: 10px 0 0 0; font-size: 1.5em !important;">Public Summary of Training Content</h2>
|
189 |
+
<div class="version-box" style="margin-top: 15px; padding: 8px 16px; background: linear-gradient(90deg, #e3f2fd 0%, #f3e5f5 100%); border-radius: 20px; display: inline-block; font-size: 14px; color: #2c3e50; border-left: 3px solid #667eea;">
|
190 |
+
<a href="https://huggingface.co/spaces/hfmlsoc/smollm3-eu-data-transparency/commits/main" class="dataset-link" style="font-weight: bold; color: inherit;">Summary v1.0</a> - Last updated: 25/07/2025
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
""")
|
194 |
|
195 |
with gr.Column(scale=1):
|
196 |
try:
|
|
|
201 |
gr.HTML("""
|
202 |
<div style="text-align: center; margin-top: 40px; padding: 20px; background: #f8f9fa; border-radius: 10px;">
|
203 |
<p style="color: #6c757d; margin: 0;">
|
204 |
+
This Space contains the transparency report for the <a href="https://huggingface.co/HuggingFaceTB/SmolLM3-3B">SmolLM3-3B</a> GPAI model developed by <a href="https://huggingface.co/">Hugging Face</a> following the guidelines provided by the AI Office.<br/>
|
205 |
+
It may serve as an example for <strong>open-source GPAI trained exclusively on public datasets</strong>. For more information, see the <a href="https://digital-strategy.ec.europa.eu/en/library/explanatory-notice-and-template-public-summary-training-content-general-purpose-ai-models" class="dataset-link">Explanatory Notice and Template</a>
|
206 |
</p>
|
207 |
</div>
|
208 |
+
<div class="tldr-box" style="margin: 30px 0; padding: 20px; background: linear-gradient(90deg, #e3f2fd 0%, #f3e5f5 100%); border-radius: 10px; border-left: 5px solid #667eea; color: #2c3e50;">
|
209 |
+
<h3 style="color: inherit; margin-top: 0; font-size: 1.3em !important;"><strong>📋 TL;DR</strong></h3>
|
210 |
+
<p style="font-size: 16px !important; line-height: 1.6; margin: 10px 0; color: inherit;"><strong>SmolLM3-3B</strong> is a state-of-the-art 3-billion parameter language model by <strong>Hugging Face</strong> trained on <strong>10+ trillion tokens</strong> from publicly available datasets including web documents, scientific articles, and code.
|
211 |
+
Training focused on <strong>6 EU languages</strong> plus others. The model uses <strong>only public datasets</strong> (no commercial licensing, user data, or synthetic data).
|
212 |
+
Data processing was done by the original component dataset curators with <strong>varied approaches to TDM and filtering</strong> that typically include compliance with robots.txt and other opt-out mechanisms, and educational content classifiers.</p>
|
213 |
+
</div>
|
214 |
""")
|
215 |
|
216 |
# Section 1: General Information
|
|
|
229 |
<ul>
|
230 |
<li><strong>Provider name and contact details:</strong>
|
231 |
<ul>
|
232 |
+
<li>Hugging Face Inc., <a href="mailto:[email protected]" class="dataset-link">[email protected]</a></li>
|
233 |
+
</ul>
|
234 |
+
</li>
|
235 |
+
<li><strong>Authorised representative name and contact details:</strong>
|
236 |
+
<ul>
|
237 |
+
<li>Hugging Face SAS, <a href="mailto:[email protected]" class="dataset-link">[email protected]</a></li>
|
238 |
</ul>
|
239 |
</li>
|
240 |
</ul>
|
|
|
262 |
<ul>
|
263 |
<li><strong>TEXT</strong>
|
264 |
<ul>
|
265 |
+
<li><strong>Size:</strong> <strong>[more than 10 trillion tokens]</strong></li>
|
266 |
+
<ul><li>The training corpus is made up of 11 trillion tokens as tokenized by the <a href="https://huggingface.co/meta-llama/Llama-3.2-1B" class="dataset-link">Llama-3.2-1B</a> tokenizer.</li></ul>
|
267 |
<li>The training corpus for SmolLM3 is made up of several publicly accessible large datasets containing web documents, scientific articles, software code, and synthetically generated textbooks and mathematical data for pre-training in addition to several mid-training and fine-tuning datasets to enable chat interactions, instruction-following and task-solving behaviors.</li>
|
268 |
</ul>
|
269 |
</li>
|
|
|
274 |
</li>
|
275 |
<li><strong>Description of the linguistic characteristics of the overall training data:</strong>
|
276 |
<ul>
|
277 |
+
<li>The overall training process focuses on 6 languages that are all official EU languages: English, French, Spanish, German, Italian, and Portuguese. In addition, pre-training intentionally included smaller quantities of data in Mandarin Chinese, Russian, Persian, Japanese, Korean, Vietnamese, Hindi, Thai, and Greek (also an official EU language). Other languages may have been included due to the limitations of automatic language identification in filtering stages.</li>
|
278 |
</ul>
|
279 |
</li>
|
280 |
<li><strong>Other relevant characteristics of the overall training data:</strong>
|
281 |
<ul>
|
282 |
+
<li>The training data also includes software code in the programming languages included in the Stack v2 dataset (16 languages including C, C++, C-Sharp, Python, Java, JavaScript, Markdown, HTML, Shell, PHP, TypeScript, Swift, SQL, Ruby, Go, and Rust).</li>
|
283 |
</ul>
|
284 |
</li>
|
285 |
</ul>
|
|
|
290 |
gr.HTML('<div class="section-header">2. List of data sources</div>')
|
291 |
gr.HTML("""
|
292 |
<div style="padding: 15px; margin: 10px 0; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #667eea;">
|
293 |
+
<p style="margin: 0; font-size: 16px !important; color: #2c3e50;"><strong>TL;DR:</strong> ✅ Publicly available datasets including synthetic data | ❌ No commercial licensing, crawling, user data, or private data</p>
|
294 |
</div>
|
295 |
""")
|
296 |
with gr.Accordion("👇 Click for full information", open=False):
|
|
|
311 |
<li>FineWeb2: <a href="https://huggingface.co/datasets/epfml/FineWeb2-HQ" class="dataset-link">https://hf.co/datasets/epfml/FineWeb2-HQ</a></li>
|
312 |
<li>Stack V2: <a href="https://hf.co/datasets/bigcode/the-stack-v2" class="dataset-link">https://hf.co/datasets/bigcode/the-stack-v2</a></li>
|
313 |
<li>pes2o: <a href="https://hf.co/datasets/allenai/peS2o" class="dataset-link">https://hf.co/datasets/allenai/peS2o</a></li>
|
314 |
+
<li>FineMath : <a href="https://hf.co/datasets/HuggingFaceTB/finemath" class="dataset-link">https://hf.co/datasets/HuggingFaceTB/finemath</a></li>
|
315 |
+
<li>MegaMath: <a href="https://hf.co/datasets/LLM360/MegaMath" class="dataset-link">https://hf.co/datasets/LLM360/MegaMath</a></li>
|
316 |
<li>SmolTalk2: <a href="https://huggingface.co/datasets/HuggingFaceTB/smoltalk2" class="dataset-link">https://hf.co/datasets/HuggingFaceTB/smoltalk2</a></li>
|
317 |
</ul>
|
318 |
</li>
|
|
|
380 |
<div class="subsection-header">2.5. Synthetic data</div>
|
381 |
<ul>
|
382 |
<li><strong>Was synthetic AI-generated data created by the provider or on their behalf to train the model?</strong>
|
383 |
+
<ul><li><strong><span class="checkbox-yes">☑ Yes</span></strong></li></ul>
|
384 |
+
</li>
|
385 |
+
<li><strong>If yes, modality of the synthetic data:</strong>
|
386 |
+
<ul><li><strong><span class="checkbox-yes">☑ Text</span></strong></li></ul>
|
387 |
+
</li>
|
388 |
+
<li><strong>Information about other AI models, including provider’s own AI model(s) not available on the market, used to generate synthetic data to train the model to which this Summary applies:</strong>
|
389 |
+
<ul><li>Additional data was generated using the <a href="https://huggingface.co/Qwen/Qwen3-32B" class="dataset-link">Qwen3-32B</a> and <a href="https://huggingface.co/Qwen/Qwen3-Embedding-0.6B" class="dataset-link">Qwen3-0.6B</a> open-weight models.</li></ul>
|
390 |
+
</li>
|
391 |
+
<li><strong>Additional comments (optional):</strong>
|
392 |
+
<ul><li>Some parts of the <a href="https://hf.co/datasets/HuggingFaceTB/smoltalk2" class="dataset-link">SmolTalk2</a> dataset mentioned in Section 2.1 were synthetically generated for the purpose of training this model. See <a href="https://huggingface.co/datasets/HuggingFaceTB/smoltalk2#license" class="dataset-link">License information in the dataset description</a>.</li></ul>
|
393 |
+
</li>
|
394 |
</ul>
|
395 |
</div>
|
396 |
""")
|
|
|
434 |
<ul>
|
435 |
<li><strong>General description of measures taken:</strong>
|
436 |
<ul>
|
437 |
+
<li>
|
438 |
+
Each of the component datasets leveraged is the product of a distinct curation effort by its custodians to select the most desirable content.
|
439 |
+
The specific approaches can typically be found in the dataset documentation.
|
440 |
+
Among other factors, most of the datasets take the approach of using classifiers to identify "highly educational" samples that lowers the likelihood of illegal content.
|
441 |
+
Datasets like The Stack v2 for example additionally filtered out software code with copyleft licenses and applied automatic redaction of categories of personal data.
|
442 |
+
</li>
|
443 |
</ul>
|
444 |
</li>
|
445 |
</ul>
|