初始化项目,由ModelHub XC社区提供模型
Model: sachinn1/xl-durel Source: Original Platform
This commit is contained in:
101
README.md
Normal file
101
README.md
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
language: en
|
||||
license: mit
|
||||
tags:
|
||||
- sentence-transformers
|
||||
- semantic-search
|
||||
- ordinal-classification
|
||||
- word-in-context
|
||||
- multilingual
|
||||
model-index:
|
||||
- name: xl-durel
|
||||
results: []
|
||||
---
|
||||
|
||||
# Model Background
|
||||
|
||||
This model, **XL-DURel**, is trained on **ordinal WiC** data and it is optimized using [**AnglE Loss**](https://arxiv.org/abs/2309.12871) (Li & Li, 2023).
|
||||
|
||||
For more details, see our paper: [XL-DURel: Finetuning Sentence Transformers for Ordinal Word-in-Context Classification](https://arxiv.org/pdf/2507.14578)
|
||||
|
||||
# Reproducing Results
|
||||
|
||||
To reproduce the results presented in the **XL-DURel** paper, please follow the instructions in our GitHub repository:[XL-DURel Reproduction Instructions](https://github.com/sachinn12/XL-DURel)
|
||||
|
||||
## Usage
|
||||
|
||||
The recommended way to use this model, including code examples for target word encoding, please see [xl-durel.ipynb](https://github.com/sachinn12/XL-DURel/blob/main/xl-durel.ipynb) in the [GitHub repository](https://github.com/sachinn12/XL-DURel).
|
||||
|
||||
|
||||
## Simple Method
|
||||
|
||||
The easiest way to use this model is with the [sentence-transformers](https://www.SBERT.net) library:
|
||||
|
||||
```
|
||||
pip install -U sentence-transformers
|
||||
```
|
||||
|
||||
Then you can use the model like this:
|
||||
|
||||
```python
|
||||
from sentence_transformers import SentenceTransformer
|
||||
sentences = ["This is an example sentence", "Each sentence is converted"]
|
||||
|
||||
model = SentenceTransformer("sachinn1/xl-durel")
|
||||
embeddings = model.encode(sentences)
|
||||
print(embeddings)
|
||||
```
|
||||
|
||||
## Training
|
||||
The model was trained with the parameters:
|
||||
|
||||
**DataLoader**:
|
||||
|
||||
`torch.utils.data.dataloader.DataLoader` of length 9369 with parameters:
|
||||
```
|
||||
{'batch_size': 32, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
||||
```
|
||||
|
||||
**Loss**:
|
||||
|
||||
`sentence_transformers.losses.AnglELoss.AnglELoss` with parameters:
|
||||
```
|
||||
{'scale': 20.0, 'similarity_fct': 'pairwise_angle_sim'}
|
||||
```
|
||||
|
||||
Parameters of the fit()-Method:
|
||||
```
|
||||
{
|
||||
"epochs": 10,
|
||||
"evaluation_steps": 2342,
|
||||
"evaluator": "WordTransformer.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
||||
"max_grad_norm": 1,
|
||||
"optimizer_class": "<class 'transformers.optimization.AdamW'>",
|
||||
"optimizer_params": {
|
||||
"lr": 1e-05
|
||||
},
|
||||
"scheduler": "WarmupLinear",
|
||||
"steps_per_epoch": null,
|
||||
"warmup_steps": 9369,
|
||||
"weight_decay": 0.0
|
||||
}
|
||||
```
|
||||
|
||||
## Citing & Authors
|
||||
```
|
||||
@misc{yadav2025xldurelfinetuningsentencetransformers,
|
||||
title={XL-DURel: Finetuning Sentence Transformers for Ordinal Word-in-Context Classification},
|
||||
author={Sachin Yadav and Dominik Schlechtweg},
|
||||
year={2025},
|
||||
eprint={2507.14578},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.CL},
|
||||
url={https://arxiv.org/abs/2507.14578},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user