Views
No views yet

use_residual: true in the 2_Dense layer). Mean BRIGHT nDCG@10 improves from 19.00 → 19.61 (+0.61), with the largest gains on the natural-language and formal-math splits that v0 struggled with.use_residual: false in the 2_Dense (768→768) layer from the upstream mixedbread-ai/mxbai-edge-colbert-v0-32m config. That turned out to be a shipped-config bug — the base weights were trained with a residual connection on 2_Dense, but the config flag said otherwise. PyLate respects the flag, so every downstream fine-tune was working with a silently-broken architecture.2_Dense/config.json: "use_residual": true.BrightRetrieval (brute-force MaxSim, query_length=256, document_length=2048).| Split | v0 | v0.1 | Δ v0 | Reason-MCB (150M, paper) |
|---|---|---|---|---|
| aops | 5.05 | 4.89 | −0.16 | 9.17 |
| biology | 32.71 | 33.16 | +0.45 | 33.25 |
| earth_science | 43.88 | 44.28 | +0.40 | 41.02 |
| economics | 18.70 | 20.25 | +1.54 | 24.93 |
| leetcode | 17.67 | 17.40 | −0.28 | 31.07 |
| pony | 20.73 | 22.77 | +2.03 | 8.51 |
| psychology | 22.62 | 24.91 | +2.29 | 30.73 |
| robotics | 18.43 | 18.65 | +0.23 | 21.12 |
| stackoverflow | 16.78 | 16.66 | −0.12 | 20.62 |
| sustainable_living | 20.77 | 20.11 | −0.66 | 20.31 |
| theoremqa_questions | 8.38 | 9.04 | +0.66 | 19.51 |
| theoremqa_theorems | 2.25 | 3.19 | +0.94 | 11.24 |
| Full mean | 19.00 | 19.61 | +0.61 | 22.62 |
2_Dense/use_residual: true patched to match trained weights)hanhainebula/bge-reasoner-data + reasonir/reasonir-data (VL split for warmup, HQ with hard negatives for polish)ColBERT(
(0): Transformer({'max_seq_length': 127, 'do_lower_case': True}) with ModernBertModel
hidden_size=384, num_hidden_layers=10, num_attention_heads=6,
position_embedding_type='sans_pos', max_position_embeddings=7999
(1): Dense(384 → 768, bias=False, use_residual=False)
(2): Dense(768 → 768, bias=False, use_residual=True) # ← THE FIX (was False in v0)
(3): Dense(768 → 128, bias=False, use_residual=False) # widened from 64 → 128 on correct base
)1from pylate import indexes, models, retrieve
2
3model = models.ColBERT(model_name_or_path="DataScience-UIBK/Reason-mxbai-colbert-v0.1-32m")
4
5# Retrieval (see https://lightonai.github.io/pylate/ for full API)
6index = indexes.Voyager(index_folder="pylate-index", index_name="index", override=True)
7docs = ["document 1 text", "document 2 text"]
8doc_embs = model.encode(docs, is_query=False, batch_size=32, show_progress_bar=True)
9index.add_documents(documents_ids=["1","2"], documents_embeddings=doc_embs)
10
11retriever = retrieve.ColBERT(index=index)
12q_embs = model.encode(
13 ["Given a Psychology post, retrieve relevant passages that help answer the post.\nQuery: why do I procrastinate?"],
14 is_query=True,
15)
16scores = retriever.retrieve(queries_embeddings=q_embs, k=10)MultiVectorEncoder:pip install "sentence-transformers>=6.0.0"1from sentence_transformers import MultiVectorEncoder
2
3model = MultiVectorEncoder("DataScience-UIBK/Reason-mxbai-colbert-v0.1-32m")
4
5query = "Given a Psychology post, retrieve relevant passages that help answer the post.\nQuery: why do I procrastinate?"
6documents = [
7 "Procrastination is often driven by difficulty regulating negative emotions around a task, not laziness, since delaying provides short term relief.",
8 "The hippocampus plays a central role in consolidating short term memories into long term storage.",
9]
10
11query_embeddings = model.encode_query(query)
12document_embeddings = model.encode_document(documents)
13print(query_embeddings.shape, document_embeddings[0].shape)
14# torch.Size([28, 128]) torch.Size([31, 128])
15
16# MaxSim late-interaction scoring (higher is more relevant)
17scores = model.similarity(query_embeddings, document_embeddings)
18print(scores)
19# tensor([[25.2429, 24.4635]], device='cuda:0')mxbai-edge-colbert-v0-32m — without that heads-up, v0.1 wouldn't exist.