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
  • Precision target at merge time: BF16

Model Type

  • Type: full merged Causal LM checkpoint (no PEFT adapter loading needed)
  • Output labels: phishing or safe (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
7
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for briankkogi/gemma3-phishing-v1-bf16

Finetuned
(658)
this model