Run this model with HF Jobs
Run opencompass/CompassJudger-1-14B-Instruct 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 and TRL to fine-tune https://huggingface.co/opencompass/CompassJudger-1-14B-Instruct. 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/opencompass/CompassJudger-1-14B-Instruct 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.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/opencompass/CompassJudger-1-14B-Instruct. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/opencompass/CompassJudger-1-14B-Instruct. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use opencompass/CompassJudger-1-14B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opencompass/CompassJudger-1-14B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opencompass/CompassJudger-1-14B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("opencompass/CompassJudger-1-14B-Instruct") model = AutoModelForCausalLM.from_pretrained("opencompass/CompassJudger-1-14B-Instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opencompass/CompassJudger-1-14B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opencompass/CompassJudger-1-14B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opencompass/CompassJudger-1-14B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/opencompass/CompassJudger-1-14B-Instruct
- SGLang
How to use opencompass/CompassJudger-1-14B-Instruct 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 "opencompass/CompassJudger-1-14B-Instruct" \ --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": "opencompass/CompassJudger-1-14B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "opencompass/CompassJudger-1-14B-Instruct" \ --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": "opencompass/CompassJudger-1-14B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use opencompass/CompassJudger-1-14B-Instruct with Docker Model Runner:
docker model run hf.co/opencompass/CompassJudger-1-14B-Instruct
Update README.md
Browse files5 unmodified lines678910111214 unmodified lines2728293031323329 unmodified lines63646566676869103 unmodified lines17317417517617717817944 unmodified lines22422522622722822923023121 unmodified lines2532542552562572582592602612622632642653 unmodified lines2692702712725 unmodified lines# CompassJudger-1<p align="center">🤗 <a href="https://huggingface.co/opencompass">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/organization/opencompass">ModelScope</a>   |    📑 <a href="">Paper</a>   <br></p>14 unmodified lines```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizermodel_name = "opencompass/CompassJudger-1"model = AutoModelForCausalLM.from_pretrained(model_name,29 unmodified linesWe also provide some examples for different usage situations:### Gneral Chat```**Input**: Hello, can you help me to judge something?103 unmodified linespip install -e .python run.py configs/eval_judgerbench.py --mode all --reuse latest```## Use CompassJudger-1 to Test Subjective Datasets in OpenCompass44 unmodified linesjudge_models = [dict(dict(type=TurboMindModelwithChatTemplate,abbr='CompassJudger-1-7B,path='Opencompass/CompassJudger-1-7B',engine_config=dict(session_len=16384, max_batch_size=16, tp=1),gen_config=dict(top_k=1, temperature=1e-6, top_p=0.9, max_new_tokens=2048),max_seq_len=16384,21 unmodified linesTo facilitate better comparisons within the community, we have tested the subjective performance of some models using CompassJudger-1.## Citation```bib@article{cao2024compass,title={CompassJudger-1: All-in-one Judge Model Helps Model Evaluation and Evolution},author={Maosong Cao, Alexander Lam, Haodong Duan, Hongwei Liu, Songyang Zhang, Kai Chen},journal={arXiv preprint arXiv:2410.xxxxxx},year={2024}}```3 unmodified lines- https://github.com/open-compass/opencompass- https://github.com/InternLM/InternLM- https://github.com/QwenLM/Qwen2.5- https://github.com/InternLM/xtuner5 unmodified lines678910111214 unmodified lines2728293031323329 unmodified lines63646566676869103 unmodified lines17317417517617717817918018144 unmodified lines22622722822923023123223321 unmodified lines2552562572582592602612622632642652662672682692702713 unmodified lines2752762772785 unmodified lines# CompassJudger-1<p align="center">🤗 <a href="https://huggingface.co/opencompass">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/organization/opencompass">ModelScope</a>   |    📑 <a href="https://arxiv.org/pdf/2410.16256">Paper</a>    |    🎖️ <a href="https://huggingface.co/spaces/opencompass/judgerbench_leaderboard">Leaderboard</a>   <br></p>14 unmodified lines```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizermodel_name = "opencompass/CompassJudger-1-7B-Instruct"model = AutoModelForCausalLM.from_pretrained(model_name,29 unmodified linesWe also provide some examples for different usage situations:### General Chat```**Input**: Hello, can you help me to judge something?103 unmodified linespip install -e .python run.py configs/eval_judgerbench.py --mode all --reuse latest```We also provided a leaderboard for JudgerBench: https://huggingface.co/spaces/opencompass/judgerbench_leaderboardIf you want to add your model to this leaderboard, welcome to add an issue in this Repository.## Use CompassJudger-1 to Test Subjective Datasets in OpenCompass44 unmodified linesjudge_models = [dict(dict(type=TurboMindModelwithChatTemplate,abbr='CompassJudger-1-7B-Instruct',path='opencompass/CompassJudger-1-7B-Instruct',engine_config=dict(session_len=16384, max_batch_size=16, tp=1),gen_config=dict(top_k=1, temperature=1e-6, top_p=0.9, max_new_tokens=2048),max_seq_len=16384,21 unmodified linesTo facilitate better comparisons within the community, we have tested the subjective performance of some models using CompassJudger-1.See in: [https://huggingface.co/spaces/opencompass/judgerbench_leaderboard](https://huggingface.co/spaces/opencompass/compassjudger_subj_eval_leaderboard)If you want to add your model to this leaderboard, welcome to add an issue in this Repository.## Citation```bib@article{cao2024compass,title={CompassJudger-1: All-in-one Judge Model Helps Model Evaluation and Evolution},author={Maosong Cao, Alexander Lam, Haodong Duan, Hongwei Liu, Songyang Zhang, Kai Chen},journal={arXiv preprint arXiv:2410.16256},year={2024}}```3 unmodified lines- https://github.com/open-compass/opencompass- https://github.com/InternLM/InternLM- https://github.com/QwenLM/Qwen2.5- https://github.com/InternLM/xtuner
README.md+13-7