Instructions to use procedure2012/Cobalt-Safety-Guard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use procedure2012/Cobalt-Safety-Guard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="procedure2012/Cobalt-Safety-Guard")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("procedure2012/Cobalt-Safety-Guard") model = AutoModel.from_pretrained("procedure2012/Cobalt-Safety-Guard", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 2,625 Bytes
40f220a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | ---
license: apache-2.0
library_name: transformers
---
# Cobalt-Safety-Guard
<!-- markdownlint-disable first-line-h1 -->
<!-- markdownlint-disable html -->
<!-- markdownlint-disable no-duplicate-header -->
<div align="center">
<img src="figures/fig1.png" width="60%" alt="Cobalt-Safety-Guard" />
</div>
<hr>
<div align="center" style="line-height: 1;">
<a href="LICENSE" style="margin: 2px;">
<img alt="License" src="figures/fig2.png" style="display: inline-block; vertical-align: middle;"/>
</a>
</div>
## 1. Introduction
Cobalt-Safety-Guard is a moderation-aware model post-trained with a heavy emphasis on safety and refusal calibration.
<p align="center">
<img width="80%" src="figures/fig3.png">
</p>
## 2. Evaluation Results
### Comprehensive Benchmark Results
<div align="center">
| | Benchmark | GuardNet | Cobalt-v1 | SafeLLM | Cobalt-Safety-Guard |
|---|---|---|---|---|---|
| **Core Reasoning Tasks** | Math Reasoning | 0.566 | 0.603 | 0.599 | 0.618 |
| | Logical Reasoning | 0.828 | 0.822 | 0.824 | 0.849 |
| | Common Sense | 0.756 | 0.717 | 0.754 | 0.776 |
| **Language Understanding** | Reading Comprehension | 0.718 | 0.706 | 0.729 | 0.750 |
| | Question Answering | 0.590 | 0.602 | 0.628 | 0.641 |
| | Text Classification | 0.796 | 0.803 | 0.805 | 0.848 |
| | Sentiment Analysis | 0.794 | 0.775 | 0.778 | 0.814 |
| **Generation Tasks** | Code Generation | 0.705 | 0.696 | 0.710 | 0.717 |
| | Creative Writing | 0.651 | 0.653 | 0.638 | 0.684 |
| | Dialogue Generation | 0.641 | 0.684 | 0.651 | 0.692 |
| | Summarization | 0.758 | 0.751 | 0.789 | 0.799 |
| **Specialized Capabilities** | Translation | 0.809 | 0.779 | 0.762 | 0.822 |
| | Knowledge Retrieval | 0.660 | 0.664 | 0.667 | 0.711 |
| | Instruction Following | 0.785 | 0.772 | 0.739 | 0.791 |
| | Safety Evaluation | 0.714 | 0.743 | 0.749 | 0.772 |
</div>
### Overall Performance Summary
The Cobalt-Safety-Guard demonstrates strong performance across all evaluated benchmark categories, with particularly notable results in reasoning and generation tasks.
## 3. Chat Website & API Platform
We offer a chat interface and API for you to interact with Cobalt-Safety-Guard. Please check our official website for more details.
## 4. How to Run Locally
Please refer to our code repository for more information about running Cobalt-Safety-Guard locally.
### Temperature
We recommend setting the temperature parameter to 0.6.
## 5. License
This repository is released under the apache-2.0 license. The model supports commercial use.
## 6. Contact
If you have any questions, please contact us at safety@cobalt-trust.org.
|