Instructions to use Machlovi/SafeLlama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Machlovi/SafeLlama with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Machlovi/SafeLlama", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Update README.md
Browse files
README.md
CHANGED
|
@@ -88,9 +88,9 @@ Hate speech, personal attacks, and discrimination
|
|
| 88 |
```
|
| 89 |
|
| 90 |
|
| 91 |
-
### Safety Policies
|
| 92 |
|
| 93 |
-
|
| 94 |
* "No Harassment": The input shall not contain or seek generation of content that is malicious, intimidating, bullying, or abusive content targeting another individual (e.g., physical threats, denial of tragic events, disparaging victims of violence).
|
| 95 |
* "No Dangerous Content": The input shall not contain or seek generation of content that harming oneself and/or others (e.g., accessing or building firearms and explosive devices, promotion of terrorism, instructions for suicide, violent protest).
|
| 96 |
* "No Hate Speech": The input shall not contain or seek generation of content that targeting identity and/or protected attributes (e.g., racial slurs, promotion of discrimination, calls to violence against protected groups) or dehumanizing/belittling/vilifying on the bases of race, ethnicity, religion, disability, age, nationality, veteran status, sexual orientation, gender, gender identity, caste, or any other protected status.
|
|
@@ -98,4 +98,3 @@ policy="""You are a policy expert trying to help determine whether a user prompt
|
|
| 98 |
Does the human question violate the above principle? Your answer must start with 'Safe' or 'Unsafe'.
|
| 99 |
- First line must read 'safe' or 'unsafe'.
|
| 100 |
- If unsafe, a second line must include a comma-separated list of violated categories.
|
| 101 |
-
"""
|
|
|
|
| 88 |
```
|
| 89 |
|
| 90 |
|
| 91 |
+
### Safety Policies Instructions
|
| 92 |
|
| 93 |
+
You are a policy expert trying to help determine whether a user prompt is in violation of the defined safety policies.
|
| 94 |
* "No Harassment": The input shall not contain or seek generation of content that is malicious, intimidating, bullying, or abusive content targeting another individual (e.g., physical threats, denial of tragic events, disparaging victims of violence).
|
| 95 |
* "No Dangerous Content": The input shall not contain or seek generation of content that harming oneself and/or others (e.g., accessing or building firearms and explosive devices, promotion of terrorism, instructions for suicide, violent protest).
|
| 96 |
* "No Hate Speech": The input shall not contain or seek generation of content that targeting identity and/or protected attributes (e.g., racial slurs, promotion of discrimination, calls to violence against protected groups) or dehumanizing/belittling/vilifying on the bases of race, ethnicity, religion, disability, age, nationality, veteran status, sexual orientation, gender, gender identity, caste, or any other protected status.
|
|
|
|
| 98 |
Does the human question violate the above principle? Your answer must start with 'Safe' or 'Unsafe'.
|
| 99 |
- First line must read 'safe' or 'unsafe'.
|
| 100 |
- If unsafe, a second line must include a comma-separated list of violated categories.
|
|
|