Spaces:
Running
Running
alibidaran
commited on
Commit
•
e53e706
1
Parent(s):
6a9184e
Update app.py
Browse files
app.py
CHANGED
@@ -44,15 +44,15 @@ class SQLGEN(Base):
|
|
44 |
|
45 |
|
46 |
model_id = "alibidaran/Gemma2_SQLGEN"
|
47 |
-
|
48 |
-
bnb_config = BitsAndBytesConfig(
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
)
|
53 |
|
54 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
55 |
-
model = AutoModelForCausalLM.from_pretrained(model_id,
|
56 |
tokenizer.padding_side = 'right'
|
57 |
|
58 |
|
|
|
44 |
|
45 |
|
46 |
model_id = "alibidaran/Gemma2_SQLGEN"
|
47 |
+
#bnb_config for GPU usage
|
48 |
+
#bnb_config = BitsAndBytesConfig(
|
49 |
+
# load_in_4bit=True,
|
50 |
+
# bnb_4bit_quant_type="nf4",
|
51 |
+
# bnb_4bit_compute_dtype=torch.bfloat16
|
52 |
+
#)
|
53 |
|
54 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
55 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map='auto')
|
56 |
tokenizer.padding_side = 'right'
|
57 |
|
58 |
|