Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,8 +47,7 @@ class DocumentRetrievalAndGeneration:
|
|
| 47 |
bnb_4bit_quant_type="nf4",
|
| 48 |
bnb_4bit_compute_dtype=torch.bfloat16
|
| 49 |
)
|
| 50 |
-
|
| 51 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config).to(device)
|
| 52 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 53 |
generate_text = pipeline(
|
| 54 |
model=model,
|
|
|
|
| 47 |
bnb_4bit_quant_type="nf4",
|
| 48 |
bnb_4bit_compute_dtype=torch.bfloat16
|
| 49 |
)
|
| 50 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config)
|
|
|
|
| 51 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 52 |
generate_text = pipeline(
|
| 53 |
model=model,
|