Merge branch 'main' into nightly

This commit is contained in:
Daniel Han 2024-11-06 19:02:44 -08:00
commit b3ce5868ca
2 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "2024.11.4"
__version__ = "2024.11.5"
__all__ = [
"prepare_model_for_kbit_training",

View file

@ -54,11 +54,11 @@ def _get_dtype(dtype):
"bfloat16": torch.bfloat16,
torch.bfloat16: torch.bfloat16,
}
if dtype in __DTYPE_MAP:
return __DTYPE_MAP[dtype]
if dtype is None or dtype == None: return None
elif dtype in __DTYPE_MAP: return __DTYPE_MAP[dtype]
else:
print(f"Unsloth: {dtype} is not recognized, so we'll default to torch.float16")
return torch.float16
print(f"Unsloth: {dtype} is not recognized, so we'll default to None")
return None
pass
pass