Spaces:
Running
on
Zero
Running
on
Zero
File size: 4,295 Bytes
6228595 3a8756f 6228595 3a8756f 6228595 3a8756f 6228595 3a8756f f7e1fb5 3a8756f f7e1fb5 3a8756f f7e1fb5 3a8756f 6228595 |
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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
#!/bin/bash
# Complete installation script for Mirel with MX format support on H200
echo "Installing Mirel dependencies for GPT-OSS with MX format support..."
# Upgrade pip first
pip install --upgrade pip
# Install main requirements WITH SPECIFIC VERSIONS for ZeroGPU compatibility
pip install huggingface_hub>=0.34.0
pip install transformers>=4.55.0
pip install accelerate>=0.33.0
pip install torch==2.4.0 # SPECIFIC VERSION for ZeroGPU - DO NOT use nightly!
pip install gradio>=5.42.0
pip install spaces
# Install LoRA/PEFT support
pip install peft>=0.11.0
pip install bitsandbytes>=0.43.1
# Install Harmony format
pip install openai-harmony
# Install standard Triton (MX will fallback to bf16)
pip install triton>=3.0.0
# Note: triton_kernels with ragged_tma is not available in stable releases
# The model will fall back to bf16 mode which is fine for inference
echo "Note: MX format requires bleeding-edge Triton features not available in stable releases."
echo "The model will use bf16 mode instead, which works fine but uses more memory."
# Optional but recommended
pip install safetensors>=0.4.0
pip install sentencepiece>=0.2.0
pip install protobuf>=3.20.0
pip install "numpy<2.0.0"
# Verify critical imports
echo "Verifying installation..."
python -c "
import sys
errors = []
try:
import torch
print(f'β PyTorch {torch.__version__}')
# Check CUDA availability without initializing it (for ZeroGPU)
print(f' CUDA available: Will be checked at runtime')
except ImportError as e:
errors.append(f'β PyTorch: {e}')
try:
import transformers
print(f'β Transformers {transformers.__version__}')
except ImportError as e:
errors.append(f'β Transformers: {e}')
try:
import peft
print(f'β PEFT {peft.__version__}')
except ImportError as e:
errors.append(f'β PEFT: {e}')
try:
import triton
print(f'β Triton {triton.__version__}')
except ImportError as e:
errors.append(f'β Triton: {e}')
try:
import openai_harmony
print('β OpenAI Harmony')
except ImportError as e:
errors.append(f'β OpenAI Harmony: {e}')
try:
import gradio
print(f'β Gradio {gradio.__version__}')
except ImportError as e:
errors.append(f'β Gradio: {e}')
try:
import spaces
print('β Spaces (ZeroGPU support)')
except ImportError as e:
errors.append(f'β Spaces: {e}')
if errors:
print('\nβ Installation issues found:')
for error in errors:
print(f' {error}')
sys.exit(1)
else:
print('\nβ
All dependencies installed successfully!')
print('Note: Model will run in bf16 mode (MX format requires unreleased Triton features)')
"
echo "Installation complete!"
# Optional but recommended
pip install safetensors>=0.4.0
pip install sentencepiece>=0.2.0
pip install protobuf>=3.20.0
pip install "numpy<2.0.0"
# Verify critical imports
echo "Verifying installation..."
python -c "
import sys
errors = []
try:
import torch
print(f'β PyTorch {torch.__version__}')
except ImportError as e:
errors.append(f'β PyTorch: {e}')
try:
import transformers
print(f'β Transformers {transformers.__version__}')
except ImportError as e:
errors.append(f'β Transformers: {e}')
try:
import peft
print(f'β PEFT {peft.__version__}')
except ImportError as e:
errors.append(f'β PEFT: {e}')
try:
import triton
print(f'β Triton {triton.__version__}')
except ImportError as e:
errors.append(f'β Triton: {e}')
try:
import triton_kernels
print('β Triton Kernels (MX format support)')
except ImportError as e:
errors.append(f'β Triton Kernels (CRITICAL): {e}')
print('β οΈ WARNING: MX format will NOT work without triton_kernels!')
try:
import openai_harmony
print('β OpenAI Harmony')
except ImportError as e:
errors.append(f'β OpenAI Harmony: {e}')
try:
import gradio
print(f'β Gradio {gradio.__version__}')
except ImportError as e:
errors.append(f'β Gradio: {e}')
if errors:
print('\nβ Installation issues found:')
for error in errors:
print(f' {error}')
sys.exit(1)
else:
print('\nβ
All dependencies installed successfully!')
print('You can now run the Mirel app with MX format support on H200 GPUs')
"
echo "Installation complete!" |