Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,10 @@ nf4_config = BitsAndBytesConfig(
|
|
18 |
|
19 |
model_id = "CohereForAI/c4ai-command-r-v01"
|
20 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
21 |
-
model = AutoModelForCausalLM.from_pretrained(model_id,
|
|
|
|
|
|
|
22 |
|
23 |
@spaces.GPU
|
24 |
def generate_response(user_input, max_new_tokens, temperature):
|
|
|
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 |
+
)
|
25 |
|
26 |
@spaces.GPU
|
27 |
def generate_response(user_input, max_new_tokens, temperature):
|