Guardian — on-device models (LAYA + PP-OCRv4)

Artifacts for Guardian, an offline scam/misinformation safety copilot for HarmonyOS/OpenHarmony (hackathon submission). Everything runs on-device via MindSpore Lite — no network at inference time.

Files

file size what
laya_en_w8_s256.ms ~413 MB Fine-tuned LAY A classifier (ModernBERT-large + 2-layer head), weight-quantized w8. Two baked questions: deception (safe/deceptive) and incident (8 KB ids).
laya_guardian_meta.json 5 KB Converter metadata: question prefixes, markers, SEP/PAD ids, max_len=512, temperatures (calibration baked into the .ms).
tokenizer.json 3.8 MB ByteLevel-BPE fast tokenizer for the LAY A encoder.
ocr/det.ms 2.1 MB PP-OCRv4 text detection.
ocr/rec.ms 5.4 MB PP-OCRv4 text recognition.
ocr/ppocr_keys_v1.txt 33 KB PP-OCRv4 character dictionary.

Usage (fetch into the app)

These files are not committed to the app repo. A fresh checkout fetches them into entry/src/main/resources/rawfile/ before building:

python tools/fetch_model.py                 # uses this repo
python tools/fetch_model.py --repo <org>/<name>   # mirror
HF_TOKEN=... python tools/fetch_model.py    # if private

Model / data

  • Base encoder: convaiinnovations/laya (ModernBERT-large, frozen during fine-tune).
  • Fine-tuned head-only on DIFrauD (task-aligned domains) + synthetic UI/chrome hard negatives + synthetic harassment; misinformation relabelled from filtered political_statements.
  • Calibration: temperature scaling fit via 5-fold CV; the deployed temperature is baked into the .ms.
  • Incidents (8): family-emergency-money, misinfo-breaking-event, bank-authority-impersonation, delivery-fee-smishing, otp-verification-theft, investment-guaranteed-returns, sextortion-blackmail, hate-abuse.

See the app repo's DATA_SCIENCE.md and AI_WORKFLOW.md for the full methodology.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support