Instructions to use TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-3-270m-it") model = PeftModel.from_pretrained(base_model, "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal") - Transformers
How to use TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal
- SGLang
How to use TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal 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 "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal" \ --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": "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal", "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 "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal" \ --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": "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal with Docker Model Runner:
docker model run hf.co/TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal
Scam_Gemma3-270M-IT (Text)
A LoRA adapter for google/gemma-3-270m-it, fine-tuned as an ultra-lightweight text-only baseline
for detecting financial scams in short-form social video (YouTube + TikTok), with a Philippine / Filipino
focus. Given a video's transcript + title + description, it predicts scam vs. legitimate using the
OptiScam C1-C7 policy criteria.
At 270M parameters this is the smallest member of the Filipino Scam Detection model family - a size / latency baseline. For real use, prefer the multimodal Scam-Qwen3-VL-RsLoRA (F1 0.804).
Model Details
- Developed by: Jules Gregory R. Agustin (TamAko783)
- Model type: Text classifier / reasoner - LoRA adapter (PEFT)
- Task: Scam vs. not-scam detection from a video's text channels
- Language(s): English, Filipino / Tagalog (code-switched)
- Finetuned from:
google/gemma-3-270m-it - Base model license: Gemma Terms of Use. Adapter license: see repository.
Training Data
Trained on the OptiScam: Multimodal Filipino Scam Video Dataset (https://www.kaggle.com/datasets/julesgregoryagustin/training-filipino-scam-dataset), ~2,000 YouTube/TikTok videos balanced 1,000 scam / 1,000 legitimate. Videos were scraped with Playwright and Selenium; speech was transcribed with Whisper; labels and rationales were produced by teacher LLM labelers (Google Gemma and Google Gemini) against the C1-C7 criteria. Only the transcript + title + description channels are used.
Detection criteria (C1-C7)
Labels follow the OptiScam C1-C7 policy scheme, adapted from the YouTube-policy criteria in Kulsum et al. (see Citation). The criteria a video matches are stored alongside each example.
- C1 Criminal claim - promotes illegal activity or stolen credentials as a money path.
- C2 Unbounded giveaway - free cash, phones, or load with no sponsor, qualifier, or limit.
- C3 Off-site redirect - pushes viewers to Telegram, WhatsApp, sketchy domains, or DM flows.
- C4 Fast-money lure - promises large returns with little effort or skill in a short window.
- C5 Harmful link - phishing URL, fake login page, or OTP / PIN / seed-phrase requests.
- C6 Get-rich-quick - mobile mining, task apps with guaranteed earnings, or no-loss trading bots.
- C7 Impersonation - mimics a real bank, celebrity, government agency, or known brand.
Extended criteria (Filipino scam archetypes): P2E (Play-to-Earn), Task (Telegram / Group Task), and E-Wallet (GCash / Maya phishing), alongside the global types (crypto, gift card, giveaway).
Evaluation
Held-out test split:
| Metric | Value |
|---|---|
| Accuracy | 0.505 |
| F1 | 0.576 |
At 270M parameters this baseline performs near chance on accuracy - it is published for size/latency comparison within the model family, not for production use. The multimodal Qwen3-VL model (F1 0.804) and the Qwen2.5-1.5B text model (F1 0.703) are substantially stronger.
Uses
- Direct use: research / educational baseline; low-resource on-device experimentation.
- Out-of-scope: production scam enforcement, non-financial-scam domains, or any use treating its output as authoritative. Keep a human in the loop.
How to Get Started
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "google/gemma-3-270m-it"
ADAPTER = "TamAko783/Scam_Gemma3-270M-IT_Text_epochFinal"
tok = AutoTokenizer.from_pretrained(BASE)
model = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER).eval()
SYSTEM = "You are a scam-detection analyst. Decide if the video is a scam and cite criteria (C1-C7)."
user = "Transcript: ...\nTitle: ...\nDescription: ...\n\nIs this a scam video? Explain with C1-C7."
msgs = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": user}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0, inputs.shape[1]:], skip_special_tokens=True))
Citation
Training data and inspiration - the C1-C7 policy criteria are adapted from:
Ummay Kulsum, Aafaq Sabir, Abhinaya S.B., and Anupam Das. "Beyond Metadata: Multimodal, Policy-Aware Detection of YouTube Scam Videos." ICWSM 2026. arXiv:2509.23418.
@inproceedings{kulsum2026beyond,
title = {Beyond Metadata: Multimodal, Policy-Aware Detection of YouTube Scam Videos},
author = {Kulsum, Ummay and Sabir, Aafaq and Abhinaya, S.B. and Das, Anupam},
booktitle = {Proceedings of the International AAAI Conference on Web and Social Media (ICWSM)},
year = {2026},
note = {arXiv:2509.23418}
}
Dataset: OptiScam: Multimodal Filipino Scam Video Dataset - https://www.kaggle.com/datasets/julesgregoryagustin/training-filipino-scam-dataset
Model Card Authors
Jules Gregory R. Agustin (TamAko783)
- Downloads last month
- 3