import gradio as gr
import os
def create_app():
# Custom CSS for better styling
custom_css = """
/* Global font size increase */
.gradio-container, .gradio-container * {
font-size: 16px !important;
}
.main-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
font-size: 16px;
}
.banner-container {
text-align: center;
margin-bottom: 30px;
}
.section-header {
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 15px;
border-radius: 10px;
margin: 20px 0 10px 0;
font-weight: bold;
font-size: 1.4em !important;
}
.subsection-header {
background: #f8f9fa;
padding: 10px;
border-left: 4px solid #667eea;
margin: 15px 0 10px 0;
font-weight: bold;
font-size: 1.1em !important;
}
.info-box {
background: #ffffff;
border: 1px solid #e9ecef;
border-radius: 8px;
padding: 15px;
margin: 10px 0;
font-size: 16px !important;
}
.info-box p, .info-box li, .info-box ul {
font-size: 16px !important;
line-height: 1.6 !important;
}
.highlight {
background: #fff3cd;
border: 1px solid #ffeaa7;
border-radius: 5px;
padding: 10px;
margin: 5px 0;
font-size: 16px !important;
}
.dataset-link {
color: #667eea;
text-decoration: none;
font-weight: 500;
font-size: 16px !important;
}
.dataset-link:hover {
text-decoration: underline;
}
.checkbox-yes {
color: #28a745;
font-weight: bold;
font-size: 16px !important;
}
.checkbox-no {
color: #dc3545;
font-weight: bold;
font-size: 16px !important;
}
/* Ensure all text elements have larger font */
h1, h2, h3, h4, h5, h6 {
font-size: 1.2em !important;
}
strong {
font-size: inherit !important;
}
"""
with gr.Blocks(css=custom_css, title="SmolLM3-3B EU Data Transparency") as app:
# Banner section with images
with gr.Row():
with gr.Column(scale=2):
try:
gr.Image("eu_flag.png", height=180, show_label=False, show_download_button=False, interactive=False, container=False)
except:
gr.HTML('
') # Placeholder if image not found
with gr.Column(scale=1.5):
gr.HTML("""
SmolLM3-3B
Public Summary of Training Content
""")
with gr.Column(scale=2):
try:
gr.Image("banner.png", height=180, show_label=False, show_download_button=False, interactive=False, container=False)
except:
gr.HTML('') # Placeholder if image not found
gr.HTML("""
""")
with gr.Column(elem_classes=["main-container"]):
# Section 1: General Information
gr.HTML('')
with gr.Row():
with gr.Column():
gr.HTML("""
- Provider name and contact details:
""")
with gr.Column():
gr.HTML("""
- Versioned model name(s):
- Model dependencies:
""")
gr.HTML("""
- TEXT
- Size: more than 10 trillion tokens
- 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.
- Latest date of data acquisition/collection for model training:
- 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)
- Description of the linguistic characteristics of the overall training data:
- 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.
- Other relevant characteristics of the overall training data:
- 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.).
""")
# Section 2: Data Sources
gr.HTML('')
gr.HTML("""
- Have you used publicly available datasets to train the model?
- If yes, specify the modality(ies) of the content covered by the datasets concerned:
- List of large publicly available datasets:
- General description of other publicly available datasets not listed above:
- 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: https://hf.co/collections/HuggingFaceTB/smollm3-pretraining-datasets-685a7353fdc01aecde51b1d9
""")
gr.HTML("""
2.2.1. Datasets commercially licensed by rightsholders or their representatives
- Have you concluded transactional commercial licensing agreement(s) with rightsholder(s) or with their representatives?
2.2.2. Private datasets obtained from other third parties
- 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?
""")
with gr.Row():
with gr.Column():
gr.HTML("""
- Were crawlers used by the provider or on behalf of?
""")
with gr.Column():
gr.HTML("""
- Was data from user interactions with the AI model (e.g. user input and prompts) used to train the model?
- Was data collected from user interactions with the provider's other services or products used to train the model?
""")
with gr.Row():
with gr.Column():
gr.HTML("""
- Was synthetic AI-generated data created by the provider or on their behalf to train the model?
""")
with gr.Column():
gr.HTML("""
- Have data sources other than those described in Sections 2.1 to 2.5 been used to train the model?
""")
# Section 3: Data Processing
gr.HTML('')
gr.HTML("""
- 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:
- 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.
""")
gr.HTML("""
- General description of measures taken:
- 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.
""")
return app
# Create the demo instance directly for Gradio auto-reload
demo = create_app()
if __name__ == "__main__":
demo.launch(share=True, show_error=True)