Skip to content

Add warning about --dtype arg in reference_hf.py. #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aw632
Copy link

@aw632 aw632 commented Mar 25, 2025

When I was following this guide, I noticed that these commands gave different outputs:

python3 /sgl-workspace/sglang/python/sglang/bench_one_batch.py --correct --model meta-llama/Llama-3.2-3B-Instruct
python3 /sgl-workspace/sglang/scripts/playground/reference_hf.py --model-path meta-llama/Llama-3.2-3B-Instruct --model-type text

It turns out that reference_hf.py was autocasting to float16 silently, which was causing this issue. I added this comment in case others come across the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant