Update app.py (#33)
Browse files- Update app.py (0201d9b6a52d71abeb25aa74727f52fbd4e5d528)
app.py
CHANGED
@@ -29,17 +29,11 @@ class BasicAgent:
|
|
29 |
if token is None:
|
30 |
print("Hugging Face API token not found in environment variables.")
|
31 |
|
32 |
-
model_name = "
|
33 |
|
34 |
# Load tokenizer and inject a minimal chat_template
|
35 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
36 |
-
|
37 |
-
tokenizer.chat_template = (
|
38 |
-
"### System:\n{system}\n\n"
|
39 |
-
"### User:\n{instruction}\n\n"
|
40 |
-
"### Input:\n{input}\n\n"
|
41 |
-
"### Response:\n"
|
42 |
-
)
|
43 |
quant_config = BitsAndBytesConfig(
|
44 |
load_in_4bit=True,
|
45 |
bnb_4bit_quant_type="nf4",
|
|
|
29 |
if token is None:
|
30 |
print("Hugging Face API token not found in environment variables.")
|
31 |
|
32 |
+
model_name = "HuggingFaceTB/SmolLM-1.7B-Instruct"
|
33 |
|
34 |
# Load tokenizer and inject a minimal chat_template
|
35 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
36 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
quant_config = BitsAndBytesConfig(
|
38 |
load_in_4bit=True,
|
39 |
bnb_4bit_quant_type="nf4",
|