DrLonee commited on
Commit
56db97b
·
verified ·
1 Parent(s): fda04bb

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ library_name: transformers
5
+ tags:
6
+ - bert
7
+ - scientific-text
8
+ - embeddings
9
+ - fine-tuned
10
+ pipeline_tag: feature-extraction
11
+ ---
12
+
13
+ # scibert-citation-model
14
+
15
+ This model is a fine-tuned version of SciBERT specifically optimized for generating embeddings from scientific papers.
16
+
17
+ ## Model Details
18
+
19
+ - **Base Model**: SciBERT (Scientific BERT)
20
+ - **Fine-tuning Task**: Scientific paper understanding and embedding generation
21
+ - **Language**: English (Scientific/Academic)
22
+ - **Vocabulary**: Scientific vocabulary
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from transformers import AutoTokenizer, AutoModel
28
+ import torch
29
+
30
+ # Load model and tokenizer
31
+ tokenizer = AutoTokenizer.from_pretrained("your-username/scibert-citation-model")
32
+ model = AutoModel.from_pretrained("your-username/scibert-citation-model")
33
+
34
+ # Generate embeddings
35
+ text = "Your scientific text here"
36
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
37
+ with torch.no_grad():
38
+ outputs = model(**inputs)
39
+ embeddings = outputs.last_hidden_state[:, 0, :] # [CLS] token embedding
40
+
41
+ print(f"Embeddings shape: {embeddings.shape}")
42
+ ```
43
+
44
+ ## Performance
45
+
46
+ Fine-tuned SciBert
47
+
48
+ ## Training Details
49
+
50
+ - **Training Framework**: PyTorch/Transformers
51
+ - **Fine-tuning Objective**: Scientific text understanding
52
+
53
+ ## Citation
54
+
55
+ If you use this model in your research, please cite appropriately.
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForSequenceClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "layer_norm_eps": 1e-12,
13
+ "max_position_embeddings": 512,
14
+ "model_type": "bert",
15
+ "num_attention_heads": 12,
16
+ "num_hidden_layers": 12,
17
+ "pad_token_id": 0,
18
+ "position_embedding_type": "absolute",
19
+ "transformers_version": "4.20.0",
20
+ "type_vocab_size": 2,
21
+ "use_cache": true,
22
+ "vocab_size": 31090,
23
+ "_name_or_path": "allenai/scibert_scivocab_uncased",
24
+ "problem_type": "regression",
25
+ "num_labels": 1,
26
+ "id2label": {
27
+ "0": "citation_score"
28
+ },
29
+ "label2id": {
30
+ "citation_score": 0
31
+ }
32
+ }
model_info_20250522_101851.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SciBERT Citation Score Regression Model
2
+ =====================================
3
+
4
+ Base model: allenai/scibert_scivocab_uncased
5
+ Training epochs: 4
6
+ Batch size: 16
7
+ Training date: 20250522_101851
8
+
9
+ Test Results:
10
+ mse: 0.08407380858564521
11
+ rmse: 0.28995483887261686
12
+ mae: 0.20648734952299239
13
+ r2: 0.1967308853421441
14
+ accuracy: 0.7746591820368885
15
+ precision: 0.7403778866340098
16
+ recall: 0.8470776621297038
17
+ f1: 0.7901418969380134
18
+ roc_auc: 0.8444197928624024
scibert_citation_score_model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e8830b3ec0b6a9a1f55b219f6b553d9d58c1936adce55bb52626929189b5fbd
3
+ size 441862717
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "101": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "102": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "103": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "104": {
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": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
training_stats_20250522_101851.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ epoch,train_loss,val_loss,mse,rmse,mae,r2
2
+ 1,0.07147852029715084,0.06684045744343446,0.06685914278675237,0.25857134950870403,0.20464455017427158,0.36019672171960926
3
+ 2,0.056661207980126076,0.06664133808599451,0.06664208914254446,0.2581512911889934,0.1911871365339472,0.3622737993987213
4
+ 3,0.03796716657930858,0.07147907259133764,0.0714912685281264,0.2673785117172403,0.1930904997753184,0.31586996084278096
5
+ 4,0.02269730473143192,0.07996603017911696,0.07999330926759107,0.28283088457166605,0.1996500670638028,0.23451035450542967
vocab.txt ADDED
The diff for this file is too large to render. See raw diff