This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Get-FreeTcpPort retrieves an available TCP port within a specified range. | |
.DESCRIPTION | |
The Get-FreeTcpPort function searches for an available TCP port within the specified range. It checks both active and inactive TCP ports and returns a free port. | |
.PARAMETER Start | |
The starting port number of the range |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import re | |
# .... | |
# Fix for cudaHostRegister on Windows with Nvidia GTX 1070/1080 ( Hunter Watson | github.com/hwvs ) | |
# Resolves: "RuntimeError: Host and device pointer dont match with cudaHostRegister. Please dont use this feature by setting PYTORCH_CUDA_ALLOC_CONF=use_cuda_host_register:False (default)" | |
# Tested on: | |
# -- Unsloth 2025.1.1: Fast Qwen2 patching. Transformers: 4.46.3. | |
# -- GPU: NVIDIA GeForce GTX 1070. Max memory: 8.0 GB. Platform: Windows. |