Spaces:
Running
Running
Khaledmd12
commited on
Commit
•
78827ae
1
Parent(s):
85ee3e5
Update app.py
Browse files
app.py
CHANGED
@@ -127,7 +127,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
127 |
model_name,
|
128 |
quantization_config=bnb_config,
|
129 |
torch_dtype=torch.bfloat16,
|
130 |
-
device_map="auto",
|
131 |
)
|
132 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
133 |
|
@@ -148,7 +148,7 @@ guard_model = AutoModelForCausalLM.from_pretrained(
|
|
148 |
model_id,
|
149 |
quantization_config=bnb_config_guard,
|
150 |
torch_dtype=torch.bfloat16,
|
151 |
-
device_map="auto",
|
152 |
)
|
153 |
|
154 |
"""### **part 8: Setting Up a Text Generation Pipeline with HuggingFace and LangChain**"""
|
|
|
127 |
model_name,
|
128 |
quantization_config=bnb_config,
|
129 |
torch_dtype=torch.bfloat16,
|
130 |
+
# device_map="auto",
|
131 |
)
|
132 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
133 |
|
|
|
148 |
model_id,
|
149 |
quantization_config=bnb_config_guard,
|
150 |
torch_dtype=torch.bfloat16,
|
151 |
+
# device_map="auto",
|
152 |
)
|
153 |
|
154 |
"""### **part 8: Setting Up a Text Generation Pipeline with HuggingFace and LangChain**"""
|