drmasad commited on
Commit
5a3a00b
·
verified ·
1 Parent(s): ce8c007

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -52,11 +52,10 @@ def load_model(selected_model_name):
52
  # Load the model with quantization settings
53
  model = AutoModelForCausalLM.from_pretrained(
54
  model_name,
 
55
  trust_remote_code=True,
56
  )
57
 
58
- # Ensure every part of the model is assigned to the correct device
59
- model.to(device) # This should correctly set devices for all components
60
 
61
  # Additional configurations and training enhancements
62
  model.config.use_cache = False
 
52
  # Load the model with quantization settings
53
  model = AutoModelForCausalLM.from_pretrained(
54
  model_name,
55
+ quantization_config=bnb_config,
56
  trust_remote_code=True,
57
  )
58
 
 
 
59
 
60
  # Additional configurations and training enhancements
61
  model.config.use_cache = False