saadkhi commited on
Commit
60e496e
Β·
verified Β·
1 Parent(s): a93df3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -26,9 +26,12 @@ print("Loading model...")
26
  # Load base model
27
  # ─────────────────────────
28
 
29
- # load config first and REMOVE quantization
30
  config = AutoConfig.from_pretrained(BASE_MODEL, trust_remote_code=True)
31
- config.quantization_config = None # πŸ”΄ important fix
 
 
 
32
 
33
  model = AutoModelForCausalLM.from_pretrained(
34
  BASE_MODEL,
@@ -46,9 +49,11 @@ print("Merging LoRA...")
46
  model = model.merge_and_unload()
47
 
48
  tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
 
49
  model.eval()
50
  print("Model ready")
51
 
 
52
  # ─────────────────────────
53
  # Inference
54
  # ─────────────────────────
 
26
  # Load base model
27
  # ─────────────────────────
28
 
29
+ # Load config
30
  config = AutoConfig.from_pretrained(BASE_MODEL, trust_remote_code=True)
31
+
32
+ # πŸ”΄ IMPORTANT FIX
33
+ # Replace quantization config with empty dict (NOT None)
34
+ config.quantization_config = {}
35
 
36
  model = AutoModelForCausalLM.from_pretrained(
37
  BASE_MODEL,
 
49
  model = model.merge_and_unload()
50
 
51
  tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
52
+
53
  model.eval()
54
  print("Model ready")
55
 
56
+
57
  # ─────────────────────────
58
  # Inference
59
  # ─────────────────────────