Instructions to use DataScience-UIBK/OBLIQ-IR-3B-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use DataScience-UIBK/OBLIQ-IR-3B-LoRA with PEFT:
Task type is invalid.
- sentence-transformers
How to use DataScience-UIBK/OBLIQ-IR-3B-LoRA with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DataScience-UIBK/OBLIQ-IR-3B-LoRA") 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
OBLIQ-IR-3B-LoRA
The LoRA adapter for OBLIQ-IR, a 3B single-vector dense retriever for oblique retrieval — queries whose relevance is decided by a latent attribute (an implicit stance, an abstract proof strategy, an authorial style, a lossy recollection of a rhetorical exchange) that has little or no surface expression in the document.
From OBLIQ-IR: Training a Dense Retriever for Oblique Queries (EMNLP 2026).
This is the reference checkpoint. It regenerates the paper's published rankings bit-for-bit — identical documents, identical order, identical cosine scores. Use it whenever exactness matters. If you would rather not deal with a base model and PEFT, the merged full-weight version is at
DataScience-UIBK/OBLIQ-IR-3B(see the note at the bottom — folding into bf16 is very slightly lossy).
⚠️ 48 MB adapter only. You also need the base model
nvidia/llama-nv-embed-reasoning-3b;
SentenceTransformer fetches and wires it up for you.
| 🤖 Merged full model (no base needed) | DataScience-UIBK/OBLIQ-IR-3B |
| 📊 Training data, runs, results | DataScience-UIBK/OBLIQ-IR-Data |
| 💻 Code | github.com/DataScienceUIBK/obliq-ir |
| 🧪 Benchmark | dianetc/OBLIQ-Bench |
Results
NDCG@10 (Gold) on OBLIQ-Bench. Bold = best non-oracle.
| Pipeline | Writing | Math | Congress | |
|---|---|---|---|---|
| BM25 | .077 | .022 | .000 | .000 |
| Qwen3-Embed-4B | .033 | .095 | .032 | .040 |
| Gemini-2-Embedding | .164 | .144 | .068 | .059 |
| GPT-5.2 Multi-Hop Agent | .061 | .161 | .141 | .183 |
| OBLIQ-IR (no distillation) | .096 | .148 | .158 | .196 |
| OBLIQ-IR (dense, this model) | .211 | .140 | .151 | .187 |
| OBLIQ-IR (full = dense + reranker) | .211 | .171 | .177 | .281 |
| Oracle GPT-5.2 Tournament (not attainable) | .515 | .279 | .331 | .913 |
"Full" applies TourRank (Y=5, Qwen3.6-27B) on Math/Twitter/Congress; for Writing the selected policy is the identity, so the numbers above are what this checkpoint produces on its own for Writing.
Gains are large and significant on Writing (+0.116) and Congress (+0.085, both p<0.001), and marginal on Math (p=0.08) and Twitter (p=0.06). We do not claim the fifth OBLIQ-Bench task, WildChat-Errors.
Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("DataScience-UIBK/OBLIQ-IR-3B-LoRA", trust_remote_code=True)
queries = ["A passage written with the same restless, aphoristic voice as this one."]
documents = ["...your corpus documents..."]
q = model.encode(["query: " + x for x in queries])
d = model.encode(["passage: " + x for x in documents])
scores = model.similarity(q, d)
The query: and passage: prefixes are required — the model was trained with them, and dropping
them changes the embedding. Queries take no other prefix.
Note on task instructions. The training file carries a per-task instruction string alongside each query, but the training script consumes only the query text, and the evaluation that produced every number in the paper encodes the raw benchmark query with the
query:prefix alone. Do not prepend a task instruction — the released checkpoint was neither trained nor evaluated with one, so adding one moves you off-distribution. Task identity is carried by the mixture the model was trained on, not by a runtime prefix.
Truncate documents at 1024 tokens and queries at 256 to match the paper's evaluation:
model.max_seq_length = 1024 # documents
d = model.encode(["passage: " + x for x in documents])
model.max_seq_length = 256 # queries
q = model.encode(["query: " + x for x in queries])
How it was trained
Two training-time signals, mixed into one encoder shared by all tasks:
- Per-mechanism synthetic queries. A document is read by an instruction LM (Qwen3.6-27B) which first writes a description of the task's latent attribute, then writes a query through one of three lenses matched to the OBLIQ query mechanisms — descriptive (Twitter), analogue (Math, Writing), or tip-of-the-tongue (Congress). Four BM25 hard negatives are mined per query.
- kNN-graph distillation from a frozen authorship encoder (writing task only). A frozen authorship encoder (Rivera-Soto et al., 2021) defines a k=3 nearest-neighbour graph over the writing corpus; its edges become anchor–positive training pairs. Only the topology is used — the teacher's similarity scores are discarded. This transfers a style-versus-topic inductive bias that no topical lens can express, lifting Writing from .096 to .211.
Neither stage touches the OBLIQ qrels.
| Setting | Value |
|---|---|
| Base model | nvidia/llama-nv-embed-reasoning-3b (Llama-3.2-3B bi-encoder) |
| Adapter | LoRA r=16, α=32, dropout 0.05, on q/k/v/o/gate/up/down (~24M params) |
| Pooling | mean over token embeddings, then L2 normalise → 3072-dim |
| Loss | CachedMultipleNegativesRankingLoss (Sentence-Transformers) |
| Temperature | τ = 1/0.02 |
| LR / schedule | 2e-4, 3% warmup, linear decay |
| Batch | 4 per device × 40 GPUs × 2 grad-accum = 320 anchors |
| Seq length | 1024 (queries truncated to 256 when encoding for evaluation) |
| Epochs / hardware | 1 epoch, 40× H100, ~50 min |
| Training rows | 154,361 (= 149,361 synthetic + 5,000 authorship kNN pairs) |
Reproducibility — verified
Running the public GitHub code against this adapter pulled straight from the Hub reproduces the paper exactly:
| this adapter, from the Hub | paper | |
|---|---|---|
| Math NDCG@10 | 0.1402566065886442 | 0.1402566065886442 |
| identical top-100 order | 151/151 queries | — |
| bit-identical cosine scores | 151/151 queries | — |
| max score difference | 0.00e+00 | — |
All ten Math metrics (NDCG@10/50 and Recall@10/50/100, Gold and Pooled) match to 0.0e+00.
On identical hardware the two short-document tasks (Math, Twitter) come back bit-for-bit. The two long-document tasks sit at the 1024-token cap and accumulate more bf16 rounding across GPU generations, so they reproduce to within 0.0006 NDCG@10 (Writing 0.00015, Congress 0.00056) rather than exactly.
Merged vs. adapter
The merged repository folds W + BA·scaling into bf16 weights. bf16 carries only ~3 significant digits, so
folding is slightly lossy and the merged model does not match this adapter bit-for-bit: Math NDCG@10
0.1407 vs 0.1403, Twitter 0.1516 vs 0.1508. Top-1 still agrees on 151/151 Math and 275/281 Twitter queries.
The gap is far below run-to-run variance but can move the third decimal — which is why this adapter, not the
merged model, is the reference for reproducing the paper.
Licence and intended use
The adapter weights are released under CC BY-NC 4.0. Use also requires accepting the terms of the base
model nvidia/llama-nv-embed-reasoning-3b and of Llama-3.2, which it derives from. Note that NVIDIA's
repository is internally inconsistent about its licence (its LICENSE file states CC BY-NC 4.0 while its
README front-matter states CC BY 4.0); check with NVIDIA before any commercial use.
Intended use is research on latent-attribute retrieval. Please note that retrieval by authorial fingerprint can be used to link texts to an author across topics and venues, and therefore to deanonymise writers who rely on pseudonymity. The authorship encoder we distil is trained on Reddit data, and because style correlates with demography and dialect, the distilled neighbourhood structure may carry those correlates. We did not audit for this. Any deployment over people's writing should.
Citation
@inproceedings{abdalla2026obliqir,
title = {{OBLIQ-IR}: Training a Dense Retriever for Oblique Queries},
author = {Abdalla, Mahmoud and Abdallah, Abdelrahman and Sedek, Shaimaa and Jatowt, Adam},
booktitle = {Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing},
year = {2026}
}
- Downloads last month
- 13
Model tree for DataScience-UIBK/OBLIQ-IR-3B-LoRA
Base model
meta-llama/Llama-3.2-3B