Skip to content

Commit

Permalink
Merge pull request #51 from SeanLee97/feature/2dmse
Browse files Browse the repository at this point in the history
Feature/2dmse
  • Loading branch information
SeanLee97 authored Feb 23, 2024
2 parents 3f0fc63 + 3abf3cf commit a9d33eb
Show file tree
Hide file tree
Showing 11 changed files with 323 additions and 1,997 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
files = setup.py angle_emb/__init__.py
current_version = 0.3.2
current_version = 0.3.3
commit = True
tag = True
48 changes: 48 additions & 0 deletions README_2DMSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 🪆 2D Matryoshka Sentence Embeddings

> Paper: https://arxiv.org/abs/2402.14776
# Usage

**⚠️ The Document is Working in Progress!**


Example:

```bash
WANDB_MODE=disabled CUDA_VISIBLE_DEVICES=0 angle-trainer \
--model_name_or_path WhereIsAI/UAE-Large-V1 \
--train_name_or_path data.jsonl --save_dir ckpts/custom-UAE-2dmse \
--w2 20.0 --w1 1. --w3 1. --angle_tau 20.0 --learning_rate 1e-5 --maxlen 128 \
--workers 16 \
--pooling_strategy all \
--epochs 1 \
--batch_size 16 \
--apply_tdmse 1 \
--fixed_teacher_name_or_path WhereIsAI/UAE-Large-V1 \
--logging_steps 1000 \
--warmup_steps 100 \
--is_llm 0 \
--save_steps 1000 --seed -1 --gradient_accumulation_steps 6 --fp16 1
```

The `--apply_tdmse 1` is required.


# Citation

```bibtex
@article{li20242d,
title={2D Matryoshka Sentence Embeddings},
author={Xianming Li and Zongxi Li and Jing Li and Haoran Xie and Qing Li},
journal={arXiv preprint arXiv:2402.14776},
year={2024}
}
@article{li2023angle,
title={AnglE-optimized Text Embeddings},
author={Li, Xianming and Li, Jing},
journal={arXiv preprint arXiv:2309.12871},
year={2023}
}
```
2 changes: 1 addition & 1 deletion angle_emb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .angle import *


__version__ = '0.3.2'
__version__ = '0.3.3'
Loading

0 comments on commit a9d33eb

Please sign in to comment.