jonACE commited on
Commit
9beb508
·
verified ·
1 Parent(s): 7b235cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -28,6 +28,9 @@ login(token=hf_token)
28
 
29
  from datasets import Dataset
30
  from transformers import AutoTokenizer
 
 
 
31
 
32
  model_name = "meta-llama/Llama-2-7b-hf" # You can use a smaller one like "meta-llama/Llama-2-7b-chat-hf"
33
 
@@ -59,7 +62,7 @@ model = AutoModelForCausalLM.from_pretrained(
59
  load_in_4bit=True, # Use 4-bit quantization for efficiency
60
  device_map="auto"
61
  #device_map="cpu",
62
- quantization_config=None
63
  )
64
 
65
  # Apply LoRA (efficient fine-tuning)
 
28
 
29
  from datasets import Dataset
30
  from transformers import AutoTokenizer
31
+ import unsloth
32
+
33
+ unsloth.optimize_all()
34
 
35
  model_name = "meta-llama/Llama-2-7b-hf" # You can use a smaller one like "meta-llama/Llama-2-7b-chat-hf"
36
 
 
62
  load_in_4bit=True, # Use 4-bit quantization for efficiency
63
  device_map="auto"
64
  #device_map="cpu",
65
+ #quantization_config=None
66
  )
67
 
68
  # Apply LoRA (efficient fine-tuning)