Jibbalit's picture
Update app.py
2008e1a verified
Raw History Blame Contribute Delete
874 Bytes
#!/usr/bin/env python3
"""
HF Space runner for Wave Tank Surgeon.
Entry point that executes the wave tank surgeon on DeepSeek-V4-Pro.
"""
import subprocess
import sys
import os
def main():
# Ensure HF token is available
if not os.getenv('HF_TOKEN'):
raise ValueError("HF_TOKEN environment variable not set")
# Run the wave tank surgeon
cmd = [
sys.executable,
'wave_tank_surgeon.py',
'--model', 'huihui-ai/Llama-3.3-70B-Instruct-abliterated-finetuned',
'--ffn-grid', '16',
'--attn-grid', '16',
'--steps', '10000',
'--lr', '0.001',
'--device', 'cuda:0',
'--dtype', 'float16',
'--push-to-hub', 'Jibbalit/DeepSeek-V4-Pro-WaveTank',
]
result = subprocess.run(cmd, check=True)
return result.returncode
if __name__ == '__main__':
sys.exit(main())