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

IAAR-Shanghai
/
MemReranker-4B

Text Classification
Transformers
Safetensors
sentence-transformers
English
Chinese
qwen3
text-generation
reranker
memory
agent
cross-encoder
text-embeddings-inference
Model card Files Files and versions
xet
Community
4

Instructions to use IAAR-Shanghai/MemReranker-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use IAAR-Shanghai/MemReranker-4B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-classification", model="IAAR-Shanghai/MemReranker-4B")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("IAAR-Shanghai/MemReranker-4B")
    model = AutoModelForCausalLM.from_pretrained("IAAR-Shanghai/MemReranker-4B", device_map="auto")
  • sentence-transformers

    How to use IAAR-Shanghai/MemReranker-4B with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("IAAR-Shanghai/MemReranker-4B")
    
    query = "Which planet is known as the Red Planet?"
    passages = [
    	"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.",
    	"Saturn, famous for its rings, is sometimes mistaken for the Red Planet."
    ]
    
    scores = model.predict([(query, passage) for passage in passages])
    print(scores)
  • Notebooks
  • Google Colab
  • Kaggle
MemReranker-4B
8.83 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 4 commits
kk04jy's picture
kk04jy
fridayl's picture
fridayl
Update README.md (#2)
22890bb 3 months ago
  • 1_LogitScore
    Integrate with Sentence Transformers v5.4 (#1) 3 months ago
  • .gitattributes
    1.57 kB
    Upload 8 files 4 months ago
  • README.md
    14.2 kB
    Update README.md (#2) 3 months ago
  • chat_template.jinja
    741 Bytes
    Integrate with Sentence Transformers v5.4 (#1) 3 months ago
  • config.json
    1.59 kB
    Upload 8 files 4 months ago
  • config_sentence_transformers.json
    325 Bytes
    Integrate with Sentence Transformers v5.4 (#1) 3 months ago
  • generation_config.json
    213 Bytes
    Upload 8 files 4 months ago
  • model.safetensors
    8.82 GB
    xet
    Upload 8 files 4 months ago
  • modules.json
    280 Bytes
    Integrate with Sentence Transformers v5.4 (#1) 3 months ago
  • sentence_bert_config.json
    362 Bytes
    Integrate with Sentence Transformers v5.4 (#1) 3 months ago
  • special_tokens_map.json
    613 Bytes
    Integrate with Sentence Transformers v5.4 (#1) 3 months ago
  • tokenizer.json
    11.4 MB
    xet
    Upload 8 files 4 months ago
  • tokenizer_config.json
    348 Bytes
    Upload 8 files 4 months ago
  • trainer_state.json
    20.6 kB
    Upload 8 files 4 months ago
  • training_args.bin
    6.52 kB
    xet
    Upload 8 files 4 months ago