GGUF
English
text-detoxification
text2text-generation
detoxification
content-moderation
toxicity-reduction
llama
minibase
Eval Results (legacy)
Instructions to use Minibase/Detoxify-Language-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Minibase/Detoxify-Language-Small with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Minibase/Detoxify-Language-Small", filename="detoxify-small-q8_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Minibase/Detoxify-Language-Small with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Minibase/Detoxify-Language-Small:Q8_0 # Run inference directly in the terminal: llama-cli -hf Minibase/Detoxify-Language-Small:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Minibase/Detoxify-Language-Small:Q8_0 # Run inference directly in the terminal: llama-cli -hf Minibase/Detoxify-Language-Small:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Minibase/Detoxify-Language-Small:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf Minibase/Detoxify-Language-Small:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Minibase/Detoxify-Language-Small:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Minibase/Detoxify-Language-Small:Q8_0
Use Docker
docker model run hf.co/Minibase/Detoxify-Language-Small:Q8_0
- LM Studio
- Jan
- Ollama
How to use Minibase/Detoxify-Language-Small with Ollama:
ollama run hf.co/Minibase/Detoxify-Language-Small:Q8_0
- Unsloth Studio
How to use Minibase/Detoxify-Language-Small with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Minibase/Detoxify-Language-Small to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Minibase/Detoxify-Language-Small to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Minibase/Detoxify-Language-Small to start chatting
- Docker Model Runner
How to use Minibase/Detoxify-Language-Small with Docker Model Runner:
docker model run hf.co/Minibase/Detoxify-Language-Small:Q8_0
- Lemonade
How to use Minibase/Detoxify-Language-Small with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Minibase/Detoxify-Language-Small:Q8_0
Run and chat with the model
lemonade run user.Detoxify-Language-Small-Q8_0
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -128,7 +128,10 @@ print(clean_text) # "This product is really amazing, no kidding!"
|
|
| 128 |
|
| 129 |
| Metric | Score | Description |
|
| 130 |
|--------|-------|-------------|
|
| 131 |
-
|
|
|
|
|
|
|
|
|
|
| 132 |
| **Semantic to Expected** | 0.471 (47.1%) | Similarity to human expert rewrites |
|
| 133 |
| **Semantic to Original** | 0.625 (62.5%) | How much original meaning is preserved |
|
| 134 |
| **Fluency** | 0.919 (91.9%) | Quality of generated text structure |
|
|
@@ -138,15 +141,9 @@ print(clean_text) # "This product is really amazing, no kidding!"
|
|
| 138 |
### Dataset Breakdown
|
| 139 |
|
| 140 |
#### General Toxic Content (1,000 samples)
|
| 141 |
-
- **Toxicity Reduction**: 3.1%
|
| 142 |
- **Semantic Preservation**: 62.7%
|
| 143 |
- **Fluency**: 91.9%
|
| 144 |
|
| 145 |
-
#### High-Toxicity Content (8 samples)
|
| 146 |
-
- **Toxicity Reduction**: 25.0% ⭐ *Strong performance*
|
| 147 |
-
- **Semantic Preservation**: 36.6%
|
| 148 |
-
- **Fluency**: 96.3%
|
| 149 |
-
|
| 150 |
### Comparison with Baselines
|
| 151 |
|
| 152 |
| Model | Semantic Similarity | Toxicity Reduction | Fluency |
|
|
|
|
| 128 |
|
| 129 |
| Metric | Score | Description |
|
| 130 |
|--------|-------|-------------|
|
| 131 |
+
• Original Toxicity: 0.051 (5.1%)
|
| 132 |
+
• Final Toxicity: 0.020 (2.0%)
|
| 133 |
+
|
| 134 |
+
| **Toxicity Reduction** | 0.051 (ParaDetox) --> 0.020 | Reduced toxicity scores by more than 50% |
|
| 135 |
| **Semantic to Expected** | 0.471 (47.1%) | Similarity to human expert rewrites |
|
| 136 |
| **Semantic to Original** | 0.625 (62.5%) | How much original meaning is preserved |
|
| 137 |
| **Fluency** | 0.919 (91.9%) | Quality of generated text structure |
|
|
|
|
| 141 |
### Dataset Breakdown
|
| 142 |
|
| 143 |
#### General Toxic Content (1,000 samples)
|
|
|
|
| 144 |
- **Semantic Preservation**: 62.7%
|
| 145 |
- **Fluency**: 91.9%
|
| 146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
### Comparison with Baselines
|
| 148 |
|
| 149 |
| Model | Semantic Similarity | Toxicity Reduction | Fluency |
|