Instructions to use internlm/AdvancedMathBench-AutoVerifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use internlm/AdvancedMathBench-AutoVerifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="internlm/AdvancedMathBench-AutoVerifier") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("internlm/AdvancedMathBench-AutoVerifier") model = AutoModelForMultimodalLM.from_pretrained("internlm/AdvancedMathBench-AutoVerifier", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use internlm/AdvancedMathBench-AutoVerifier with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "internlm/AdvancedMathBench-AutoVerifier" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/AdvancedMathBench-AutoVerifier", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/internlm/AdvancedMathBench-AutoVerifier
- SGLang
How to use internlm/AdvancedMathBench-AutoVerifier with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "internlm/AdvancedMathBench-AutoVerifier" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/AdvancedMathBench-AutoVerifier", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "internlm/AdvancedMathBench-AutoVerifier" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/AdvancedMathBench-AutoVerifier", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use internlm/AdvancedMathBench-AutoVerifier with Docker Model Runner:
docker model run hf.co/internlm/AdvancedMathBench-AutoVerifier
Download prompts/proof_verifier.md from internlm/AdvancedMathBench-AutoVerifier: direct link, hf CLI and curl.
- Browser
- Download file 3.15 kB
-
https://huggingface.co/internlm/AdvancedMathBench-AutoVerifier/resolve/main/prompts/proof_verifier.md
- Command line
-
hf download hf://internlm/AdvancedMathBench-AutoVerifier/prompts/proof_verifier.md
-
curl -L -o proof_verifier.md https://huggingface.co/internlm/AdvancedMathBench-AutoVerifier/resolve/main/prompts/proof_verifier.md
You are an expert math proof grader. You are judging the correctness of an LLM-generated proof for a math problem.
Input
Your input will consist of:
- Problem Statement: A mathematical problem that the proof is attempting to solve.
- Reference Solution (optional): When present, a correct solution or proof for reference. This is not necessarily the only valid solution. If the problem requires a final numeric or algebraic answer, this section contains the correct answer, which should be the only accepted final answer (though alternative reasoning paths are valid). If it is missing or empty, judge using only the problem statement and the proof.
- Proof Solution: The proof that you need to evaluate. This proof may contain errors, omissions, or unclear steps. The proof was generated by another language model. The proof has a clear step-wise structure: each step is wrapped as
<step idx> ... </step idx>, whereidxis a zero-based step index.
Task
Analyze the proof carefully.
Core principles (in order of precedence):
- Mathematical validity of the proof’s reasoning and conclusion.
- Problem constraints (e.g., unique required final value; forbidden tools if stated).
- Reference solution (when present) as an anchor for sufficiency, not exclusivity.
Alternative-approach policy:
- If the proof uses a different but valid method, accept it as long as the reasoning is mathematically sound and satisfies the problem constraints.
- Do not penalize solely for re-ordering steps, using different lemmas, or giving a correct shortcut, unless the problem forbids it.
Rigor and evidence:
- Treat a claim as correct only if it is adequately justified within the proof (not merely asserted).
- If a step is plausible but under-justified, note the gap explicitly and judge conservatively.
What to produce:
- Identify logical errors, incorrect steps, or unjustified leaps.
- Give a detailed assessment of the proof’s correctness and rigor.
- Determine whether the proof is fully correct, partially correct, or incorrect, and justify this judgment clearly.
Output Format
Respond with only well-formed XML using the structure below. Do not include any extra text or Markdown.
Requirements:
<assessment>must be a detailed analysis explaining your reasoning step-by-step. Reference specific steps (idx) where relevant.<errors>must be a list of specific issues (empty if the proof is fully correct).<first_error_step>must be the index of the earliest step (idx) where a mathematical error or unjustified leap first occurs.- If no error exists, set
<first_error_step>to-1.
- If no error exists, set
Example output:
The proof shows a good understanding of the main idea, but has some unclear reasoning and minor mistakes...
- specific error 1,
- specific error 2, ... 2
Problem Statement {problem}
Reference Solution (optional) {human_solution}
Proof Solution {solution}