Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,34 +1,34 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
"""
|
| 3 |
-
HF Space runner for Wave Tank Surgeon.
|
| 4 |
-
Entry point that executes the wave tank surgeon on DeepSeek-V4-Pro.
|
| 5 |
-
"""
|
| 6 |
-
|
| 7 |
-
import subprocess
|
| 8 |
-
import sys
|
| 9 |
-
import os
|
| 10 |
-
|
| 11 |
-
def main():
|
| 12 |
-
# Ensure HF token is available
|
| 13 |
-
if not os.getenv('HF_TOKEN'):
|
| 14 |
-
raise ValueError("HF_TOKEN environment variable not set")
|
| 15 |
-
|
| 16 |
-
# Run the wave tank surgeon
|
| 17 |
-
cmd = [
|
| 18 |
-
sys.executable,
|
| 19 |
-
'wave_tank_surgeon.py',
|
| 20 |
-
'--model', 'deepseek-ai/DeepSeek-V4-Pro',
|
| 21 |
-
'--ffn-grid', '16,32,64',
|
| 22 |
-
'--attn-grid', '8,16,32',
|
| 23 |
-
'--steps', '
|
| 24 |
-
'--lr', '0.001',
|
| 25 |
-
'--device', 'cuda:0',
|
| 26 |
-
'--dtype', 'float16',
|
| 27 |
-
'--push-to-hub', 'Jibbalit/DeepSeek-V4-Pro-WaveTank',
|
| 28 |
-
]
|
| 29 |
-
|
| 30 |
-
result = subprocess.run(cmd, check=True)
|
| 31 |
-
return result.returncode
|
| 32 |
-
|
| 33 |
-
if __name__ == '__main__':
|
| 34 |
-
sys.exit(main())
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
HF Space runner for Wave Tank Surgeon.
|
| 4 |
+
Entry point that executes the wave tank surgeon on DeepSeek-V4-Pro.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
import subprocess
|
| 8 |
+
import sys
|
| 9 |
+
import os
|
| 10 |
+
|
| 11 |
+
def main():
|
| 12 |
+
# Ensure HF token is available
|
| 13 |
+
if not os.getenv('HF_TOKEN'):
|
| 14 |
+
raise ValueError("HF_TOKEN environment variable not set")
|
| 15 |
+
|
| 16 |
+
# Run the wave tank surgeon
|
| 17 |
+
cmd = [
|
| 18 |
+
sys.executable,
|
| 19 |
+
'wave_tank_surgeon.py',
|
| 20 |
+
'--model', 'deepseek-ai/DeepSeek-V4-Pro',
|
| 21 |
+
'--ffn-grid', '16,32,64',
|
| 22 |
+
'--attn-grid', '8,16,32',
|
| 23 |
+
'--steps', '10000',
|
| 24 |
+
'--lr', '0.001',
|
| 25 |
+
'--device', 'cuda:0',
|
| 26 |
+
'--dtype', 'float16',
|
| 27 |
+
'--push-to-hub', 'Jibbalit/DeepSeek-V4-Pro-WaveTank',
|
| 28 |
+
]
|
| 29 |
+
|
| 30 |
+
result = subprocess.run(cmd, check=True)
|
| 31 |
+
return result.returncode
|
| 32 |
+
|
| 33 |
+
if __name__ == '__main__':
|
| 34 |
+
sys.exit(main())
|