quora-competitions/quora
Updated • 1.45k • 23
How to use Isezerano/paraphrase_detection_bert with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Isezerano/paraphrase_detection_bert") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Isezerano/paraphrase_detection_bert")
model = AutoModelForSequenceClassification.from_pretrained("Isezerano/paraphrase_detection_bert", device_map="auto")# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Isezerano/paraphrase_detection_bert")
model = AutoModelForSequenceClassification.from_pretrained("Isezerano/paraphrase_detection_bert", device_map="auto")
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Isezerano/paraphrase_detection_bert")