Downloads · 30 days
52
14% of all-time downloads
Labradorlabs/bsca-bge-micro-v2-contrastive-v14-fresh-clean-v3-eb256-t005-e1-384
bsca-bge-micro-v2-contrastive-v14-fresh-clean-v3-eb256-t005-e1-384 is a feature extraction model from Labradorlabs. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as mit.
BSCA 바이너리↔소스 함수 정렬용 contrastive 임베딩 모델. TaylorAI/bge-micro-v2를 디컴파일 함수와 소스 함수를 같은 공간에 정렬하도록 contrastive 파인튜닝한 v14 챔피언(epoch-1) 체크포인트입니다.
Downloads · 30 days
52
14% of all-time downloads
All-time downloads
371
Public
Parameters
17.4M
208 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt138 MB · 66%
From the Hugging Face model README
BSCA 바이너리↔소스 함수 정렬용 contrastive 임베딩 모델. TaylorAI/bge-micro-v2를
디컴파일 함수와 소스 함수를 같은 공간에 정렬하도록 contrastive 파인튜닝한 v14
챔피언(epoch-1) 체크포인트입니다.
TaylorAI/bge-micro-v2Labradorlabs/bsca-binary-source-aligned-v3-clean-v3 (fingerprint 220d988ac0980dca)bge_v14_fresh_e1_384_vector943346736accac8b)| metric | value |
|---|---|
| source-function MRR | 0.16672 |
| Recall@1 / @10 / @100 / @1000 | 0.133 / 0.250 / 0.342 / 0.392 |
| component MRR | 0.17792 |
| component Recall@1 / @10 / @100 | 0.142 / 0.258 / 0.375 |
epoch-1 → 챔피언 승격 시 source-function MRR +47.7% (relative).
v5:both:lighttraining_state.pt(옵티마이저·스케줄러·RNG 상태)가 포함되어 epoch-2 strict resume가 가능합니다.
import torch, torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer
name = "Labradorlabs/bsca-bge-micro-v2-contrastive-v14-fresh-clean-v3-eb256-t005-e1-384"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModel.from_pretrained(name).eval()
def embed(texts):
enc = tok(texts, padding=True, truncation=True, max_length=384, return_tensors="pt")
with torch.no_grad():
out = model(**enc)
emb = out.last_hidden_state[:, 0] # CLS
return F.normalize(emb, p=2, dim=1)