Text Classification
Transformers
Safetensors
English
Ukrainian
qwen3_5
image-text-to-text
openjudgement
judgment
classification
structured-output
preview
custom-code
Instructions to use kitaniai/OpenJudgement-4B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kitaniai/OpenJudgement-4B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="kitaniai/OpenJudgement-4B-Preview")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("kitaniai/OpenJudgement-4B-Preview") model = AutoModelForMultimodalLM.from_pretrained("kitaniai/OpenJudgement-4B-Preview", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 835 Bytes
eb2384f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Run all three judgment types. Execute from anywhere after installing requirements."""
import argparse
import json
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
from openjudgement import OpenJudgement
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--model', default=str(ROOT))
parser.add_argument('--device', default='cuda')
parser.add_argument('--request', type=Path, default=ROOT/'examples/request.json')
args = parser.parse_args()
request = json.loads(args.request.read_text())
judge = OpenJudgement.from_pretrained(args.model, device=args.device)
result = judge.system_one(request['state'], request['questions'])
print(json.dumps(result, indent=2, ensure_ascii=False))
if __name__ == '__main__':
main()
|