Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Alibaba-NLP
/
gte-Qwen1.5-7B-instruct

Sentence Similarity
sentence-transformers
Safetensors
Transformers
qwen2
text-generation
mteb
Qwen
custom_code
Eval Results (legacy)
text-embeddings-inference
Model card Files Files and versions
xet
Community
24

Instructions to use Alibaba-NLP/gte-Qwen1.5-7B-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use Alibaba-NLP/gte-Qwen1.5-7B-instruct with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("Alibaba-NLP/gte-Qwen1.5-7B-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-Qwen1.5-7B-instruct with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("Alibaba-NLP/gte-Qwen1.5-7B-instruct", trust_remote_code=True)
    model = AutoModelForCausalLM.from_pretrained("Alibaba-NLP/gte-Qwen1.5-7B-instruct", trust_remote_code=True)
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Cannot load model on TEI

#24 opened 8 months ago by
markba

add AIBOM

#23 opened 12 months ago by
RiccardoDav

Fixed some minor bugs in eval_mteb.py

#21 opened over 1 year ago by
vatolinalex

通过model = SentenceTransformer("Alibaba-NLP/gte-Qwen2-7B-instruct", trust_remote_code=True)无法使用,报错会说无法访问到文件

#20 opened almost 2 years ago by
hhgz

Architecture should be Qwen2ForCausalLM or Qwen2Model?

1
#19 opened almost 2 years ago by
ultraxyz

how to load this model to multiple gpus?

1
#18 opened almost 2 years ago by
yijiu

infer speed so slow and mutil-gpu infer bug

1
#17 opened almost 2 years ago by
YuYuyanzu

使用官方代码报错 ,Failed to import transformers.models.auto because of the following error

3
#15 opened about 2 years ago by
haaaaaaaa1

Usage with transformers instead of sentence_transformers

1
#14 opened about 2 years ago by
emanjavacas

GGUF format model needed

#10 opened about 2 years ago by
ehmy

出个4bit量化版本吧

👍 2
4
#9 opened about 2 years ago by
piboye

how to finetune this model

3
#8 opened about 2 years ago by
enbacheng
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs