Instructions to use KomeijiForce/deberta-v3-base-check-scene with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KomeijiForce/deberta-v3-base-check-scene with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KomeijiForce/deberta-v3-base-check-scene")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KomeijiForce/deberta-v3-base-check-scene") model = AutoModelForSequenceClassification.from_pretrained("KomeijiForce/deberta-v3-base-check-scene") - Notebooks
- Google Colab
- Kaggle
This is a DeBERTa-V3 condition checker distilled from GPT-4.1:
Base model (0.3B, 72% consistency with GPT-4.1): this link
The dataset (20,759 cases) for distillation can be accessed via this link
How to use?
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
# Load Condition Checker
classifier_path = "KomeijiForce/deberta-v3-base-check-scene"
classifier_tokenizer = AutoTokenizer.from_pretrained(classifier_path)
classifier = AutoModelForSequenceClassification.from_pretrained(classifier_path)
# Formalize Condition Checking into Prompt
scene = "Koishi quietly emerged from behind the dense foliage, her sudden appearance catching the corner of Satori's eye as she stepped into the direct line of vision, smiling mischievously."
question = "Does Koishi enter someone's direct field of vision?"
prompt = f'''Scene: {scene}
Question: {question}
Directly answer only yes/no/unknown.'''
# Scoring and Decoding
with torch.no_grad():
logits = classifier(**classifier_tokenizer(prompt, return_tensors="pt")).logits[0]
choice = logits.argmax(-1).item()
answer = [False, None, True][choice]
print(answer)
# True
- Downloads last month
- 5