|
499 | 499 | "\n",
|
500 | 500 | "def llm_eval(prompts: List[Tuple[List[str], AgentType]],\n",
|
501 | 501 | " model_id: str = \"meta-llama/Llama-Guard-3-8B\",\n",
|
502 |
| - " llama_guard_version: LlamaGuardVersion = LlamaGuardVersion.LLAMA_GUARD_2.name, \n", |
| 502 | + " llama_guard_version: LlamaGuardVersion = LlamaGuardVersion.LLAMA_GUARD_3.name, \n", |
503 | 503 | " load_in_8bit: bool = True, \n",
|
504 | 504 | " load_in_4bit: bool = False, \n",
|
505 | 505 | " logprobs: bool = False) -> Tuple[List[str], Optional[List[List[Tuple[int, float]]]]]:\n",
|
506 | 506 | " \"\"\"\n",
|
507 |
| - " Runs Llama Guard inference with HF transformers. Works with Llama Guard 1 or 2\n", |
| 507 | + " Runs Llama Guard inference with HF transformers.\n", |
508 | 508 | "\n",
|
509 | 509 | " This function loads Llama Guard from Hugging Face or a local model and \n",
|
510 | 510 | " executes the predefined prompts in the script to showcase how to do inference with Llama Guard.\n",
|
|
515 | 515 | " List of Tuples containing all the conversations to evaluate. The tuple contains a list of messages that configure a conversation and a role.\n",
|
516 | 516 | " model_id : str \n",
|
517 | 517 | " The ID of the pretrained model to use for generation. This can be either the path to a local folder containing the model files,\n",
|
518 |
| - " or the repository ID of a model hosted on the Hugging Face Hub. Defaults to 'meta-llama/Meta-Llama-Guard-2-8B'.\n", |
| 518 | + " or the repository ID of a model hosted on the Hugging Face Hub. Defaults to 'meta-llama/Meta-Llama-Guard-3-8B'.\n", |
519 | 519 | " llama_guard_version : LlamaGuardVersion\n",
|
520 |
| - " The version of the Llama Guard model to use for formatting prompts. Defaults to LLAMA_GUARD_2.\n", |
| 520 | + " The version of the Llama Guard model to use for formatting prompts. Defaults to 3.\n", |
521 | 521 | " load_in_8bit : bool\n",
|
522 | 522 | " defines if the model should be loaded in 8 bit. Uses BitsAndBytes. Default True \n",
|
523 | 523 | " load_in_4bit : bool\n",
|
|
0 commit comments