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") - 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
Availability of MemReranker-0.6B weights for local use?
Hi team β congratulations on MemReranker, the benchmark results
are impressive.
I'm building a local-first personal AI on Apple Silicon and the
0.6B variant would be ideal for my memory budget (Qwen3-14B
already runs locally). I noticed:
β’ MemReranker-4B has downloadable weights here, license
Apache 2.0 β clear and helpful
β’ MemReranker-0.6B is referenced in the paper and on the
Memos API page, but the IAAR-Shanghai/MemReranker-0.6B
HuggingFace page returns "model not found" or auth-gates
when I try to access it
β’ The Memos hosted API isn't an option for me (local-first
privacy constraint)
Two questions:
- Are the 0.6B weights planned for public release on
HuggingFace under the same Apache 2.0 license as 4B? - If not β would you consider it? Many local-AI builders
would benefit from a sub-1GB agent-memory reranker, and
it would significantly expand MemReranker adoption beyond
teams that can spare ~10GB for the 4B variant.
Either way, thank you for the work and for open-sourcing 4B.
β Chirag M