Update app.py
Browse files
app.py
CHANGED
@@ -16,11 +16,11 @@ nf4_config = BitsAndBytesConfig(
|
|
16 |
bnb_4bit_compute_dtype=torch.bfloat16
|
17 |
)
|
18 |
|
19 |
-
model_id = "
|
20 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
21 |
model = AutoModelForCausalLM.from_pretrained(model_id,
|
22 |
# load_in_8bit=True,
|
23 |
-
|
24 |
torch_dtype = torch.bfloat16,
|
25 |
device_map="auto"
|
26 |
)
|
|
|
16 |
bnb_4bit_compute_dtype=torch.bfloat16
|
17 |
)
|
18 |
|
19 |
+
model_id = "CohereForAI/c4ai-command-r-v01"
|
20 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
21 |
model = AutoModelForCausalLM.from_pretrained(model_id,
|
22 |
# load_in_8bit=True,
|
23 |
+
quantization_config=nf4_config
|
24 |
torch_dtype = torch.bfloat16,
|
25 |
device_map="auto"
|
26 |
)
|