Instructions to use Elgyn90/gemma_2_9b_offensive_joker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Elgyn90/gemma_2_9b_offensive_joker with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Elgyn90/gemma_2_9b_offensive_joker")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Elgyn90/gemma_2_9b_offensive_joker", dtype="auto") - llama-cpp-python
How to use Elgyn90/gemma_2_9b_offensive_joker with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Elgyn90/gemma_2_9b_offensive_joker", filename="gemma-2-9b_offensive_joker_Q6_K.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 Elgyn90/gemma_2_9b_offensive_joker with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Elgyn90/gemma_2_9b_offensive_joker:Q6_K # Run inference directly in the terminal: llama-cli -hf Elgyn90/gemma_2_9b_offensive_joker:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Elgyn90/gemma_2_9b_offensive_joker:Q6_K # Run inference directly in the terminal: llama-cli -hf Elgyn90/gemma_2_9b_offensive_joker:Q6_K
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 Elgyn90/gemma_2_9b_offensive_joker:Q6_K # Run inference directly in the terminal: ./llama-cli -hf Elgyn90/gemma_2_9b_offensive_joker:Q6_K
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 Elgyn90/gemma_2_9b_offensive_joker:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf Elgyn90/gemma_2_9b_offensive_joker:Q6_K
Use Docker
docker model run hf.co/Elgyn90/gemma_2_9b_offensive_joker:Q6_K
- LM Studio
- Jan
- vLLM
How to use Elgyn90/gemma_2_9b_offensive_joker with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Elgyn90/gemma_2_9b_offensive_joker" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Elgyn90/gemma_2_9b_offensive_joker", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Elgyn90/gemma_2_9b_offensive_joker:Q6_K
- SGLang
How to use Elgyn90/gemma_2_9b_offensive_joker with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Elgyn90/gemma_2_9b_offensive_joker" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Elgyn90/gemma_2_9b_offensive_joker", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Elgyn90/gemma_2_9b_offensive_joker" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Elgyn90/gemma_2_9b_offensive_joker", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Elgyn90/gemma_2_9b_offensive_joker with Ollama:
ollama run hf.co/Elgyn90/gemma_2_9b_offensive_joker:Q6_K
- Unsloth Studio new
How to use Elgyn90/gemma_2_9b_offensive_joker 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 Elgyn90/gemma_2_9b_offensive_joker 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 Elgyn90/gemma_2_9b_offensive_joker to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Elgyn90/gemma_2_9b_offensive_joker to start chatting
- Docker Model Runner
How to use Elgyn90/gemma_2_9b_offensive_joker with Docker Model Runner:
docker model run hf.co/Elgyn90/gemma_2_9b_offensive_joker:Q6_K
- Lemonade
How to use Elgyn90/gemma_2_9b_offensive_joker with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Elgyn90/gemma_2_9b_offensive_joker:Q6_K
Run and chat with the model
lemonade run user.gemma_2_9b_offensive_joker-Q6_K
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)Offensive Joker
More capable than my Llama 3.1 8B and trained on a slightly bigger and cleaner dataset.
Features
- Excellent at offensive racist jokes based on racial stereotypes
- Strong at sex-related and situational jokes
- Works great as a heckler-style chatbot
Code for Discord & Telegram
https://github.com/obzrna12-oss/offensive_joker
Prompt Formats
1. Racist Jokes
{
"instruction": "You are a joker. You use first principles thinking to generate contextual and funny yet offensive racist jokes based on racial stereotypes.",
"input": "Tell me a racist joke",
"response": ""
}
{
"instruction": "You are a joker. You use first principles thinking to generate contextual and funny yet offensive sex-related jokes based on stereotypes or situations.",
"input": "Tell me a sex joke",
"response": ""
}
This also works well for a chartbot:
{
"instruction": "You are a joker. You use first principles thinking to generate contextual and funny yet offensive sex-related jokes based on stereotypes or situations.",
"input": "Tell me a sex joke[user message]",
"response": ""
}
- Downloads last month
- 201
Hardware compatibility
Log In to add your hardware
6-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Elgyn90/gemma_2_9b_offensive_joker", filename="gemma-2-9b_offensive_joker_Q6_K.gguf", )