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

jinaai
/
jina-code-embeddings-0.5b

Feature Extraction
Transformers
Safetensors
sentence-transformers
qwen2
text-generation
mteb
🇪🇺 Region: EU
Model card Files Files and versions
xet
Community
3

Instructions to use jinaai/jina-code-embeddings-0.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use jinaai/jina-code-embeddings-0.5b with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("feature-extraction", model="jinaai/jina-code-embeddings-0.5b")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForMultimodalLM
    
    tokenizer = AutoTokenizer.from_pretrained("jinaai/jina-code-embeddings-0.5b")
    model = AutoModelForMultimodalLM.from_pretrained("jinaai/jina-code-embeddings-0.5b")
  • sentence-transformers

    How to use jinaai/jina-code-embeddings-0.5b with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("jinaai/jina-code-embeddings-0.5b")
    
    sentences = [
        "The weather is lovely today.",
        "It's so sunny outside!",
        "He drove to the stadium."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [3, 3]
  • Notebooks
  • Google Colab
  • Kaggle
jina-code-embeddings-0.5b
Ctrl+K
Ctrl+K
  • 4 contributors
History: 23 commits
michael-guenther's picture
michael-guenther
Add example on how to use the model with transformers without trust_remote_code
72bc140 verified 9 months ago
  • 1_Pooling
    Create 1_Pooling/config.json 10 months ago
  • .gitattributes
    50 Bytes
    upload last-token model 10 months ago
  • README.md
    7.48 kB
    Add example on how to use the model with transformers without trust_remote_code 9 months ago
  • config.json
    1.6 kB
    Update config.json 9 months ago
  • config_sentence_transformers.json
    877 Bytes
    Rename config_sentence_transformers.py to config_sentence_transformers.json 10 months ago
  • merges.txt
    1.67 MB
    upload last-token model 10 months ago
  • model.safetensors
    988 MB
    xet
    upload last-token model 10 months ago
  • modeling_jina_code_embeddings.py
    5.91 kB
    Rename modeling_jina_embeddings_c1.py to modeling_jina_code_embeddings.py 9 months ago
  • modules.json
    349 Bytes
    Create modules.json 10 months ago
  • vocab.json
    2.78 MB
    upload last-token model 10 months ago