Download training_scripts/phase0_check.py from prometheus04/qwen3-4b-code-finetuned: direct link, hf CLI and curl.
- Browser
- Download file 778 Bytes
-
https://huggingface.co/prometheus04/qwen3-4b-code-finetuned/resolve/main/training_scripts/phase0_check.py
- Command line
-
hf download hf://prometheus04/qwen3-4b-code-finetuned/training_scripts/phase0_check.py
-
curl -L -o phase0_check.py https://huggingface.co/prometheus04/qwen3-4b-code-finetuned/resolve/main/training_scripts/phase0_check.py
778 Bytes
| #!/usr/bin/env python3 | |
| """Phase 0: Quick environment check""" | |
| import torch | |
| print("="*70) | |
| print("PHASE 0: Environment Check") | |
| print("="*70) | |
| # GPU | |
| if torch.cuda.is_available(): | |
| print(f"\n✓ GPU: {torch.cuda.get_device_name(0)}") | |
| print(f"✓ Memory: {torch.cuda.get_device_properties(0).total_memory/1e9:.1f} GB") | |
| else: | |
| print("\n❌ No GPU detected") | |
| exit(1) | |
| # Packages | |
| packages = ["transformers", "peft", "datasets", "trl", "vllm"] | |
| missing = [] | |
| for pkg in packages: | |
| try: | |
| __import__(pkg) | |
| print(f"✓ {pkg}") | |
| except: | |
| missing.append(pkg) | |
| print(f"❌ {pkg}") | |
| if missing: | |
| print(f"\n Install: pip install {' '.join(missing)}") | |
| exit(1) | |
| print("\n✓ Ready to proceed") | |
| print("\n➡️ Next: python phase1_data.py") | |