Sentence Similarity
sentence-transformers
Safetensors
Transformers
qwen2
text-generation
mteb
Qwen2
custom_code
Eval Results (legacy)
text-embeddings-inference
Instructions to use Alibaba-NLP/gte-Qwen2-1.5B-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Alibaba-NLP/gte-Qwen2-1.5B-instruct with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Alibaba-NLP/gte-Qwen2-1.5B-instruct", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use Alibaba-NLP/gte-Qwen2-1.5B-instruct with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-Qwen2-1.5B-instruct", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Alibaba-NLP/gte-Qwen2-1.5B-instruct", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Commit History
Support fine-tuning (#35) 389cdda verified
Updating config: `is_causal: False` (#28) 0d2ad8e verified
Update README.md c7ef118 verified
Fixed some minor bugs in eval_mteb.py (#26) ca1f7d7 verified
Update scripts/eval_mteb.py 581c2b2 verified
undo PR 20 (#22) 8fdde9c verified
Infinity support: Short max_length=2048 for more optimized deployment (#20) 3276994 verified
Readme, add infinity deployment documentation (#21) ec7d9de verified
Update README.md c6c1b92 verified
Update 1_Pooling/config.json 5652710 verified
Update modeling_qwen.py 2c527fb verified
Update README.md e79fe7d verified
Merge branch 'main' of https://huggingface.co/Alibaba-NLP/gte-Qwen2-1.5B-instruct into main 91d3c79
zhangyanzhao.zyz commited on
update for support sentence_transformers d3a3c45
zhangyanzhao.zyz commited on
Update README.md b6442d4 verified
Update README.md a7a83fb verified
Update README.md 8772ed6 verified
update README.md 31bf92a
zhangyanzhao.zyz commited on
init model a3fa269
zhangyanzhao.zyz commited on