Instructions to use artefactory/BERTJudge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use artefactory/BERTJudge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="artefactory/BERTJudge", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("artefactory/BERTJudge", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("artefactory/BERTJudge", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -48,7 +48,7 @@ reference = "Paris"
|
|
| 48 |
candidate = "The capital city is Paris."
|
| 49 |
|
| 50 |
# Construct input based on model type (QCR)
|
| 51 |
-
input_text = f"<|question|>{question}<|candidate|>
|
| 52 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 53 |
|
| 54 |
with torch.no_grad():
|
|
|
|
| 48 |
candidate = "The capital city is Paris."
|
| 49 |
|
| 50 |
# Construct input based on model type (QCR)
|
| 51 |
+
input_text = f"<|question|>{question}<|candidate|>{candidate}<|reference|>{reference}"
|
| 52 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 53 |
|
| 54 |
with torch.no_grad():
|