Spaces:
Runtime error
Runtime error
BasToTheMax
commited on
Commit
•
fbe392d
1
Parent(s):
6554d21
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
|
6 |
# to use 4bit use `load_in_4bit=True` instead
|
7 |
quantization_config = BitsAndBytesConfig(load_in_8bit=True)
|
8 |
checkpoint = "HuggingFaceTB/SmolLM-135M"
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
10 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, quantization_config=quantization_config)
|
11 |
|
12 |
|
|
|
6 |
# to use 4bit use `load_in_4bit=True` instead
|
7 |
quantization_config = BitsAndBytesConfig(load_in_8bit=True)
|
8 |
checkpoint = "HuggingFaceTB/SmolLM-135M"
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint).to("cpu")
|
10 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, quantization_config=quantization_config)
|
11 |
|
12 |
|