-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from SeanLee97/feature/2dmse
Feature/2dmse
- Loading branch information
Showing
11 changed files
with
323 additions
and
1,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
from .angle import * | ||
|
||
|
||
__version__ = '0.3.2' | ||
__version__ = '0.3.3' |
Oops, something went wrong.