Spaces:
Sleeping
Sleeping
disable cuda
Browse files
app.py
CHANGED
@@ -49,8 +49,8 @@ st.write('Loading the pretrained model ...')
|
|
49 |
model_name = "CarolXia/pii-kd-deberta-v2"
|
50 |
# config = PeftConfig.from_pretrained(model_name)
|
51 |
model = DebertaV2ForTokenClassification.from_pretrained(model_name, token=st.secrets["HUGGINGFACE_TOKEN"])
|
52 |
-
if torch.cuda.is_available():
|
53 |
-
|
54 |
# Try quantization instead
|
55 |
# model = AutoModelForTokenClassification.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
|
56 |
tokenizer = DebertaV2Tokenizer.from_pretrained("microsoft/mdeberta-v3-base", token=st.secrets["HUGGINGFACE_TOKEN"])
|
|
|
49 |
model_name = "CarolXia/pii-kd-deberta-v2"
|
50 |
# config = PeftConfig.from_pretrained(model_name)
|
51 |
model = DebertaV2ForTokenClassification.from_pretrained(model_name, token=st.secrets["HUGGINGFACE_TOKEN"])
|
52 |
+
# if torch.cuda.is_available():
|
53 |
+
# model = model.to("cuda")
|
54 |
# Try quantization instead
|
55 |
# model = AutoModelForTokenClassification.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
|
56 |
tokenizer = DebertaV2Tokenizer.from_pretrained("microsoft/mdeberta-v3-base", token=st.secrets["HUGGINGFACE_TOKEN"])
|