Spaces:
Runtime error
Runtime error
Update model.py
#3
by ntphat - opened
2 unmodified lines34567891011122 unmodified linesstr_cmd2 = 'pip install --no-deps xformers "trl<0.9.0" peft accelerate bitsandbytes'os.system(str_cmd1)os.system(str_cmd2)from unsloth import FastLanguageModel# import 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 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.
model.py+2-1