jobbler commited on
Commit
5929fc6
·
1 Parent(s): 93b9241

feat: Switch models to use Gemma 4 from unsloth collection

Browse files
firefox-extension/popup.html CHANGED
@@ -100,8 +100,8 @@
100
 
101
  <label for="model-version">Model Version</label>
102
  <select id="model-version" style="width: 100%; margin-bottom: 15px; padding: 8px; border: 1px solid #d6d3d1; border-radius: 4px; font-family: inherit;">
103
- <option value="2b">Gemma 2B (Fast / Default)</option>
104
- <option value="27b-4a">Gemma 27B 4-bit (High Quality)</option>
105
  </select>
106
  <p class="help" style="margin-top: 0;">Select which LLM to use for saliency analysis.</p>
107
 
 
100
 
101
  <label for="model-version">Model Version</label>
102
  <select id="model-version" style="width: 100%; margin-bottom: 15px; padding: 8px; border: 1px solid #d6d3d1; border-radius: 4px; font-family: inherit;">
103
+ <option value="2b">Gemma 4 2B (Fast / Default)</option>
104
+ <option value="27b-4a">Gemma 4 27B 4-bit (High Quality)</option>
105
  </select>
106
  <p class="help" style="margin-top: 0;">Select which LLM to use for saliency analysis.</p>
107
 
flowread-extension.zip CHANGED
Binary files a/flowread-extension.zip and b/flowread-extension.zip differ
 
main.py CHANGED
@@ -247,8 +247,8 @@ def load_model(model_name: str):
247
  print(f"Loading {model_name} on {device}...")
248
  try:
249
  if model_name == "27b-4a":
250
- # Use Gemma 2 27B in 4-bit (requires CUDA)
251
- hf_model_id = "google/gemma-2-27b"
252
  tokenizer = AutoTokenizer.from_pretrained(hf_model_id, token=hf_token)
253
 
254
  # BitsAndBytes for 4-bit quantization
@@ -267,7 +267,7 @@ def load_model(model_name: str):
267
  )
268
  else:
269
  # Default to 2b
270
- hf_model_id = "google/gemma-2b"
271
  tokenizer = AutoTokenizer.from_pretrained(hf_model_id, token=hf_token)
272
  model = AutoModelForCausalLM.from_pretrained(
273
  hf_model_id,
 
247
  print(f"Loading {model_name} on {device}...")
248
  try:
249
  if model_name == "27b-4a":
250
+ # Use Gemma 4 27B in 4-bit (requires CUDA)
251
+ hf_model_id = "unsloth/gemma-4-27b"
252
  tokenizer = AutoTokenizer.from_pretrained(hf_model_id, token=hf_token)
253
 
254
  # BitsAndBytes for 4-bit quantization
 
267
  )
268
  else:
269
  # Default to 2b
270
+ hf_model_id = "unsloth/gemma-4-2b"
271
  tokenizer = AutoTokenizer.from_pretrained(hf_model_id, token=hf_token)
272
  model = AutoModelForCausalLM.from_pretrained(
273
  hf_model_id,