melanchthon19 commited on
Commit
5c7370c
·
1 Parent(s): 5a4fdd8

automodel classifier

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .ipynb_checkpoints
README.md CHANGED
@@ -1,9 +1,35 @@
 
 
 
 
 
1
  ---
2
- tags:
3
- - model_hub_mixin
4
- - pytorch_model_hub_mixin
 
5
  ---
6
 
7
- This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
8
- - Library: [More Information Needed]
9
- - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DistilBERT Essay Scoring Model (Test)
2
+
3
+ This model is a **proof-of-concept for automated essay scoring**, built using **DistilBERT** and integrated with the Hugging Face Hub through the [`PyTorchModelHubMixin`](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin).
4
+ It was trained for **only one epoch** and is intended **for testing pipeline integration**, not production use.
5
+
6
  ---
7
+
8
+ ## Task
9
+ - **Automated Essay Scoring (Text Classification)**
10
+
11
  ---
12
 
13
+ ## Usage
14
+
15
+ ```python
16
+ from transformers import DistilBertTokenizerFast
17
+ from model import DistilBERTClassifier
18
+ import torch
19
+
20
+ # Load model and tokenizer
21
+ model = DistilBERTClassifier.from_pretrained("melanchthon19/mews-aes-classifier-base")
22
+ tokenizer = DistilBertTokenizerFast.from_pretrained("distilbert-base-uncased")
23
+
24
+ # Example text
25
+ text = "The essay demonstrates clear structure and coherent argumentation."
26
+
27
+ # Tokenize
28
+ inputs = tokenizer(text, truncation=True, padding='max_length', max_length=512, return_tensors="pt")
29
+
30
+ # Predict
31
+ with torch.no_grad():
32
+ logits = model(**inputs)
33
+ prediction = torch.argmax(logits, dim=1).item()
34
+
35
+ print("Predicted score class:", prediction)
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
  "freeze_params": true,
3
  "model_dir": "/Users/sunpn/.cache/huggingface/hub/models--distilbert-base-uncased/snapshots/12040accade4e8a0f71eabdb258fecc2e7e948be/",
4
- "num_labels": 5
5
  }
 
1
  {
2
  "freeze_params": true,
3
  "model_dir": "/Users/sunpn/.cache/huggingface/hub/models--distilbert-base-uncased/snapshots/12040accade4e8a0f71eabdb258fecc2e7e948be/",
4
+ "num_labels": 10
5
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:daeef9f59a1af43243b29a73a857f0ec3bed4a04c9a45594201ac791af543687
3
- size 265859740
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:358c60ee387a23808f6978be79ab7512b8e96b62a78ce6a9eb40d5eafe69c387
3
+ size 265862328
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "DistilBertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff