Instructions to use allenai/specter2_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/specter2_base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="allenai/specter2_base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("allenai/specter2_base") model = AutoModel.from_pretrained("allenai/specter2_base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,11 +8,11 @@ language:
|
|
| 8 |
|
| 9 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
|
| 14 |
**Aug 2023 Update:**
|
| 15 |
-
1. **The
|
| 16 |
|
| 17 |
|Old Name|New Name|
|
| 18 |
|--|--|
|
|
@@ -27,11 +27,11 @@ An [adapter](https://adapterhub.ml) for the [allenai/specter2_base](https://hugg
|
|
| 27 |
|
| 28 |
This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
|
| 29 |
|
| 30 |
-
##
|
| 31 |
|
| 32 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 33 |
|
| 34 |
-
|
| 35 |
This is the base model to be used along with the adapters.
|
| 36 |
Given the combination of title and abstract of a scientific paper or a short texual query, the model can be used to generate effective embeddings to be used in downstream applications.
|
| 37 |
|
|
@@ -43,7 +43,7 @@ Given the combination of title and abstract of a scientific paper or a short tex
|
|
| 43 |
|
| 44 |
## Model Description
|
| 45 |
|
| 46 |
-
|
| 47 |
Post that it is trained with additionally attached task format specific adapter modules on all the [SciRepEval](https://huggingface.co/datasets/allenai/scirepeval) training tasks.
|
| 48 |
|
| 49 |
Task Formats trained on:
|
|
@@ -67,9 +67,9 @@ It builds on the work done in [SciRepEval: A Multi-Format Benchmark for Scientif
|
|
| 67 |
|
| 68 |
<!-- Provide the basic links for the model. -->
|
| 69 |
|
| 70 |
-
- **Repository:** [https://github.com/allenai/
|
| 71 |
- **Paper:** [https://api.semanticscholar.org/CorpusID:254018137](https://api.semanticscholar.org/CorpusID:254018137)
|
| 72 |
-
- **Demo:** [Usage](https://github.com/allenai/
|
| 73 |
|
| 74 |
# Uses
|
| 75 |
|
|
@@ -161,9 +161,10 @@ We also evaluate and establish a new SoTA on [MDCR](https://github.com/zoranmedi
|
|
| 161 |
|[SPECTER](https://huggingface.co/allenai/specter)|54.7|57.4|68.0|(30.6, 25.5)|
|
| 162 |
|[SciNCL](https://huggingface.co/malteos/scincl)|55.6|57.8|69.0|(32.6, 27.3)|
|
| 163 |
|[SciRepEval-Adapters](https://huggingface.co/models?search=scirepeval)|61.9|59.0|70.9|(35.3, 29.6)|
|
| 164 |
-
|[
|
|
|
|
| 165 |
|
| 166 |
-
Please cite the following works if you end up using
|
| 167 |
|
| 168 |
```
|
| 169 |
[SciRepEval paper](https://api.semanticscholar.org/CorpusID:254018137)
|
|
|
|
| 8 |
|
| 9 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 10 |
|
| 11 |
+
# SPECTER2 Base
|
| 12 |
|
| 13 |
|
| 14 |
**Aug 2023 Update:**
|
| 15 |
+
1. **The SPECTER2 Base and proximity adapter models have been renamed in Hugging Face based upon usage patterns as follows:**
|
| 16 |
|
| 17 |
|Old Name|New Name|
|
| 18 |
|--|--|
|
|
|
|
| 27 |
|
| 28 |
This adapter was created for usage with the **[adapter-transformers](https://github.com/Adapter-Hub/adapter-transformers)** library.
|
| 29 |
|
| 30 |
+
## SPECTER2
|
| 31 |
|
| 32 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 33 |
|
| 34 |
+
SPECTER2 is the successor to [SPECTER](https://huggingface.co/allenai/specter) and is capable of generating task specific embeddings for scientific tasks when paired with [adapters](https://huggingface.co/models?search=allenai/specter-2_).
|
| 35 |
This is the base model to be used along with the adapters.
|
| 36 |
Given the combination of title and abstract of a scientific paper or a short texual query, the model can be used to generate effective embeddings to be used in downstream applications.
|
| 37 |
|
|
|
|
| 43 |
|
| 44 |
## Model Description
|
| 45 |
|
| 46 |
+
SPECTER2 has been trained on over 6M triplets of scientific paper citations, which are available [here](https://huggingface.co/datasets/allenai/scirepeval/viewer/cite_prediction_new/evaluation).
|
| 47 |
Post that it is trained with additionally attached task format specific adapter modules on all the [SciRepEval](https://huggingface.co/datasets/allenai/scirepeval) training tasks.
|
| 48 |
|
| 49 |
Task Formats trained on:
|
|
|
|
| 67 |
|
| 68 |
<!-- Provide the basic links for the model. -->
|
| 69 |
|
| 70 |
+
- **Repository:** [https://github.com/allenai/SPECTER2](https://github.com/allenai/SPECTER2)
|
| 71 |
- **Paper:** [https://api.semanticscholar.org/CorpusID:254018137](https://api.semanticscholar.org/CorpusID:254018137)
|
| 72 |
+
- **Demo:** [Usage](https://github.com/allenai/SPECTER2/blob/main/README.md)
|
| 73 |
|
| 74 |
# Uses
|
| 75 |
|
|
|
|
| 161 |
|[SPECTER](https://huggingface.co/allenai/specter)|54.7|57.4|68.0|(30.6, 25.5)|
|
| 162 |
|[SciNCL](https://huggingface.co/malteos/scincl)|55.6|57.8|69.0|(32.6, 27.3)|
|
| 163 |
|[SciRepEval-Adapters](https://huggingface.co/models?search=scirepeval)|61.9|59.0|70.9|(35.3, 29.6)|
|
| 164 |
+
|[SPECTER2 Base](allenai/specter2_base)|56.3|73.6|69.1|(38.0, 32.4)|
|
| 165 |
+
|[SPECTER2-Adapters](https://huggingface.co/models?search=allenai/specter-2)|**62.3**|**59.2**|**71.2**|**(38.4, 33.0)**|
|
| 166 |
|
| 167 |
+
Please cite the following works if you end up using SPECTER2:
|
| 168 |
|
| 169 |
```
|
| 170 |
[SciRepEval paper](https://api.semanticscholar.org/CorpusID:254018137)
|