Spaces:
Running
Running
File size: 1,991 Bytes
6c63876 |
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
#!/usr/bin/env python3
"""
Quick test to verify the training configuration fix
"""
import os
import sys
# Add project root to path
project_root = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, project_root)
def test_configuration():
"""Test the H100 lightweight configuration"""
print("Testing H100 Lightweight Configuration...")
try:
from config.train_smollm3_h100_lightweight import SmolLM3ConfigH100Lightweight
config = SmolLM3ConfigH100Lightweight()
print("β
Configuration loaded successfully")
print(f" Model: {config.model_name}")
print(f" Batch size: {config.batch_size}")
print(f" Learning rate: {config.learning_rate}")
print(f" FP16: {config.fp16}")
print(f" BF16: {config.bf16}")
print(f" Mixed precision: {'fp16' if config.fp16 else 'bf16'}")
print(f" Sample size: {config.sample_size}")
# Test training arguments creation
from src.model import SmolLM3Model
# Create a minimal model instance for testing
model = SmolLM3Model(
model_name="HuggingFaceTB/SmolLM3-3B",
max_seq_length=4096,
config=config
)
# Test training arguments
training_args = model.get_training_arguments("/tmp/test")
print(f"β
Training arguments created successfully")
print(f" Training args FP16: {training_args.fp16}")
print(f" Training args BF16: {training_args.bf16}")
return True
except Exception as e:
print(f"β Error: {e}")
import traceback
traceback.print_exc()
return False
if __name__ == "__main__":
success = test_configuration()
if success:
print("\nπ Configuration test passed!")
print("You can now run the training with: ./launch.sh")
else:
print("\nβ Configuration test failed!")
sys.exit(1) |