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
- 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 new
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
Upload run_server.sh with huggingface_hub
Browse files- run_server.sh +82 -0
run_server.sh
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Detoxify-Small - GGUF Model Server Launcher
|
| 4 |
+
# Generated on 2025-09-17 20:07:11
|
| 5 |
+
|
| 6 |
+
# Configuration
|
| 7 |
+
MODEL_FILE="model.gguf"
|
| 8 |
+
MODEL_NAME="Detoxify-Small"
|
| 9 |
+
HOST="127.0.0.1"
|
| 10 |
+
PORT="8000"
|
| 11 |
+
GPU_LAYERS="0"
|
| 12 |
+
|
| 13 |
+
# Colors for output
|
| 14 |
+
RED='[0;31m'
|
| 15 |
+
GREEN='[0;32m'
|
| 16 |
+
YELLOW='[1;33m'
|
| 17 |
+
BLUE='[0;34m'
|
| 18 |
+
NC='[0m' # No Color
|
| 19 |
+
|
| 20 |
+
echo -e "========================================"
|
| 21 |
+
echo -e " Detoxify-Small Server"
|
| 22 |
+
echo -e "========================================"
|
| 23 |
+
echo
|
| 24 |
+
|
| 25 |
+
# Check if model file exists
|
| 26 |
+
if [ ! -f "$MODEL_FILE" ]; then
|
| 27 |
+
echo -e "Error: Model file '$MODEL_FILE' not found!"
|
| 28 |
+
echo -e "Make sure you're running this script from the model directory."
|
| 29 |
+
exit 1
|
| 30 |
+
fi
|
| 31 |
+
|
| 32 |
+
echo -e "✓ Model file found: $MODEL_FILE"
|
| 33 |
+
echo -e "✓ Model: $MODEL_NAME"
|
| 34 |
+
echo -e "✓ Server: http://$HOST:$PORT"
|
| 35 |
+
echo
|
| 36 |
+
|
| 37 |
+
# Check if port is available
|
| 38 |
+
if lsof -Pi :$PORT -sTCP:LISTEN -t >/dev/null ; then
|
| 39 |
+
echo -e "Warning: Port $PORT is already in use."
|
| 40 |
+
echo -e "Trying alternative port 8001..."
|
| 41 |
+
PORT="8001"
|
| 42 |
+
fi
|
| 43 |
+
|
| 44 |
+
# Detect system capabilities
|
| 45 |
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
| 46 |
+
echo -e "✓ macOS detected - Metal GPU acceleration available"
|
| 47 |
+
GPU_LAYERS="35" # Reasonable default for M1/M2/M3
|
| 48 |
+
elif command -v nvidia-smi &> /dev/null; then
|
| 49 |
+
echo -e "✓ NVIDIA GPU detected - CUDA acceleration available"
|
| 50 |
+
GPU_LAYERS="35" # Reasonable default for CUDA
|
| 51 |
+
else
|
| 52 |
+
echo -e "No GPU acceleration detected - using CPU only"
|
| 53 |
+
GPU_LAYERS="0"
|
| 54 |
+
fi
|
| 55 |
+
|
| 56 |
+
echo -e "✓ GPU layers: $GPU_LAYERS"
|
| 57 |
+
echo
|
| 58 |
+
|
| 59 |
+
# Check for llama-server
|
| 60 |
+
if ! command -v llama-server &> /dev/null; then
|
| 61 |
+
echo -e "Error: llama-server not found in PATH!"
|
| 62 |
+
echo -e "Please install llama.cpp and add it to your PATH:"
|
| 63 |
+
echo -e " https://github.com/ggerganov/llama.cpp"
|
| 64 |
+
exit 1
|
| 65 |
+
fi
|
| 66 |
+
|
| 67 |
+
echo -e "✓ llama-server found"
|
| 68 |
+
echo
|
| 69 |
+
|
| 70 |
+
echo -e "Starting server..."
|
| 71 |
+
echo -e "Press Ctrl+C to stop"
|
| 72 |
+
echo
|
| 73 |
+
|
| 74 |
+
# Start the server
|
| 75 |
+
exec llama-server \
|
| 76 |
+
-m "$MODEL_FILE" \
|
| 77 |
+
--host "$HOST" \
|
| 78 |
+
--port "$PORT" \
|
| 79 |
+
--n-gpu-layers "$GPU_LAYERS" \
|
| 80 |
+
--ctx-size 4096 \
|
| 81 |
+
--chat-template "" \
|
| 82 |
+
--log-disable
|