Spaces:
Sleeping
Sleeping
Try deberta small
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ student_model_config = teacher_model.config
|
|
46 |
student_model_config.num_attention_heads = 6
|
47 |
student_model_config.num_hidden_layers = 4
|
48 |
student_model = DebertaV2ForTokenClassification.from_pretrained(
|
49 |
-
"microsoft/deberta-v3-
|
50 |
config=student_model_config, ignore_mismatched_sizes=True)
|
51 |
print(student_model)
|
52 |
print_trainable_parameters(student_model)
|
@@ -58,7 +58,7 @@ if torch.cuda.is_available():
|
|
58 |
# Load data.
|
59 |
raw_dataset = load_dataset("ai4privacy/pii-masking-400k", split='train')
|
60 |
raw_dataset = raw_dataset.filter(lambda example: example["language"].startswith("en"))
|
61 |
-
raw_dataset = raw_dataset.select(range(
|
62 |
raw_dataset = raw_dataset.train_test_split(test_size=0.2)
|
63 |
print(raw_dataset)
|
64 |
print(raw_dataset.column_names)
|
|
|
46 |
student_model_config.num_attention_heads = 6
|
47 |
student_model_config.num_hidden_layers = 4
|
48 |
student_model = DebertaV2ForTokenClassification.from_pretrained(
|
49 |
+
"microsoft/deberta-v3-small",
|
50 |
config=student_model_config, ignore_mismatched_sizes=True)
|
51 |
print(student_model)
|
52 |
print_trainable_parameters(student_model)
|
|
|
58 |
# Load data.
|
59 |
raw_dataset = load_dataset("ai4privacy/pii-masking-400k", split='train')
|
60 |
raw_dataset = raw_dataset.filter(lambda example: example["language"].startswith("en"))
|
61 |
+
raw_dataset = raw_dataset.select(range(4000))
|
62 |
raw_dataset = raw_dataset.train_test_split(test_size=0.2)
|
63 |
print(raw_dataset)
|
64 |
print(raw_dataset.column_names)
|