Spaces:
Running
on
Zero
Running
on
Zero
| # 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 | |
| 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 | |
| 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 Triton and MX format support | |
| pip install triton>=3.4.0 | |
| # CRITICAL: Install triton_kernels from git subdirectory | |
| # This is REQUIRED for MX format on H200 GPUs | |
| echo "Installing triton_kernels (REQUIRED for MX format)..." | |
| pip install git+https://github.com/triton-lang/triton.git@main#subdirectory=python/triton_kernels | |
| # 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!" |