Add trained model
Browse files- README.md +2 -17
- config.json +24 -1
- pytorch_model.bin +1 -1
README.md
CHANGED
|
@@ -1,18 +1,3 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
datasets:
|
| 4 |
-
- stanfordnlp/sst2
|
| 5 |
-
language:
|
| 6 |
-
- en
|
| 7 |
-
base_model:
|
| 8 |
-
- distilbert/distilbert-base-uncased
|
| 9 |
-
pipeline_tag: text-classification
|
| 10 |
-
tags:
|
| 11 |
-
- legal
|
| 12 |
-
- PyTorch
|
| 13 |
-
- text-classification
|
| 14 |
-
- sentiment-analysis
|
| 15 |
-
---
|
| 16 |
|
| 17 |
# Simple Text Classifier
|
| 18 |
|
|
@@ -39,5 +24,5 @@ inputs = tokenizer("Example text to classify", return_tensors="pt")
|
|
| 39 |
|
| 40 |
# Get predictions
|
| 41 |
outputs = model(**inputs)
|
| 42 |
-
predicted_class = outputs.argmax(-1).item()
|
| 43 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
# Simple Text Classifier
|
| 3 |
|
|
|
|
| 24 |
|
| 25 |
# Get predictions
|
| 26 |
outputs = model(**inputs)
|
| 27 |
+
predicted_class = outputs.argmax(-1).item()
|
| 28 |
+
```
|
config.json
CHANGED
|
@@ -1 +1,24 @@
|
|
| 1 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation_autoset": true,
|
| 3 |
+
"activation": "gelu",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"DistilBertForMaskedLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.1,
|
| 8 |
+
"dim": 768,
|
| 9 |
+
"dropout": 0.1,
|
| 10 |
+
"hidden_dim": 3072,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"max_position_embeddings": 512,
|
| 13 |
+
"model_type": "distilbert",
|
| 14 |
+
"n_heads": 12,
|
| 15 |
+
"n_layers": 6,
|
| 16 |
+
"pad_token_id": 0,
|
| 17 |
+
"qa_dropout": 0.1,
|
| 18 |
+
"seq_classif_dropout": 0.2,
|
| 19 |
+
"sinusoidal_pos_embds": false,
|
| 20 |
+
"tie_weights_": true,
|
| 21 |
+
"torch_dtype": "float32",
|
| 22 |
+
"transformers_version": "4.50.0",
|
| 23 |
+
"vocab_size": 30522
|
| 24 |
+
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 267860394
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30cbde1037aa466a8d8d722a8648582ee1ea26a23a41cc127ffc4df39d0bc930
|
| 3 |
size 267860394
|