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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

naver
/
splade-code-8B

Feature Extraction
sentence-transformers
Safetensors
Transformers
qwen3
text-generation
splade
sparse-encoder
code
custom_code
text-embeddings-inference
Model card Files Files and versions
xet
Community
2

Instructions to use naver/splade-code-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use naver/splade-code-8B with sentence-transformers:

    from sentence_transformers import SparseEncoder
    
    model = SparseEncoder("naver/splade-code-8B", trust_remote_code=True)
    
    queries = ["Which planet is known as the Red Planet?"]
    documents = [
    	"Venus is often called Earth's twin because of its similar size and proximity.",
    	"Mars, known for its reddish appearance, is often referred to as the Red Planet.",
    	"Jupiter, the largest planet in our solar system, has a prominent red spot.",
    ]
    
    query_embeddings = model.encode_query(queries)
    document_embeddings = model.encode_document(documents)
    
    similarities = model.similarity(query_embeddings, document_embeddings)
    print(similarities)
  • Transformers

    How to use naver/splade-code-8B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("feature-extraction", model="naver/splade-code-8B", trust_remote_code=True)
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("naver/splade-code-8B", trust_remote_code=True)
    model = AutoModelForCausalLM.from_pretrained("naver/splade-code-8B", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
splade-code-8B
361 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 19 commits
sclincha's picture
sclincha
Patch loading SparseEncoder from Hub (#2)
fe9fb2f 5 months ago
  • 1_SpladePooling
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • lora
    Patch loading SparseEncoder from Hub (#2) 5 months ago
  • .gitattributes
    1.57 kB
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • README.md
    3.09 kB
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • Splade-Code LICENSE.txt
    3.81 kB
    Upload Licence and Notices 7 months ago
  • Splade-Code NOTICE.txt
    2.31 kB
    Upload Licence and Notices 7 months ago
  • config.json
    870 Bytes
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • config_sentence_transformers.json
    115 Bytes
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • generation_config.json
    213 Bytes
    Create generation_config.json 7 months ago
  • modules.json
    274 Bytes
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • splade.py
    6.61 kB
    Patch loading SparseEncoder from Hub (#2) 5 months ago
  • tokenizer.json
    11.4 MB
    xet
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • tokenizer_config.json
    691 Bytes
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago
  • utils.py
    3.86 kB
    Simplify and support Sentence Transformers via SparseEncoder (#1) 5 months ago