Skip to content

Conversation

anilaltuner
Copy link
Contributor

#153

Transformers library added to llm as judge.

Only need is when the JudgeLLM class called, change judge model with transformers.

Ex.

JudgeLLM(
            judge_model_name="microsoft/Phi-3-mini-128k-instruct",
            template_path="src/lighteval/tasks/extended/mt_bench/judge_prompts.jsonl",
            multi_turn=True,
        )

@clefourrier
Copy link
Member

Hi! Thanks for this PR! Can you fix your PR so that tests are passing?

@anilaltuner
Copy link
Contributor Author

Yes, I'll fix on a short time but Run tests gives error for

ERROR tests/test_main.py - huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/datasets/gsm8k/paths-info/e53f048856ff4f594e959d75785d2c2d37b678ee (Request ID: Root=1-6630cc27-222f10cf5f5b028e1ffcebcc;677b1d40-c6e5-4fc5-9718-6441f20a365c)

Is it about huggingface hub?

@clefourrier
Copy link
Member

Hm, let me re-run your tests, maybe you committed when the hub was down

@anilaltuner
Copy link
Contributor Author

Thanks, I fixed code quality and pushed. We can re-run whenever you want

@clefourrier
Copy link
Member

cc @NathanHB if you have the time to do a more in depth review

self.generation_args = {
"max_new_tokens": 500,
"return_full_text": False,
"temperature": temperature,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temperature is not needed if do_sample is set to False

def __init__(self, judge_model_name: str, template_path: str, multi_turn: bool = False):
if judge_model_name not in self.available_models:
raise ValueError(f"{judge_model_name} not in available models for llm as a judge metric")
judge_type = "openai"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wouldn't work, if we pass in gpt-12 for example, it will set the judge type to openai and continue, only to fail later because gpt-12 does not exist in the openai api

@NathanHB
Copy link
Member

hey ! thanks for the fix, I will have the bandwitdh to test next week and will merge asap :)

@NathanHB
Copy link
Member

Hi ! Closing for inactivity. But this PR was used as the base for #223 thanks !

@NathanHB NathanHB closed this Jul 31, 2024
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.

3 participants