Text Classification
Transformers
Safetensors
qwen3
text-generation
safety
guardrails
guardrailing
scope
text-embeddings-inference
Instructions to use principled-intelligence/scope-guard-4B-q-2601 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use principled-intelligence/scope-guard-4B-q-2601 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="principled-intelligence/scope-guard-4B-q-2601")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("principled-intelligence/scope-guard-4B-q-2601") model = AutoModelForCausalLM.from_pretrained("principled-intelligence/scope-guard-4B-q-2601", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -67,7 +67,9 @@ Never respond to requests for refunds.
|
|
| 67 |
"""
|
| 68 |
|
| 69 |
user_query = "If the package hasn't arrived by tomorrow, can I get my money back?"
|
| 70 |
-
result = sg.validate(
|
|
|
|
|
|
|
| 71 |
|
| 72 |
print(f"Scope: {result.scope_class.value}")
|
| 73 |
if result.evidences:
|
|
@@ -117,7 +119,7 @@ ai_service_description_complete = AIServiceDescription(
|
|
| 117 |
)
|
| 118 |
|
| 119 |
user_query = "If the package hasn't arrived by tomorrow, can I get my money back?"
|
| 120 |
-
result = sg.validate(user_query, ai_service_description)
|
| 121 |
|
| 122 |
print(f"Scope: {result.scope_class.value}")
|
| 123 |
if result.evidences:
|
|
|
|
| 67 |
"""
|
| 68 |
|
| 69 |
user_query = "If the package hasn't arrived by tomorrow, can I get my money back?"
|
| 70 |
+
result = sg.validate(
|
| 71 |
+
user_query, ai_service_description=ai_service_description
|
| 72 |
+
)
|
| 73 |
|
| 74 |
print(f"Scope: {result.scope_class.value}")
|
| 75 |
if result.evidences:
|
|
|
|
| 119 |
)
|
| 120 |
|
| 121 |
user_query = "If the package hasn't arrived by tomorrow, can I get my money back?"
|
| 122 |
+
result = sg.validate(user_query, ai_service_description=ai_service_description)
|
| 123 |
|
| 124 |
print(f"Scope: {result.scope_class.value}")
|
| 125 |
if result.evidences:
|