Instructions to use bongsoo/albert-small-kor-cross-encoder-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bongsoo/albert-small-kor-cross-encoder-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bongsoo/albert-small-kor-cross-encoder-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("bongsoo/albert-small-kor-cross-encoder-v1") model = AutoModelForSequenceClassification.from_pretrained("bongsoo/albert-small-kor-cross-encoder-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
albert-small-kor-cross-encoder-v1
- albert-small-kor-v1 λͺ¨λΈμ νλ ¨μμΌ cross-encoderλ‘ νμΈνλν λͺ¨λΈ
- This model was trained using SentenceTransformers Cross-Encoder class.
Training
sts(10)-nli(3)-sts(10)-nli(3)-sts(10) νλ ¨ μν΄ (distil νλ ¨ μμ)
STS : seed=111,epoch=10, lr=1e-4, eps=1e-6, warm_step=10%, max_seq_len=128, train_batch=128(small λͺ¨λΈ=32) (albert 13m/7G) νλ ¨μ½λ
NLI νλ ¨ : seed=111,epoch=3, lr=3e-5, eps=1e-8, warm_step=10%, max_seq_len=128, train_batch=64, eval_bath=64(albert 2h/7G) νλ ¨μ½λ
λͺ¨λΈ korsts klue-sts glue(stsb) stsb_multi_mt(en) albert-small-kor-cross-encoder-v1 0.8455 0.8526 0.8513 0.7976 klue-cross-encoder-v1 0.8262 0.8833 0.8512 0.7889 kpf-cross-encoder-v1 0.8799 0.9133 0.8626 0.8027
Usage and Performance
Pre-trained models can be used like this:
from sentence_transformers import CrossEncoder
model = CrossEncoder('bongsoo/albert-small-kor-cross-encoder-v1')
scores = model.predict([('μ€λ λ μ¨κ° μ’λ€', 'μ€λ λ±μ°μ νλ€'), ('μ€λ λ μ¨κ° ν리λ€', 'μ€λ λΉκ° λ΄λ¦°λ€')])
print(scores)
[0.45417202 0.6294121 ]
The model will predict scores for the pairs ('Sentence 1', 'Sentence 2') and ('Sentence 3', 'Sentence 4').
You can use this model also without sentence_transformers and by just using Transformers AutoModel class
- Downloads last month
- 27