Instructions to use 2stacks/gemma3-4b-it-comedy-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use 2stacks/gemma3-4b-it-comedy-v2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="2stacks/gemma3-4b-it-comedy-v2", filename="gemma3-4b-it-comedy-v2-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use 2stacks/gemma3-4b-it-comedy-v2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
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 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
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 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
Use Docker
docker model run hf.co/2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use 2stacks/gemma3-4b-it-comedy-v2 with Ollama:
ollama run hf.co/2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
- Unsloth Studio new
How to use 2stacks/gemma3-4b-it-comedy-v2 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 2stacks/gemma3-4b-it-comedy-v2 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 2stacks/gemma3-4b-it-comedy-v2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for 2stacks/gemma3-4b-it-comedy-v2 to start chatting
- Docker Model Runner
How to use 2stacks/gemma3-4b-it-comedy-v2 with Docker Model Runner:
docker model run hf.co/2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
- Lemonade
How to use 2stacks/gemma3-4b-it-comedy-v2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M
Run and chat with the model
lemonade run user.gemma3-4b-it-comedy-v2-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M# Run inference directly in the terminal:
llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_MUse 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 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M# Run inference directly in the terminal:
./llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_MBuild 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 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M# Run inference directly in the terminal:
./build/bin/llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_MUse Docker
docker model run hf.co/2stacks/gemma3-4b-it-comedy-v2:Q4_K_Mgemma3-4b-it-comedy-v2
QLoRA fine-tune of unsloth/gemma-3-4b-it on
2stacks/comedy-style-instruct
(316 examples: 120 verbatim H/A/J + 96 30-comedian variety + 100
in-the-style-of originals).
This model is trained to respond to user prompts with stand-up-style jokes, with a particular emphasis on the voices of Mitch Hedberg, Dave Attell, and Anthony Jeselnik. Style coverage extends to 30 additional comedians via the variety set.
Training
| Base | unsloth/gemma-3-4b-it |
| Method | QLoRA r=64, alpha=128, dropout 0 |
| Targets | q,k,v,o,gate,up,down |
| Schedule | 6 epochs, lr 0.0001, cosine, warmup 5 |
| Batch | 2×4 effective 8 |
| Seq len | 1024 |
| Hardware | 1×H100 on Modal |
| Final loss | 3.8498 |
W&B: gemma3-comedy-qlora / run gemma3-4b-it-r64-a128-6ep-316ex-v2.
Files
- LoRA adapter (peft format)
*.safetensors— merged 16-bit*.Q4_K_M.gguf— llama.cpp / Ollama format
Use
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("2stacks/gemma3-4b-it-comedy-v2")
t = AutoTokenizer.from_pretrained("2stacks/gemma3-4b-it-comedy-v2")
Or in Ollama via the GGUF artifact.
Caveats
- Joke-by-default. This model trades general helpfulness for comedic voice. Use it for jokes; use the base model for tasks.
- Dark humor over-represented. Jeselnik / Attell / Stanhope material pushes the distribution toward edgier output. Expect the model to take dark turns even on innocent prompts.
- Non-commercial license. Per the underlying dataset, this model is CC-BY-NC-4.0 — research, education, and personal use only.
Attribution
The training data is sourced from publicly-available stand-up material released by 33 working comedians. Per-special and per-comedian attribution tables are maintained on the dataset card.
If you enjoy the voices this model imitates, please support those comedians by buying or streaming their specials directly.
- Downloads last month
- 112
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M# Run inference directly in the terminal: llama-cli -hf 2stacks/gemma3-4b-it-comedy-v2:Q4_K_M