unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

Kaggle FSSPEC_VERSION on new VMs

Open danielhanchen opened this issue 10 months ago • 8 comments

FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec"))

File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version)
    261 def __init__(self, version: str) -> None:
    262 
    263     # Validate the version and parse it into pieces
--> 264     match = self._regex.search(version)
    265     if not match:
    266         raise InvalidVersion(f"Invalid version: '{version}'")

TypeError: expected string or bytes-like object

danielhanchen avatar Apr 04 '24 14:04 danielhanchen

Hi Dan, anyway to get around this error before it is fixed?

patrickjchen avatar Apr 06 '24 03:04 patrickjchen

@patrickjchen If you clone the Mistral notebook from https://www.kaggle.com/code/danielhanchen/kaggle-mistral-7b-unsloth-notebook as is, it should work. New Kaggle envs are broken for now

danielhanchen avatar Apr 06 '24 14:04 danielhanchen

@patrickjchen I re-did the Kaggle notebook and fixed the issue! Use the latest one here: https://www.kaggle.com/code/danielhanchen/kaggle-mistral-7b-unsloth-notebook

danielhanchen avatar Apr 06 '24 17:04 danielhanchen

Thanks! It works!

patrickjchen avatar Apr 07 '24 01:04 patrickjchen

Running again, got this error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject When running: model, tokenizer = FastLanguageModel.from_pretrained( model_name = "unsloth/mistral-7b-bnb-4bit", # Choose ANY! eg teknium/OpenHermes-2.5-Mistral-7B max_seq_length = max_seq_length, dtype = dtype, load_in_4bit = load_in_4bit, # token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf )

patrickjchen avatar Apr 07 '24 13:04 patrickjchen

@patrickjchen I re-ran my notebook - it seems to work fine. If you're using your own notebook, you need to exactly copy the notebook I provided, then add your code in. Unfortunately Kaggle can be very finnicky

danielhanchen avatar Apr 07 '24 15:04 danielhanchen

Thanks, Dan. Yeah, I need to first download the packages , then install them without internet connection. Is that torch 2.2.2 is used by the notebook? It's implicitly installed when xformers were installed?

patrickjchen avatar Apr 07 '24 22:04 patrickjchen

@patrickjchen Hmm I think it's torch 2.2.1 or 2.2.2 tbh unsure. Yes xformers itself installs torch

danielhanchen avatar Apr 09 '24 06:04 danielhanchen