Upload 3 files
Browse files- .gitattributes +2 -0
- app.py +324 -0
- banner.png +3 -0
- eu_flag.png +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
banner.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
eu_flag.png filter=lfs diff=lfs merge=lfs -text
|
app.py
ADDED
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
|
4 |
+
def create_app():
|
5 |
+
# Custom CSS for better styling
|
6 |
+
custom_css = """
|
7 |
+
/* Global font size increase */
|
8 |
+
.gradio-container, .gradio-container * {
|
9 |
+
font-size: 16px !important;
|
10 |
+
}
|
11 |
+
|
12 |
+
.main-container {
|
13 |
+
max-width: 1200px;
|
14 |
+
margin: 0 auto;
|
15 |
+
padding: 20px;
|
16 |
+
font-size: 16px;
|
17 |
+
}
|
18 |
+
.banner-container {
|
19 |
+
text-align: center;
|
20 |
+
margin-bottom: 30px;
|
21 |
+
}
|
22 |
+
.section-header {
|
23 |
+
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
24 |
+
color: white;
|
25 |
+
padding: 15px;
|
26 |
+
border-radius: 10px;
|
27 |
+
margin: 20px 0 10px 0;
|
28 |
+
font-weight: bold;
|
29 |
+
font-size: 1.4em !important;
|
30 |
+
}
|
31 |
+
.subsection-header {
|
32 |
+
background: #f8f9fa;
|
33 |
+
padding: 10px;
|
34 |
+
border-left: 4px solid #667eea;
|
35 |
+
margin: 15px 0 10px 0;
|
36 |
+
font-weight: bold;
|
37 |
+
font-size: 1.1em !important;
|
38 |
+
}
|
39 |
+
.info-box {
|
40 |
+
background: #ffffff;
|
41 |
+
border: 1px solid #e9ecef;
|
42 |
+
border-radius: 8px;
|
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;
|
53 |
+
border: 1px solid #ffeaa7;
|
54 |
+
border-radius: 5px;
|
55 |
+
padding: 10px;
|
56 |
+
margin: 5px 0;
|
57 |
+
font-size: 16px !important;
|
58 |
+
}
|
59 |
+
.dataset-link {
|
60 |
+
color: #667eea;
|
61 |
+
text-decoration: none;
|
62 |
+
font-weight: 500;
|
63 |
+
font-size: 16px !important;
|
64 |
+
}
|
65 |
+
.dataset-link:hover {
|
66 |
+
text-decoration: underline;
|
67 |
+
}
|
68 |
+
.checkbox-yes {
|
69 |
+
color: #28a745;
|
70 |
+
font-weight: bold;
|
71 |
+
font-size: 16px !important;
|
72 |
+
}
|
73 |
+
.checkbox-no {
|
74 |
+
color: #dc3545;
|
75 |
+
font-weight: bold;
|
76 |
+
font-size: 16px !important;
|
77 |
+
}
|
78 |
+
/* Ensure all text elements have larger font */
|
79 |
+
h1, h2, h3, h4, h5, h6 {
|
80 |
+
font-size: 1.2em !important;
|
81 |
+
}
|
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:
|
88 |
+
# Banner section with images
|
89 |
+
with gr.Row():
|
90 |
+
with gr.Column(scale=2):
|
91 |
+
try:
|
92 |
+
gr.Image("eu_flag.png", height=180, show_label=False, show_download_button=False, interactive=False, container=False)
|
93 |
+
except:
|
94 |
+
gr.HTML('<div style="height: 120px;"></div>') # Placeholder if image not found
|
95 |
+
|
96 |
+
with gr.Column(scale=1.5):
|
97 |
+
gr.HTML("""
|
98 |
+
<div style="text-align: center; padding: 20px;">
|
99 |
+
<h1 style="color: #2c3e50; margin: 0; font-size: 3em !important;">SmolLM3-3B</h1>
|
100 |
+
<h2 style="color: #667eea; margin: 10px 0 0 0; font-size: 1.5em !important;">Public Summary of Training Content</h2>
|
101 |
+
</div>
|
102 |
+
""")
|
103 |
+
|
104 |
+
with gr.Column(scale=2):
|
105 |
+
try:
|
106 |
+
gr.Image("banner.png", height=180, show_label=False, show_download_button=False, interactive=False, container=False)
|
107 |
+
except:
|
108 |
+
gr.HTML('<div style="height: 120px;"></div>') # Placeholder if image not found
|
109 |
+
|
110 |
+
with gr.Column(elem_classes=["main-container"]):
|
111 |
+
# Section 1: General Information
|
112 |
+
gr.HTML('<div class="section-header">1. General information</div>')
|
113 |
+
|
114 |
+
with gr.Row():
|
115 |
+
with gr.Column():
|
116 |
+
gr.HTML("""
|
117 |
+
<div class="info-box">
|
118 |
+
<div class="subsection-header">1.1. Provider identification</div>
|
119 |
+
<ul>
|
120 |
+
<li><strong>Provider name and contact details:</strong>
|
121 |
+
<ul>
|
122 |
+
<li><strong>Hugging Face</strong></li>
|
123 |
+
<li><strong>Website: <a href="https://huggingface.co" class="dataset-link">https://huggingface.co</a></strong></li>
|
124 |
+
</ul>
|
125 |
+
</li>
|
126 |
+
</ul>
|
127 |
+
</div>
|
128 |
+
""")
|
129 |
+
|
130 |
+
with gr.Column():
|
131 |
+
gr.HTML("""
|
132 |
+
<div class="info-box">
|
133 |
+
<div class="subsection-header">1.2. Model identification</div>
|
134 |
+
<ul>
|
135 |
+
<li><strong>Versioned model name(s):</strong>
|
136 |
+
<ul><li><strong>SmolLM3-3B</strong></li></ul>
|
137 |
+
</li>
|
138 |
+
<li><strong>Model dependencies:</strong>
|
139 |
+
<ul><li><strong>None</strong></li></ul>
|
140 |
+
</li>
|
141 |
+
</ul>
|
142 |
+
</div>
|
143 |
+
""")
|
144 |
+
|
145 |
+
gr.HTML("""
|
146 |
+
<div class="info-box">
|
147 |
+
<div class="subsection-header">1.3. Modalities, overall training data size and other characteristics</div>
|
148 |
+
<ul>
|
149 |
+
<li><strong>TEXT</strong>
|
150 |
+
<ul>
|
151 |
+
<li><strong>Size:</strong> <strong>more than 10 trillion tokens</strong></li>
|
152 |
+
<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>
|
153 |
+
</ul>
|
154 |
+
</li>
|
155 |
+
<li><strong>Latest date of data acquisition/collection for model training:</strong>
|
156 |
+
<ul>
|
157 |
+
<li>The training dataset is made up of different subsets with different publication and cutoff dates. For pre-training, the earliest dataset was last updated on 4/3/2024 (Stack v2), and the latest on 2/19/2025 (FineWeb2-HQ)</li>
|
158 |
+
</ul>
|
159 |
+
</li>
|
160 |
+
<li><strong>Description of the linguistic characteristics of the overall training data:</strong>
|
161 |
+
<ul>
|
162 |
+
<li>The overall training process focuses on 6 languages that are all Union 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. Other languages may have been included due to the limitations of automatic language identification in filtering stages.</li>
|
163 |
+
</ul>
|
164 |
+
</li>
|
165 |
+
<li><strong>Other relevant characteristics of the overall training data:</strong>
|
166 |
+
<ul>
|
167 |
+
<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, etc.).</li>
|
168 |
+
</ul>
|
169 |
+
</li>
|
170 |
+
</ul>
|
171 |
+
</div>
|
172 |
+
""")
|
173 |
+
|
174 |
+
# Section 2: Data Sources
|
175 |
+
gr.HTML('<div class="section-header">2. List of data sources</div>')
|
176 |
+
|
177 |
+
gr.HTML("""
|
178 |
+
<div class="info-box">
|
179 |
+
<div class="subsection-header">2.1. Publicly available datasets</div>
|
180 |
+
<ul>
|
181 |
+
<li><strong>Have you used publicly available datasets to train the model?</strong>
|
182 |
+
<ul><li><strong><span class="checkbox-yes">β Yes</span></strong></li></ul>
|
183 |
+
</li>
|
184 |
+
<li><strong>If yes, specify the modality(ies) of the content covered by the datasets concerned:</strong>
|
185 |
+
<ul><li><strong><span class="checkbox-yes">β Text</span></strong></li></ul>
|
186 |
+
</li>
|
187 |
+
<li><strong>List of large publicly available datasets:</strong>
|
188 |
+
<ul>
|
189 |
+
<li>DCLM: <a href="https://hf.co/datasets/mlfoundations/dclm-baseline-1.0" class="dataset-link">https://hf.co/datasets/mlfoundations/dclm-baseline-1.0</a></li>
|
190 |
+
<li>FineWeb-Edu: <a href="https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu" class="dataset-link">https://hf.co/datasets/HuggingFaceFW/fineweb-edu</a></li>
|
191 |
+
<li>FineWeb2: <a href="https://huggingface.co/datasets/epfml/FineWeb2-HQ" class="dataset-link">https://hf.co/datasets/epfml/FineWeb2-HQ</a></li>
|
192 |
+
<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>
|
193 |
+
<li>pes2o: <a href="https://hf.co/datasets/allenai/peS2o" class="dataset-link">https://hf.co/datasets/allenai/peS2o</a></li>
|
194 |
+
<li>SmolTalk2: <a href="https://huggingface.co/datasets/HuggingFaceTB/smoltalk2" class="dataset-link">https://hf.co/datasets/HuggingFaceTB/smoltalk2</a></li>
|
195 |
+
</ul>
|
196 |
+
</li>
|
197 |
+
<li><strong>General description of other publicly available datasets not listed above:</strong>
|
198 |
+
<ul>
|
199 |
+
<li>In addition to the large datasets cited above, many additional publicly available datasets were added to target specific domains, including several math datasets made up of both web-filtered and synthetic data, Wikipedia data, "reasoning data" generated by selected large models on diverse problems, Jupyter notebooks for code, and synthetically generated textbooks; all in English language or software code. The full list of pre-training datasets is available at the following URL: <a href="https://hf.co/collections/HuggingFaceTB/smollm3-pretraining-datasets-685a7353fdc01aecde51b1d9" class="dataset-link">https://hf.co/collections/HuggingFaceTB/smollm3-pretraining-datasets-685a7353fdc01aecde51b1d9</a></li>
|
200 |
+
</ul>
|
201 |
+
</li>
|
202 |
+
</ul>
|
203 |
+
</div>
|
204 |
+
""")
|
205 |
+
|
206 |
+
gr.HTML("""
|
207 |
+
<div class="info-box">
|
208 |
+
<div class="subsection-header">2.2. Private non-publicly available datasets obtained from third parties</div>
|
209 |
+
|
210 |
+
<h4>2.2.1. Datasets commercially licensed by rightsholders or their representatives</h4>
|
211 |
+
<ul>
|
212 |
+
<li><strong>Have you concluded transactional commercial licensing agreement(s) with rightsholder(s) or with their representatives?</strong>
|
213 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
214 |
+
</li>
|
215 |
+
</ul>
|
216 |
+
|
217 |
+
<h4>2.2.2. Private datasets obtained from other third parties</h4>
|
218 |
+
<ul>
|
219 |
+
<li><strong>Have you obtained private datasets from third parties that are not licensed as described in Section 2.2.1, such as data obtained from providers of private databases, or data intermediaries?</strong>
|
220 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
221 |
+
</li>
|
222 |
+
</ul>
|
223 |
+
</div>
|
224 |
+
""")
|
225 |
+
|
226 |
+
with gr.Row():
|
227 |
+
with gr.Column():
|
228 |
+
gr.HTML("""
|
229 |
+
<div class="info-box">
|
230 |
+
<div class="subsection-header">2.3. Data crawled and scraped from online sources</div>
|
231 |
+
<ul>
|
232 |
+
<li><strong>Were crawlers used by the provider or on behalf of?</strong>
|
233 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
234 |
+
</li>
|
235 |
+
</ul>
|
236 |
+
</div>
|
237 |
+
""")
|
238 |
+
|
239 |
+
with gr.Column():
|
240 |
+
gr.HTML("""
|
241 |
+
<div class="info-box">
|
242 |
+
<div class="subsection-header">2.4. User data</div>
|
243 |
+
<ul>
|
244 |
+
<li><strong>Was data from user interactions with the AI model (e.g. user input and prompts) used to train the model?</strong>
|
245 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
246 |
+
</li>
|
247 |
+
<li><strong>Was data collected from user interactions with the provider's other services or products used to train the model?</strong>
|
248 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
249 |
+
</li>
|
250 |
+
</ul>
|
251 |
+
</div>
|
252 |
+
""")
|
253 |
+
|
254 |
+
with gr.Row():
|
255 |
+
with gr.Column():
|
256 |
+
gr.HTML("""
|
257 |
+
<div class="info-box">
|
258 |
+
<div class="subsection-header">2.5. Synthetic data</div>
|
259 |
+
<ul>
|
260 |
+
<li><strong>Was synthetic AI-generated data created by the provider or on their behalf to train the model?</strong>
|
261 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
262 |
+
</li>
|
263 |
+
</ul>
|
264 |
+
</div>
|
265 |
+
""")
|
266 |
+
|
267 |
+
with gr.Column():
|
268 |
+
gr.HTML("""
|
269 |
+
<div class="info-box">
|
270 |
+
<div class="subsection-header">2.6. Other sources of data</div>
|
271 |
+
<ul>
|
272 |
+
<li><strong>Have data sources other than those described in Sections 2.1 to 2.5 been used to train the model?</strong>
|
273 |
+
<ul><li><strong><span class="checkbox-no">β No</span></strong></li></ul>
|
274 |
+
</li>
|
275 |
+
</ul>
|
276 |
+
</div>
|
277 |
+
""")
|
278 |
+
|
279 |
+
# Section 3: Data Processing
|
280 |
+
gr.HTML('<div class="section-header">3. Data processing aspects</div>')
|
281 |
+
|
282 |
+
gr.HTML("""
|
283 |
+
<div class="info-box">
|
284 |
+
<div class="subsection-header">3.1. Respect of reservation of rights from text and data mining exception or limitation</div>
|
285 |
+
<ul>
|
286 |
+
<li><strong>Describe the measures implemented before model training to respect reservations of rights from the TDM exception or limitation before and during data collection, including the opt-out protocols and solutions honoured by the provider or, as applicable, by third parties from which datasets have been obtained:</strong>
|
287 |
+
<ul>
|
288 |
+
<li>The training corpus for SmolLM3-3B is made up of diverse pre-existing public datasets maintained by various organizations who still have their own approach to managing the TDM exception. All crawl-based data in the datasets uses the CommonCrawl archives which comply with robots.txt. Some datasets such as the Stack v2 additionally offer general opt-out mechanisms. For each dataset, the latest publicly available version was used to ensure propagation of any rights reservation expressed to the dataset custodian.</li>
|
289 |
+
</ul>
|
290 |
+
</li>
|
291 |
+
</ul>
|
292 |
+
</div>
|
293 |
+
""")
|
294 |
+
|
295 |
+
gr.HTML("""
|
296 |
+
<div class="info-box">
|
297 |
+
<div class="subsection-header">3.2. Removal of illegal content</div>
|
298 |
+
<ul>
|
299 |
+
<li><strong>General description of measures taken:</strong>
|
300 |
+
<ul>
|
301 |
+
<li>Each of the component datasets leveraged is the product of a distinct curation effort by its custodians to select the most desirable content. The specific approaches can typically be found in the dataset documentation. 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.</li>
|
302 |
+
</ul>
|
303 |
+
</li>
|
304 |
+
</ul>
|
305 |
+
</div>
|
306 |
+
""")
|
307 |
+
|
308 |
+
# Footer
|
309 |
+
gr.HTML("""
|
310 |
+
<div style="text-align: center; margin-top: 40px; padding: 20px; background: #f8f9fa; border-radius: 10px;">
|
311 |
+
<p style="color: #6c757d; margin: 0;">
|
312 |
+
This transparency report follows the guidelines provided by the AI Office.<br/>
|
313 |
+
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>
|
314 |
+
</p>
|
315 |
+
</div>
|
316 |
+
""")
|
317 |
+
|
318 |
+
return app
|
319 |
+
|
320 |
+
# Create the demo instance directly for Gradio auto-reload
|
321 |
+
demo = create_app()
|
322 |
+
|
323 |
+
if __name__ == "__main__":
|
324 |
+
demo.launch(share=True, show_error=True)
|
banner.png
ADDED
![]() |
Git LFS Details
|
eu_flag.png
ADDED
![]() |
Git LFS Details
|