app.py
CHANGED
@@ -26,10 +26,7 @@ bnb_config = BitsAndBytesConfig(
|
|
26 |
bnb_4bit_quant_type="nf4",
|
27 |
bnb_4bit_compute_dtype=torch.bfloat16
|
28 |
)
|
29 |
-
model_name='
|
30 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
31 |
-
|
32 |
-
|
33 |
-
'red1xe/Llama-2-7B-codeGPT',
|
34 |
-
torch_dtype=torch.bfloat16,
|
35 |
-
is_trainable=False)
|
|
|
26 |
bnb_4bit_quant_type="nf4",
|
27 |
bnb_4bit_compute_dtype=torch.bfloat16
|
28 |
)
|
29 |
+
model_name='red1xe/Llama-2-7B-codeGPT'
|
30 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
31 |
+
model= AutoModelForCausalLM.from_pretrained(model_name, quantization_config=bnb_config)
|
32 |
+
|
|
|
|
|
|