Instructions to use rbhatia46/harrier-270m-lora-attn-downproj-qwen3-oracle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use rbhatia46/harrier-270m-lora-attn-downproj-qwen3-oracle with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("rbhatia46/harrier-270m-lora-attn-downproj-qwen3-oracle") 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
Harrier-270m Fine-tuned β Q2_elite_r8_lr5e6_downonly
Fine-tuned from microsoft/harrier-oss-v1-270m using LoRA on MS MARCO hard negatives mined with Qwen3-Reranker-8B as oracle scorer.
Description
Harrier-270m fine-tuned with LoRA on attention+down_proj layers. Hard negatives mined from MS MARCO 8.8M via Qwen3-Reranker-8B oracle scoring. Elite filter: negatives scored 0.01-0.05 (genuine confusion zone). Last-token pooling. 268M params.
Usage
from transformers import AutoTokenizer, AutoModel
import torch
import torch.nn.functional as F
model = AutoModel.from_pretrained('rbhatia46/harrier-270m-lora-attn-downproj-qwen3-oracle', torch_dtype=torch.bfloat16)
tok = AutoTokenizer.from_pretrained('rbhatia46/harrier-270m-lora-attn-downproj-qwen3-oracle')
QUERY_INST = 'Given a web search query, retrieve relevant passages that answer the query'
def encode(texts, is_query=False):
if is_query:
texts = [f'Instruct: {QUERY_INST}\nQuery: {t}' for t in texts]
enc = tok(texts, max_length=512, padding=True, truncation=True, return_tensors='pt')
with torch.no_grad():
out = model(**enc)
# Last token pooling
seq_lens = enc['attention_mask'].sum(dim=1) - 1
emb = out.last_hidden_state[torch.arange(len(seq_lens)), seq_lens]
return F.normalize(emb.float(), p=2, dim=-1)
Training
- Base model: Harrier-270m (268M parameters)
- Training data: MS MARCO 8.8M corpus, hard negatives mined via Qwen3-Reranker-8B
- Adaptation: LoRA (r=8, alpha=16) on attention + down_proj layers
- Loss: InfoNCE with temperature=0.02
- Downloads last month
- 3
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support
Model tree for rbhatia46/harrier-270m-lora-attn-downproj-qwen3-oracle
Base model
microsoft/harrier-oss-v1-270m