Spaces:
Paused
Paused
AdriBat1
Add Deep-NanoGPT experiment (Phase 1 & 2): resumable training, inference, 72-layer models
671ce97
| import os | |
| import sys | |
| from antigravity_sdk.client import RemoteGPU | |
| # Config | |
| SCRIPT_PATH = "examples/deep_nanogpt.py" | |
| def main(): | |
| if not os.path.exists(SCRIPT_PATH): | |
| print(f"β Script not found: {SCRIPT_PATH}") | |
| sys.exit(1) | |
| with open(SCRIPT_PATH, 'r') as f: | |
| code = f.read() | |
| print(f"π Launching Deep-NanoGPT Experiment ({len(code)} bytes)...") | |
| gpu = RemoteGPU() | |
| # Run synchronously (blocking) as streaming is disabled | |
| result = gpu.run(code, download_files=False) | |
| print("\n" + "="*50) | |
| print("OUTPUT REMOTO:") | |
| print("="*50) | |
| print(result.output) | |
| # Check for downloaded files | |
| if os.path.exists("comparison_loss.png"): | |
| print("\nβ Grafico salvato: comparison_loss.png") | |
| if os.path.exists("generation_sample.txt"): | |
| print("β Sample salvato: generation_sample.txt") | |
| if __name__ == "__main__": | |
| main() | |