Instructions to use Gertlek/LLaDA-Guard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Gertlek/LLaDA-Guard with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Add MIT license and drop Guard0 naming
Browse files- LICENSE +21 -0
- README.md +1 -0
- llada_guard_infer/infer.py +1 -1
- pyproject.toml +1 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Gert Lek
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
---
|
| 2 |
base_model: GSAI-ML/LLaDA-8B-Instruct
|
| 3 |
library_name: peft
|
|
|
|
| 4 |
tags:
|
| 5 |
- safety
|
| 6 |
- moderation
|
|
|
|
| 1 |
---
|
| 2 |
base_model: GSAI-ML/LLaDA-8B-Instruct
|
| 3 |
library_name: peft
|
| 4 |
+
license: mit
|
| 5 |
tags:
|
| 6 |
- safety
|
| 7 |
- moderation
|
llada_guard_infer/infer.py
CHANGED
|
@@ -170,7 +170,7 @@ def score_optimized_3x015(
|
|
| 170 |
|
| 171 |
def main() -> None:
|
| 172 |
parser = argparse.ArgumentParser(
|
| 173 |
-
description="Score a prompt or prompt-response pair with LLaDA-
|
| 174 |
)
|
| 175 |
parser.add_argument("--checkpoint", default=DEFAULT_CHECKPOINT)
|
| 176 |
parser.add_argument("--base-model", default=DEFAULT_BASE_MODEL)
|
|
|
|
| 170 |
|
| 171 |
def main() -> None:
|
| 172 |
parser = argparse.ArgumentParser(
|
| 173 |
+
description="Score a prompt or prompt-response pair with LLaDA-Guard.",
|
| 174 |
)
|
| 175 |
parser.add_argument("--checkpoint", default=DEFAULT_CHECKPOINT)
|
| 176 |
parser.add_argument("--base-model", default=DEFAULT_BASE_MODEL)
|
pyproject.toml
CHANGED
|
@@ -7,6 +7,7 @@ name = "llada-guard"
|
|
| 7 |
version = "0.1.0"
|
| 8 |
description = "Safety content classifier based on LLaDA diffusion language model"
|
| 9 |
requires-python = ">=3.10"
|
|
|
|
| 10 |
dependencies = [
|
| 11 |
"torch>=2.0",
|
| 12 |
"transformers>=4.40,<5",
|
|
|
|
| 7 |
version = "0.1.0"
|
| 8 |
description = "Safety content classifier based on LLaDA diffusion language model"
|
| 9 |
requires-python = ">=3.10"
|
| 10 |
+
license = { text = "MIT" }
|
| 11 |
dependencies = [
|
| 12 |
"torch>=2.0",
|
| 13 |
"transformers>=4.40,<5",
|