SeanLee97/angle-llama-13b-nli

Model

7

stars

4

commits

1

repos using this model

1

linked in READMEs

Nov 2, 2023

updated

peft

README

AnglE๐Ÿ“: Angle-optimized Text Embeddings

It is Angle ๐Ÿ“, not Angel ๐Ÿ‘ผ.

๐Ÿ”ฅ A New SOTA Model for Semantic Textual Similarity!

Github: https://github.com/SeanLee97/AnglE

https://arxiv.org/abs/2309.12871

PWC PWC PWC PWC PWC PWC PWC

STS Results

ModelSTS12STS13STS14STS15STS16STSBenchmarkSICKRelatednessAvg.
SeanLee97/angle-llama-7b-nli-2023102778.6890.5885.4989.5686.9188.9281.1885.90
SeanLee97/angle-llama-7b-nli-v279.0090.5685.7989.4387.0088.9780.9485.96
SeanLee97/angle-llama-13b-nli79.3390.6586.8990.4587.3289.6981.3286.52

Usage

python -m pip install -U angle-emb
from angle_emb import AnglE, Prompts

# init
angle = AnglE.from_pretrained('NousResearch/Llama-2-13b-hf', pretrained_lora_path='SeanLee97/angle-llama-13b-nli', load_kbit=16, apply_bfloat16=False)

# set prompt
print('All predefined prompts:', Prompts.list_prompts())
angle.set_prompt(prompt=Prompts.A)
print('prompt:', angle.prompt)

# encode text
vec = angle.encode({'text': 'hello world'}, to_numpy=True)
print(vec)
vecs = angle.encode([{'text': 'hello world1'}, {'text': 'hello world2'}], to_numpy=True)
print(vecs)

Citation

You are welcome to use our code and pre-trained models. If you use our code and pre-trained models, please support us by citing our work as follows:

@article{li2023angle,
  title={AnglE-Optimized Text Embeddings},
  author={Li, Xianming and Li, Jing},
  journal={arXiv preprint arXiv:2309.12871},
  year={2023}
}

Contributors

SeanLee97

4 commits

SeanLee97/angle-llama-13b-nli

Model

7

stars

4

commits

1

repos using this model

1

linked in READMEs

Nov 2, 2023

updated

peft

README

AnglE๐Ÿ“: Angle-optimized Text Embeddings

It is Angle ๐Ÿ“, not Angel ๐Ÿ‘ผ.

๐Ÿ”ฅ A New SOTA Model for Semantic Textual Similarity!

Github: https://github.com/SeanLee97/AnglE

https://arxiv.org/abs/2309.12871

PWC PWC PWC PWC PWC PWC PWC

STS Results

ModelSTS12STS13STS14STS15STS16STSBenchmarkSICKRelatednessAvg.
SeanLee97/angle-llama-7b-nli-2023102778.6890.5885.4989.5686.9188.9281.1885.90
SeanLee97/angle-llama-7b-nli-v279.0090.5685.7989.4387.0088.9780.9485.96
SeanLee97/angle-llama-13b-nli79.3390.6586.8990.4587.3289.6981.3286.52

Usage

python -m pip install -U angle-emb
from angle_emb import AnglE, Prompts

# init
angle = AnglE.from_pretrained('NousResearch/Llama-2-13b-hf', pretrained_lora_path='SeanLee97/angle-llama-13b-nli', load_kbit=16, apply_bfloat16=False)

# set prompt
print('All predefined prompts:', Prompts.list_prompts())
angle.set_prompt(prompt=Prompts.A)
print('prompt:', angle.prompt)

# encode text
vec = angle.encode({'text': 'hello world'}, to_numpy=True)
print(vec)
vecs = angle.encode([{'text': 'hello world1'}, {'text': 'hello world2'}], to_numpy=True)
print(vecs)

Citation

You are welcome to use our code and pre-trained models. If you use our code and pre-trained models, please support us by citing our work as follows:

@article{li2023angle,
  title={AnglE-Optimized Text Embeddings},
  author={Li, Xianming and Li, Jing},
  journal={arXiv preprint arXiv:2309.12871},
  year={2023}
}

Contributors

SeanLee97

4 commits