Text Generation
Transformers
Safetensors
English
gemma3
image-text-to-text
gemma
phishing-detection
email-classification
merged-model
bf16
conversational
text-generation-inference
Instructions to use briankkogi/gemma3-phishing-v1-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use briankkogi/gemma3-phishing-v1-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="briankkogi/gemma3-phishing-v1-bf16") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("briankkogi/gemma3-phishing-v1-bf16") model = AutoModelForMultimodalLM.from_pretrained("briankkogi/gemma3-phishing-v1-bf16", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use briankkogi/gemma3-phishing-v1-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "briankkogi/gemma3-phishing-v1-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "briankkogi/gemma3-phishing-v1-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/briankkogi/gemma3-phishing-v1-bf16
- SGLang
How to use briankkogi/gemma3-phishing-v1-bf16 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 "briankkogi/gemma3-phishing-v1-bf16" \ --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": "briankkogi/gemma3-phishing-v1-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "briankkogi/gemma3-phishing-v1-bf16" \ --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": "briankkogi/gemma3-phishing-v1-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use briankkogi/gemma3-phishing-v1-bf16 with Docker Model Runner:
docker model run hf.co/briankkogi/gemma3-phishing-v1-bf16
Gemma 3 Phishing Classifier (Merged BF16)
This repository contains the merged full model (base Gemma + LoRA adapter merged into dense weights) for binary phishing classification (phishing vs safe).
- Merged from:
- base:
google/gemma-3-4b-it - adapter:
briankkogi/gemma3-phishing-main-v1
- base:
- Precision target at merge time: BF16
Model Type
- Type: full merged Causal LM checkpoint (no PEFT adapter loading needed)
- Output labels:
phishingorsafe(single-word target)
What This Model Is For
This model is intended for direct deployment where a single merged checkpoint is preferred over base+adapter composition.
Quickstart (Transformers)
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "briankkogi/gemma3-phishing-v1-bf16"
tok = AutoTokenizer.from_pretrained(repo)
if tok.pad_token is None:
tok.pad_token = tok.eos_token
model = AutoModelForCausalLM.from_pretrained(
repo,
torch_dtype=torch.bfloat16,
device_map="auto",
).eval()
prompt = 'Email body: """Your account will be suspended unless you verify now."""\n\nTask: Is this phishing or safe? Reply with only one word: phishing or safe.'
inputs = tok.apply_chat_template(
[{"role": "user", "content": prompt}],
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=2, do_sample=False)
txt = tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip().lower()
pred = "phishing" if "phishing" in txt else "safe"
print(pred, "| raw:", txt)
Merge Summary
- Base model:
google/gemma-3-4b-it - Adapter merged:
briankkogi/gemma3-phishing-main-v1 - Merged repo:
briankkogi/gemma3-phishing-v1-bf16 - Merge dtype:
bf16
Metrics and Evaluation
- For detailed training and evaluation results, see the source adapter model card:
https://huggingface.co/briankkogi/gemma3-phishing-main-v1.
Limitations and Risks
- False negatives are still possible.
- Classifier outputs should be combined with other signals.
- Evaluate on your own production-like distribution before rollout.
- Prompt format/decoding settings can affect edge-case outputs.
Intended Use
- Direct-serving inference endpoints
- Security triage/copilot augmentation
- Batch email risk scoring pipelines with human escalation
Out of Scope / Not Recommended
- Sole automated enforcement without fallback controls
- Compliance/legal final decisions without review
- Use in high-risk environments without local re-validation and monitoring
License and Usage Terms
This merged model is derived from google/gemma-3-4b-it and is subject to upstream model terms and any dataset usage constraints.
Review and comply with all applicable licenses/policies before deployment.
Version
v1-bf16
- Downloads last month
- 18