Views
No views yet
naazimsnh02/fraudsentinel-qwen3-14b-merged.AUTO_APPROVE → APPROVE_WITH_MONITORING → STEP_UP_AUTH → TEMPORARY_HOLD → AUTO_BLOCK → SAR_REVIEW| Property | Value |
|---|---|
| Base model | unsloth/Qwen3-14B (Apache-2.0) |
| Method | Supervised Fine-Tuning (SFT) + LoRA |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (all-linear) |
| LoRA dropout | 0 (Unsloth-optimized) |
| Trainable parameters | 64,225,280 (0.433% of 14.83B total) |
| Dataset | naazimsnh02/fraud-financial-crime-qwen3-sft-v2 |
| Training examples | 11,016 (train split) |
| Epochs | 2 |
| Total steps | 1,378 |
| Batch size (per device) | 2 |
| Gradient accumulation | 8 (effective batch size 16) |
| Learning rate | 1e-4 |
| LR scheduler | Cosine |
| Warmup ratio | 0.05 |
| Optimizer | AdamW 8-bit |
| Precision | bfloat16 (no quantization) |
| Weight decay | 0.001 |
| Max sequence length | 4,096 |
| Packing | Disabled (padding-free mode enabled) |
| Hardware | AMD MI300X (192 GB VRAM) |
| Framework | Unsloth 2026.6.1, TRL 0.22.2, PEFT 0.19.1, Transformers 4.56.2 |
| ROCm / PyTorch | ROCm 7.0, PyTorch 2.10.0+rocm7.0 |
| Train loss (final) | 0.2467 |
| Training time | 4,230 s (70.5 min) |
| Peak VRAM | 39.8 GB (20.8% of 192 GB) |
| LoRA VRAM overhead | 12.0 GB (6.3% of max) |
1from unsloth import FastLanguageModel
2import torch
3
4model, tokenizer = FastLanguageModel.from_pretrained(
5 model_name = "naazimsnh02/fraudsentinel-qwen3-14b-lora",
6 max_seq_length = 4096,
7 dtype = torch.bfloat16,
8 load_in_4bit = False,
9)
10FastLanguageModel.for_inference(model)1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3import torch
4
5base = AutoModelForCausalLM.from_pretrained(
6 "Qwen/Qwen3-14B",
7 torch_dtype=torch.bfloat16,
8 device_map="auto",
9)
10model = PeftModel.from_pretrained(base, "naazimsnh02/fraudsentinel-qwen3-14b-lora")
11tokenizer = AutoTokenizer.from_pretrained("naazimsnh02/fraudsentinel-qwen3-14b-lora")1messages = [
2 {"role": "system", "content": "You are FraudSentinel, an expert fraud detection and AML investigation assistant."},
3 {"role": "user", "content": (
4 "Analyze this card transaction and return a structured JSON risk assessment.\n\n"
5 "Transaction: amount=$828.62, category=misc_net, hour=2, "
6 "amount_vs_category_p95=2.16x, tx_24h=4, geo_km=1847, is_fraud=True"
7 )},
8]
9
10# Thinking mode OFF (fast mode — default for Tier-2 triage)
11text = tokenizer.apply_chat_template(
12 messages,
13 tokenize=False,
14 add_generation_prompt=True,
15 enable_thinking=False,
16)
17inputs = tokenizer(text, return_tensors="pt").to(model.device)
18
19with torch.no_grad():
20 output = model.generate(
21 **inputs,
22 max_new_tokens=512,
23 temperature=0.1,
24 do_sample=True,
25 )
26print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))1text = tokenizer.apply_chat_template(
2 messages,
3 tokenize=False,
4 add_generation_prompt=True,
5 enable_thinking=True, # activates Qwen3 thinking tokens
6)1{
2 "risk_score": 0.84,
3 "risk_level": "HIGH",
4 "conclusion": "FRAUDULENT",
5 "primary_typology": "card-not-present account takeover / stolen-card online cash-out",
6 "secondary_typology": "account_takeover",
7 "key_signals": [
8 "amount_exceeds_category_p95",
9 "high_risk_merchant_category",
10 "unusual_hour_activity"
11 ],
12 "explanation": "Transaction amount $828.62 exceeds the 95th-percentile for misc_net purchases...",
13 "feature_importance": {
14 "amount_exceeds_category_p95": 0.46,
15 "high_risk_merchant_category": 0.28,
16 "unusual_hour_activity": 0.26
17 },
18 "recommended_action": "AUTO_BLOCK",
19 "sar_required": false,
20 "sar_rationale": null
21}enable_thinking=False). Enabling thinking mode at inference activates Qwen3's CoT capabilities but adds latency (3–5 s per response).