File size: 1,796 Bytes
5fe83da
 
 
 
 
 
 
 
58a74d2
5fe83da
0de9de2
 
 
 
 
 
 
 
 
 
 
 
 
58a74d2
 
0de9de2
 
 
 
 
5fe83da
 
 
 
 
58a74d2
0de9de2
5fe83da
 
 
 
58a74d2
5fe83da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
Configuration package for SmolLM3 training
"""

from .train_smollm3 import SmolLM3Config, get_config as get_base_config
from .train_smollm3_openhermes_fr import SmolLM3ConfigOpenHermesFR, get_config as get_openhermes_fr_config
from .train_smollm3_openhermes_fr_a100_large import SmolLM3ConfigOpenHermesFRA100Large, get_config as get_a100_large_config
from .train_smollm3_openhermes_fr_a100_multiple_passes import SmolLM3ConfigOpenHermesFRMultiplePasses, get_config as get_multiple_passes_config
from .train_smollm3_openhermes_fr_a100_max_performance import SmolLM3ConfigOpenHermesFRMaxPerformance, get_config as get_max_performance_config

# Generic get_config function that can handle different config types
def get_config(config_path: str):
    """Generic get_config function that tries different config types"""
    import os
    
    if not os.path.exists(config_path):
        return get_base_config(config_path)
    
    # Try to determine config type based on filename
    if "a100_large" in config_path:
        return get_a100_large_config(config_path)
    elif "a100_multiple_passes" in config_path:
        return get_multiple_passes_config(config_path)
    elif "a100_max_performance" in config_path:
        return get_max_performance_config(config_path)
    elif "openhermes_fr" in config_path:
        return get_openhermes_fr_config(config_path)
    else:
        return get_base_config(config_path)

__all__ = [
    'SmolLM3Config',
    'SmolLM3ConfigOpenHermesFR', 
    'SmolLM3ConfigOpenHermesFRA100Large',
    'SmolLM3ConfigOpenHermesFRMultiplePasses',
    'SmolLM3ConfigOpenHermesFRMaxPerformance',
    'get_config',
    'get_base_config',
    'get_openhermes_fr_config',
    'get_a100_large_config',
    'get_multiple_passes_config',
    'get_max_performance_config',
]