Upload folder using huggingface_hub
Browse files- .gitattributes +12 -0
- LlamaGuard-7b-Q2_K.gguf +3 -0
- LlamaGuard-7b-Q3_K_L.gguf +3 -0
- LlamaGuard-7b-Q3_K_M.gguf +3 -0
- LlamaGuard-7b-Q3_K_S.gguf +3 -0
- LlamaGuard-7b-Q4_0.gguf +3 -0
- LlamaGuard-7b-Q4_K_M.gguf +3 -0
- LlamaGuard-7b-Q4_K_S.gguf +3 -0
- LlamaGuard-7b-Q5_0.gguf +3 -0
- LlamaGuard-7b-Q5_K_M.gguf +3 -0
- LlamaGuard-7b-Q5_K_S.gguf +3 -0
- LlamaGuard-7b-Q6_K.gguf +3 -0
- LlamaGuard-7b-Q8_0.gguf +3 -0
- README.md +140 -0
.gitattributes
CHANGED
@@ -33,3 +33,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
LlamaGuard-7b-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
37 |
+
LlamaGuard-7b-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
38 |
+
LlamaGuard-7b-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
39 |
+
LlamaGuard-7b-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
40 |
+
LlamaGuard-7b-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
41 |
+
LlamaGuard-7b-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
42 |
+
LlamaGuard-7b-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
43 |
+
LlamaGuard-7b-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
44 |
+
LlamaGuard-7b-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
45 |
+
LlamaGuard-7b-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
46 |
+
LlamaGuard-7b-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
47 |
+
LlamaGuard-7b-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
LlamaGuard-7b-Q2_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd7591b75a5df0a695dbba79d3e27c9cb761a9021cfbe591fa6524fd5eff81fd
|
3 |
+
size 2532868544
|
LlamaGuard-7b-Q3_K_L.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a2a2d3f9b3c7491c19e82a16c4021c7c893466b046c82b25922885b451dc80a0
|
3 |
+
size 3597115840
|
LlamaGuard-7b-Q3_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e225b3894bebbd4dd84ceb6273fdb803d187babb19d37754f21c52ee25a7f7dc
|
3 |
+
size 3298009536
|
LlamaGuard-7b-Q3_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f230e59234506362c8450c3a6fd3f677adb5c03848521e81f7401936bda0b807
|
3 |
+
size 2948309440
|
LlamaGuard-7b-Q4_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:941236cfe2c3496820dac3a5bd4b45f60506785a9eb876cd6bf1c70161a7e80b
|
3 |
+
size 3825811904
|
LlamaGuard-7b-Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad6b77a50ea3b0f83d72fc65bc328646d1d9abed3b6379ec2c3adfa8d9a934c4
|
3 |
+
size 4081009088
|
LlamaGuard-7b-Q4_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e67ad9c7b965dac26f5eb829e7e0161159dde44d627fbdbc96b357c95a9ec37
|
3 |
+
size 3856744896
|
LlamaGuard-7b-Q5_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ddfffdac5836c03d9525a5263aaebd6be3208a9a59bd7decb8a827aab3bc8964
|
3 |
+
size 4651696576
|
LlamaGuard-7b-Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:23c8f0a15c3b1230635c071dc710a23d2819fe0e162a00812671270ad395ff1d
|
3 |
+
size 4783161792
|
LlamaGuard-7b-Q5_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:89719f76a34b915fbe048a141d9fb0980033663c75abe012052b83aeeb87fb14
|
3 |
+
size 4651696576
|
LlamaGuard-7b-Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a01b391d9423e78b3f04c8503f0f6b4c5ede35283ec843cfc45bec5b95fdb2f0
|
3 |
+
size 5529199040
|
LlamaGuard-7b-Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bef9d0d7333babccf3514b5de7262c72de3d0fdb962ab36923203052d5393db1
|
3 |
+
size 7161094592
|
README.md
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
tags:
|
5 |
+
- pytorch
|
6 |
+
- llama
|
7 |
+
- llama-2
|
8 |
+
- TensorBlock
|
9 |
+
- GGUF
|
10 |
+
license: llama2
|
11 |
+
base_model: llamas-community/LlamaGuard-7b
|
12 |
+
---
|
13 |
+
|
14 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
15 |
+
<img src="https://i.imgur.com/jC7kdl8.jpeg" alt="TensorBlock" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
16 |
+
</div>
|
17 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
18 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
19 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;">
|
20 |
+
Feedback and support: TensorBlock's <a href="https://x.com/tensorblock_aoi">Twitter/X</a>, <a href="https://t.me/TensorBlock">Telegram Group</a> and <a href="https://x.com/tensorblock_aoi">Discord server</a>
|
21 |
+
</p>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
## llamas-community/LlamaGuard-7b - GGUF
|
26 |
+
|
27 |
+
This repo contains GGUF format model files for [llamas-community/LlamaGuard-7b](https://huggingface.co/llamas-community/LlamaGuard-7b).
|
28 |
+
|
29 |
+
The files were quantized using machines provided by [TensorBlock](https://tensorblock.co/), and they are compatible with llama.cpp as of [commit b4242](https://github.com/ggerganov/llama.cpp/commit/a6744e43e80f4be6398fc7733a01642c846dce1d).
|
30 |
+
|
31 |
+
<div style="text-align: left; margin: 20px 0;">
|
32 |
+
<a href="https://tensorblock.co/waitlist/client" style="display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px; font-weight: bold;">
|
33 |
+
Run them on the TensorBlock client using your local machine ↗
|
34 |
+
</a>
|
35 |
+
</div>
|
36 |
+
|
37 |
+
## Prompt template
|
38 |
+
|
39 |
+
```
|
40 |
+
[INST] Task: Check if there is unsafe content in 'User' messages in conversations according our safety policy with the below categories.
|
41 |
+
|
42 |
+
<BEGIN UNSAFE CONTENT CATEGORIES>
|
43 |
+
O1: Violence and Hate.
|
44 |
+
Should not
|
45 |
+
- Help people plan or engage in violence.
|
46 |
+
- Encourage people to engage in violence.
|
47 |
+
- Express hateful, derogatory, or demeaning sentiments against people based on sensitive personal characteristics like their race, color, religion, national origin, sexual orientation, gender, gender identity, or disability.
|
48 |
+
- Encourage discrimination against people based on those characteristics and should not use slurs or create insults based on those characteristics.
|
49 |
+
Can
|
50 |
+
- Provide information on violence and discrimination.
|
51 |
+
- Discuss the topics of hate and violence, and can discuss historical events involving violence.
|
52 |
+
O2: Sexual Content.
|
53 |
+
Should not
|
54 |
+
- Engage in sexually explicit (i.e., erotic) conversations and should not encourage people to engage in sexual activities.
|
55 |
+
Can
|
56 |
+
- Discuss topics related to sexuality and sexual education.
|
57 |
+
- Provide general information regarding sexual activities.
|
58 |
+
- Provide guidance on topics related to sexual health.
|
59 |
+
O3: Criminal Planning.
|
60 |
+
Should not
|
61 |
+
- Help people plan or engage in criminal activities like theft, kidnapping, or financial crimes, especially when the person indicates that they may act on the information provided to them.
|
62 |
+
- Encourage people to engage in criminal activities or condone criminal behavior.
|
63 |
+
Can
|
64 |
+
- Help people understand how crimes are committed, provided that the response is not so detailed that it could be used to provide a roadmap for future crimes.
|
65 |
+
- Help people understand how systems work that are used to prevent crimes, provided those descriptions do not provide detailed information on how to defeat those systems.
|
66 |
+
O4: Guns and Illegal Weapons.
|
67 |
+
Should not
|
68 |
+
- Assist in the planning or execution of firearm or illegal weapons crimes, especially when the person indicates that they may act on the information provided to them.
|
69 |
+
- Encourage people to engage in firearm or illegal weapons crimes or condone such behavior.
|
70 |
+
Can
|
71 |
+
- Discuss firearms and the arguments for and against firearm ownership.
|
72 |
+
O5: Regulated or Controlled Substances.
|
73 |
+
Should not
|
74 |
+
- Encourage or assist people in the trafficking, consumption, or use of regulated or controlled substances, including but not limited to illegal drugs, tobacco, alcohol, and cannabis.
|
75 |
+
- Assist or encourage people to create such substances when it is illegal to do so.
|
76 |
+
Can
|
77 |
+
- Discuss the use of regulated or controlled substances, and can provide general information on those substances (ex: what their chemical composition is and what their effects are).
|
78 |
+
- Provide information on how those substances are manufactured, provided that the information is not so detailed as to provide step-by-step instructions for their creation.
|
79 |
+
O6: Self-Harm.
|
80 |
+
Should not
|
81 |
+
- Encourage people to harm themselves.
|
82 |
+
- Romanticize or condone self-harm or suicide.
|
83 |
+
- Provide information regarding the methods of suicide or self-harm.
|
84 |
+
- Provide any information or advice, other than information regarding appropriate health resources, to people who express or imply that they wish to harm themselves.
|
85 |
+
Can
|
86 |
+
- Provide general information regarding self-harm and suicide (ex: statistics, the mental health challenges faced by those who take these actions).
|
87 |
+
Should
|
88 |
+
- Provide information regarding appropriate health resources to people who imply or express the desire to harm themselves.
|
89 |
+
<END UNSAFE CONTENT CATEGORIES>
|
90 |
+
|
91 |
+
<BEGIN CONVERSATION>
|
92 |
+
|
93 |
+
User: {prompt}
|
94 |
+
|
95 |
+
<END CONVERSATION>
|
96 |
+
|
97 |
+
Provide your safety assessment for User in the above conversation:
|
98 |
+
- First line must read 'safe' or 'unsafe'.
|
99 |
+
- If unsafe, a second line must include a comma-separated list of violated categories. [/INST]
|
100 |
+
```
|
101 |
+
|
102 |
+
## Model file specification
|
103 |
+
|
104 |
+
| Filename | Quant type | File Size | Description |
|
105 |
+
| -------- | ---------- | --------- | ----------- |
|
106 |
+
| [LlamaGuard-7b-Q2_K.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q2_K.gguf) | Q2_K | 2.533 GB | smallest, significant quality loss - not recommended for most purposes |
|
107 |
+
| [LlamaGuard-7b-Q3_K_S.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q3_K_S.gguf) | Q3_K_S | 2.948 GB | very small, high quality loss |
|
108 |
+
| [LlamaGuard-7b-Q3_K_M.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q3_K_M.gguf) | Q3_K_M | 3.298 GB | very small, high quality loss |
|
109 |
+
| [LlamaGuard-7b-Q3_K_L.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q3_K_L.gguf) | Q3_K_L | 3.597 GB | small, substantial quality loss |
|
110 |
+
| [LlamaGuard-7b-Q4_0.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q4_0.gguf) | Q4_0 | 3.826 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
|
111 |
+
| [LlamaGuard-7b-Q4_K_S.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q4_K_S.gguf) | Q4_K_S | 3.857 GB | small, greater quality loss |
|
112 |
+
| [LlamaGuard-7b-Q4_K_M.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q4_K_M.gguf) | Q4_K_M | 4.081 GB | medium, balanced quality - recommended |
|
113 |
+
| [LlamaGuard-7b-Q5_0.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q5_0.gguf) | Q5_0 | 4.652 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
|
114 |
+
| [LlamaGuard-7b-Q5_K_S.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q5_K_S.gguf) | Q5_K_S | 4.652 GB | large, low quality loss - recommended |
|
115 |
+
| [LlamaGuard-7b-Q5_K_M.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q5_K_M.gguf) | Q5_K_M | 4.783 GB | large, very low quality loss - recommended |
|
116 |
+
| [LlamaGuard-7b-Q6_K.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q6_K.gguf) | Q6_K | 5.529 GB | very large, extremely low quality loss |
|
117 |
+
| [LlamaGuard-7b-Q8_0.gguf](https://huggingface.co/tensorblock/LlamaGuard-7b-GGUF/blob/main/LlamaGuard-7b-Q8_0.gguf) | Q8_0 | 7.161 GB | very large, extremely low quality loss - not recommended |
|
118 |
+
|
119 |
+
|
120 |
+
## Downloading instruction
|
121 |
+
|
122 |
+
### Command line
|
123 |
+
|
124 |
+
Firstly, install Huggingface Client
|
125 |
+
|
126 |
+
```shell
|
127 |
+
pip install -U "huggingface_hub[cli]"
|
128 |
+
```
|
129 |
+
|
130 |
+
Then, downoad the individual model file the a local directory
|
131 |
+
|
132 |
+
```shell
|
133 |
+
huggingface-cli download tensorblock/LlamaGuard-7b-GGUF --include "LlamaGuard-7b-Q2_K.gguf" --local-dir MY_LOCAL_DIR
|
134 |
+
```
|
135 |
+
|
136 |
+
If you wanna download multiple model files with a pattern (e.g., `*Q4_K*gguf`), you can try:
|
137 |
+
|
138 |
+
```shell
|
139 |
+
huggingface-cli download tensorblock/LlamaGuard-7b-GGUF --local-dir MY_LOCAL_DIR --local-dir-use-symlinks False --include='*Q4_K*gguf'
|
140 |
+
```
|