SafeScan Phi-3 Mini โ€” Intent Routing Model

Fine-tuned version of microsoft/Phi-3-mini-4k-instruct for the SafeScan mobile security utility app (Flutter).

What it does

Given a natural language security query, returns a structured JSON object routing the request to the correct SafeScan module:

{"intent": "wifi_check", "module": "WifiSecurityScan", "action": "navigate_to_wifi_security_scan", "parameters": {"network": null}}

Training Details

Property Value
Base model microsoft/Phi-3-mini-4k-instruct
Method QLoRA (4-bit NF4)
LoRA rank 16
LoRA alpha 32
Dataset size 1,250 samples
Epochs 3
Learning rate 2e-4
Optimizer paged_adamw_8bit
Max seq length 512

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
import torch

model = AutoModelForCausalLM.from_pretrained(
    "MuhammadSanan99989/safescan-phi3-mini-intent",
    torch_dtype=torch.float16,
    device_map="auto",
    trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("MuhammadSanan99989/safescan-phi3-mini-intent", trust_remote_code=True)

pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)

prompt = "<|user|>\nCheck if my WiFi is secure<|end|>\n<|assistant|>"
result = pipe(prompt, max_new_tokens=128, do_sample=False)
print(result[0]["generated_text"][len(prompt):])
# Output: {"intent": "wifi_check", "module": "WifiSecurityScan", ...}
Downloads last month
-
Safetensors
Model size
4B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for MuhammadSanan99989/safescan-phi3-mini-intent

Adapter
(846)
this model