lawhy commited on
Commit
5c877e2
·
verified ·
1 Parent(s): 7e664e5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -3
README.md CHANGED
@@ -10,6 +10,12 @@ tags:
10
  license: apache-2.0
11
  language:
12
  - en
 
 
 
 
 
 
13
  ---
14
 
15
  # Hierarchy-Transformers/HiT-MiniLM-L12-WordNetNoun
@@ -20,16 +26,25 @@ A **Hi**erarchy **T**ransformer Encoder (HiT) model that explicitly encodes enti
20
 
21
  <!-- Provide a longer summary of what this model is. -->
22
 
23
- HiT-MiniLM-L12-WordNet is a HiT model trained on WordNet's noun hierarchy with random negative sampling.
24
 
25
  - **Developed by:** [Yuan He](https://www.yuanhe.wiki/), Zhangdie Yuan, Jiaoyan Chen, and Ian Horrocks
26
  - **Model type:** Hierarchy Transformer Encoder (HiT)
27
  - **License:** Apache license 2.0
28
  - **Hierarchy**: WordNet (Noun)
29
- - **Training Dataset**: Download `wordnet.zip` from [Datasets for HiTs on Zenodo](https://zenodo.org/doi/10.5281/zenodo.10511042)
30
  - **Pre-trained model:** [sentence-transformers/all-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2)
31
  - **Training Objectives**: Jointly optimised on *hyperbolic clustering* and *hyperbolic centripetal* losses
32
 
 
 
 
 
 
 
 
 
 
33
  ### Model Sources
34
 
35
  <!-- Provide the basic links for the model. -->
@@ -58,7 +73,12 @@ gpu_id = 0
58
  device = get_torch_device(gpu_id)
59
 
60
  # load the model
61
- model = HierarchyTransformer.load_pretrained('Hierarchy-Transformers/HiT-MiniLM-L12-WordNetNoun', device)
 
 
 
 
 
62
 
63
  # entity names to be encoded.
64
  entity_names = ["computer", "personal computer", "fruit", "berry"]
 
10
  license: apache-2.0
11
  language:
12
  - en
13
+ metrics:
14
+ - precision
15
+ - recall
16
+ - f1
17
+ base_model:
18
+ - sentence-transformers/all-MiniLM-L12-v2
19
  ---
20
 
21
  # Hierarchy-Transformers/HiT-MiniLM-L12-WordNetNoun
 
26
 
27
  <!-- Provide a longer summary of what this model is. -->
28
 
29
+ HiT-MiniLM-L12-WordNet is a HiT model trained on WordNet's subsumption (hypernym) hierarchy of noun entities.
30
 
31
  - **Developed by:** [Yuan He](https://www.yuanhe.wiki/), Zhangdie Yuan, Jiaoyan Chen, and Ian Horrocks
32
  - **Model type:** Hierarchy Transformer Encoder (HiT)
33
  - **License:** Apache license 2.0
34
  - **Hierarchy**: WordNet (Noun)
35
+ - **Training Dataset**: Download `wordnet-mixed.zip` from [Datasets for HiTs on Zenodo](https://zenodo.org/doi/10.5281/zenodo.10511042)
36
  - **Pre-trained model:** [sentence-transformers/all-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2)
37
  - **Training Objectives**: Jointly optimised on *hyperbolic clustering* and *hyperbolic centripetal* losses
38
 
39
+ ### Model Versions
40
+
41
+
42
+ | **Version** | **Model Revision** | **Note** |
43
+ |------------|---------|----------|
44
+ |v1.0 (Random Negatives)| `main` or `v1-random-negative`| The variant trained on random negatives, as detailed in the [paper](https://arxiv.org/abs/2401.11374).|
45
+ |v1.0 (Hard Negatives)| `v1-hard-negative` | The variant trained on hard negatives, as detailed in the [paper](https://arxiv.org/abs/2401.11374). |
46
+
47
+
48
  ### Model Sources
49
 
50
  <!-- Provide the basic links for the model. -->
 
73
  device = get_torch_device(gpu_id)
74
 
75
  # load the model
76
+ revision = "main" # change for a different version
77
+ model = HierarchyTransformer.from_pretrained(
78
+ model_name_or_path='Hierarchy-Transformers/HiT-MiniLM-L12-WordNetNoun',
79
+ revision=revision
80
+ device=device
81
+ )
82
 
83
  # entity names to be encoded.
84
  entity_names = ["computer", "personal computer", "fruit", "berry"]