mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
Make Llama Guard 1B the default
This commit is contained in:
parent
cc5029a716
commit
4a75d922a9
5 changed files with 14 additions and 10 deletions
|
@ -59,7 +59,7 @@ async def run_main(host: str, port: int, stream: bool):
|
|||
response = await client.get_model("Meta-Llama3.1-8B-Instruct")
|
||||
cprint(f"get_model response={response}", "blue")
|
||||
|
||||
response = await client.get_model("Llama-Guard-3-8B")
|
||||
response = await client.get_model("Llama-Guard-3-1B")
|
||||
cprint(f"get_model response={response}", "red")
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class MetaReferenceShieldType(Enum):
|
|||
|
||||
|
||||
class LlamaGuardShieldConfig(BaseModel):
|
||||
model: str = "Llama-Guard-3-8B"
|
||||
model: str = "Llama-Guard-3-1B"
|
||||
excluded_categories: List[str] = []
|
||||
disable_input_check: bool = False
|
||||
disable_output_check: bool = False
|
||||
|
@ -33,7 +33,11 @@ class LlamaGuardShieldConfig(BaseModel):
|
|||
for m in safety_models()
|
||||
if (
|
||||
m.core_model_id
|
||||
in {CoreModelId.llama_guard_3_8b, CoreModelId.llama_guard_3_11b_vision}
|
||||
in {
|
||||
CoreModelId.llama_guard_3_8b,
|
||||
CoreModelId.llama_guard_3_1b,
|
||||
CoreModelId.llama_guard_3_11b_vision,
|
||||
}
|
||||
)
|
||||
]
|
||||
if model not in permitted_models:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue