Text Ranking
Transformers
Safetensors
sentence-transformers
Thai
bert
text-classification
text-embeddings-inference
Instructions to use Pongsasit/mod-th-cross-encoder-minilm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pongsasit/mod-th-cross-encoder-minilm with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Pongsasit/mod-th-cross-encoder-minilm") model = AutoModelForSequenceClassification.from_pretrained("Pongsasit/mod-th-cross-encoder-minilm") - sentence-transformers
How to use Pongsasit/mod-th-cross-encoder-minilm with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("Pongsasit/mod-th-cross-encoder-minilm") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Model Card for Model ID
Model Details
Model Description
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: Pongsasit Thongpramoon
- Model type: Cross Encoder
- Language(s) (NLP): Thai
- Finetuned from model: cross-encoder/ms-marco-MiniLM-L-12-v2
How to Get Started with the Model
Use the code below to get started with the model.
from sentence_transformers.cross_encoder import CrossEncoder
model = CrossEncoder("Pongsasit/mod-th-cross-encoder-minilm")
th_question = "การใช้สีส่งผลต่ออารมณ์ของภาพวาดอย่างไร"
th_answer1 = "เมื่อศิลปินเลือกเฉดสีที่แตกต่างกัน มันก็เหมือนกับการเลือกความรู้สึกที่แตกต่างกันให้กับภาพของพวกเขา!"
th_answer2 = "ทำไมสิ่งเล็กๆ น้อยๆ บางครั้งจึงดูเหมือนอยู่สองแห่งในเวลาเดียวกัน? เหมือนพยายามจับผีเล่นซ่อนหา!"
en_question = "How does the use of color contribute to the emotional impact of a painting?"
en_answer1 = "When an artist picks different shades, it's like picking different feelings for their picture!"
en_answer2 = "Why do really tiny things sometimes seem to be in two places at the same time? It's like trying to catch a sneaky ghost playing hide and seek!"
th_scores = model.predict([[th_question, th_answer1], [th_question, th_answer2]])
en_scores = model.predict([[en_question, en_answer1], [en_question, en_answer2]])
- Downloads last month
- 8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support