Spaces:
Runtime error
Runtime error
Update model.py
Browse files2 unmodified lines3456789101112132 unmodified linesstr_cmd2 = 'pip install --no-deps xformers "trl<0.9.0" peft accelerate bitsandbytes'os.system(str_cmd1)os.system(str_cmd2)os.environ["CUDA_VISIBLE_DEVICES"] = "1" # or "0,1" for multiple GPUsfrom unsloth import FastLanguageModelimport torchmax_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.2 unmodified lines345678910111213142 unmodified linesstr_cmd2 = 'pip install --no-deps xformers "trl<0.9.0" peft accelerate bitsandbytes'os.system(str_cmd1)os.system(str_cmd2)#os.environ["CUDA_VISIBLE_DEVICES"] = "0" # or "0,1" for multiple GPUsfrom unsloth import FastLanguageModelimport torchdevice = torch.device("cpu")max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.
model.py+2-1