Run this model with HF Jobs

Run TIGER-Lab/general-verifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/TIGER-Lab/general-verifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/TIGER-Lab/general-verifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

This is the verifier we used in General Reasoner.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Replace with your model path
model_path = "TIGER-Lab/general-verifier"

# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.float16).cuda()

# Example inputs
question = "Factor the following quadratic: $3 x^3+\frac{69 x^2}{2}-36 x-810$"
ground_truth = "\\frac{3(2x-9)(x+6)(x+10)}{2}"
student_answer = "\\frac{3}{2}(x+6)(2x-9)(x+10)"

# Create prompt
prompt = (
    f"User: ### Question: {question}\n\n"
    f"### Ground Truth Answer: {ground_truth}\n\n"
    f"### Student Answer: {student_answer}\n\n"
    "For the above question, please verify if the student's answer is equivalent to the ground truth answer.\n"
    "Do not solve the question by yourself; just check if the student's answer is equivalent to the ground truth answer.\n"
    "If the student's answer is correct, output \"Final Decision: Yes\". If the student's answer is incorrect, output \"Final Decision: No\". Assistant:"
)

# Tokenize and generate
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
    **inputs,
    max_new_tokens=1024,
    temperature=0.0,
    do_sample=False
)

# Decode and print output
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
667
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support

Model tree for TIGER-Lab/general-verifier

Finetuned
(336)
this model
Quantizations
2 models

Collection including TIGER-Lab/general-verifier