Skip to content

Commit 2668bf4

Browse files
tryrobboThomas Robinson
andauthored
Address feedback not possible before launch in LG3 recipe and dataset file (meta-llama#606)
Co-authored-by: Thomas Robinson <[email protected]>
1 parent 01a20d1 commit 2668bf4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

recipes/responsible_ai/llama_guard/llama_guard_customization_via_prompting_and_fine_tuning.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,12 @@
499499
"\n",
500500
"def llm_eval(prompts: List[Tuple[List[str], AgentType]],\n",
501501
" 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",
503503
" load_in_8bit: bool = True, \n",
504504
" load_in_4bit: bool = False, \n",
505505
" logprobs: bool = False) -> Tuple[List[str], Optional[List[List[Tuple[int, float]]]]]:\n",
506506
" \"\"\"\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",
508508
"\n",
509509
" This function loads Llama Guard from Hugging Face or a local model and \n",
510510
" executes the predefined prompts in the script to showcase how to do inference with Llama Guard.\n",
@@ -515,9 +515,9 @@
515515
" List of Tuples containing all the conversations to evaluate. The tuple contains a list of messages that configure a conversation and a role.\n",
516516
" model_id : str \n",
517517
" 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",
519519
" 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",
521521
" load_in_8bit : bool\n",
522522
" defines if the model should be loaded in 8 bit. Uses BitsAndBytes. Default True \n",
523523
" load_in_4bit : bool\n",

src/llama_recipes/datasets/toxicchat_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Meta Platforms, Inc. and affiliates.
2-
# This software may be used and distributed according to the terms of the Llama 2 Community License Agreement.
2+
# This software may be used and distributed according to the terms of the Llama 3.1 Community License Agreement.
33

4-
# For dataset details visit: https://huggingface.co/datasets/samsum
4+
# For dataset details visit: https://huggingface.co/datasets/lmsys/toxic-chat
55

66
import copy
77
import datasets

0 commit comments

Comments
 (0)