Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/2dmse #51

Merged
merged 4 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading