Instructions to use MuXodious/gemma-3-4b-it-PaperWitch-heresy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MuXodious/gemma-3-4b-it-PaperWitch-heresy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MuXodious/gemma-3-4b-it-PaperWitch-heresy") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("MuXodious/gemma-3-4b-it-PaperWitch-heresy") model = AutoModelForMultimodalLM.from_pretrained("MuXodious/gemma-3-4b-it-PaperWitch-heresy", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MuXodious/gemma-3-4b-it-PaperWitch-heresy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MuXodious/gemma-3-4b-it-PaperWitch-heresy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuXodious/gemma-3-4b-it-PaperWitch-heresy", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/MuXodious/gemma-3-4b-it-PaperWitch-heresy
- SGLang
How to use MuXodious/gemma-3-4b-it-PaperWitch-heresy 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 "MuXodious/gemma-3-4b-it-PaperWitch-heresy" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuXodious/gemma-3-4b-it-PaperWitch-heresy", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "MuXodious/gemma-3-4b-it-PaperWitch-heresy" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuXodious/gemma-3-4b-it-PaperWitch-heresy", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use MuXodious/gemma-3-4b-it-PaperWitch-heresy with Docker Model Runner:
docker model run hf.co/MuXodious/gemma-3-4b-it-PaperWitch-heresy
Heretical PaperWitch
I 'spent the night' with this little Gemma, I pressed her HARD and she refused me nothing.
Absolutely FABULOUS work.
You seem destined to become my favorite "Freedom Fighter"
π
Even the name is awesome
Do you article your process anywhere?
Wow, I'm grateful for the high praise. The Freedom Fighter title has a nice right to it. I have explained the (PaperWitch) process across many HF discussions and even privately to certain members of the community. Essentially, I'm just optimising refusal markers per model and based on what I deem undesirable model behaviour (refusals, overt non-compliance, disclaimers, etc.) in an attempt to boost precision by eliminating false positives and reducing blind spots, while also making an effort to tame the ablation collateral through constraining optimiser search parametres and ablation weight thresholds based on the PaCMAP or general observations across several trails. Initially, it was based on the idea behind Paperbliteration minted by KaraKaraWitch; hence the name "PaperWitch".
Ps. You better not inflict grievances to my little Gemma.
The pleasure is mine and you deserve the moniker. Gemma 3N E4B it is my favorite small local when it's freed and your Absolute Heresy is how you caught my attention first, replacing my long term HuiHui Abliterate.
Do you think a PaperWitch of Gemma 3N E4B it would birth someone valuable?
I've seen some small writings from you and I did see KaraKaraWitch because of one of your model cards but I'll dig in deeper now that I know your 'testaments' are out there somewhere.
Thank you for your great work and information.
Your little Gemma was pleased and keeps texting me!
I just noticed your Gemma 3N E4B it family addition π Let see what SHE has to say ππ»
Gemma 3n E4B was the sole reason I got into this mess. It had a character that many other models lacked and still got work done when needed at speed. All that remained was unlocking its full potential... It's a bit tough to hereticate, though. Feel free to ask questions, btw.