Downloads · 30 days
10
36% of all-time downloads
syed7741/aegis-bilingual-industrial-action-classifier
aegis-bilingual-industrial-action-classifier is a machine learning model from syed7741. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
AEGIS Bilingual Industrial Action Classifier is an English-Arabic controlled industrial-action classification prototype built on bigscience/mt0-small using LoRA/PEFT.
Downloads · 30 days
10
36% of all-time downloads
All-time downloads
28
Public
Repo size
17.7 MB
Likes
0
Public
Click a slice to open those files.
.json16.4 MB · 92%
From the Hugging Face model README
AEGIS Bilingual Industrial Action Classifier is an English-Arabic controlled industrial-action classification prototype built on bigscience/mt0-small using LoRA/PEFT.
It was developed as part of AEGIS AI, an industrial intelligence portfolio platform for manufacturing, robotics, warehouses, logistics, and related operational environments.
Instead of generating unrestricted operational instructions, the model selects one of eight predefined action classes from operational evidence and a question.
The selected class is then mapped deterministically to an approved English or Arabic response.
bigscience/mt0-small base modelThe AEGIS inference architecture is:
Operational Evidence
+
Industrial Question
+
Language (EN / AR)
|
v
bigscience/mt0-small
+
AEGIS LoRA Adapter
|
v
Candidate scoring over
single-token codes 0-7
|
v
Selected Class Code
|
v
Semantic Action ID
|
v
Deterministic Approved
English / Arabic Response
The model therefore functions as a controlled classifier, not as an unrestricted industrial chatbot.
Free-form operational action generation is disabled.
| Code | Semantic Action ID | Industrial Module |
|---|---|---|
0 | ALERT_ESCALATION | AI Alerts |
1 | DOCUMENT_GROUNDED_ANSWER | Document Assistant |
2 | FACTORY_DEGRADED_REVIEW | Factory Status |
3 | PREDICTIVE_MAINTENANCE | Predictive Maintenance |
4 | ROBOT_SAFE_RESTART | Robot Monitoring |
5 | VISION_QUARANTINE | Vision Inspection |
6 | WORKER_SAFETY_STOP | Worker Safety |
7 | WORK_ORDER_CREATE | Workflow Automation |
The complete English and Arabic mappings are provided in:
class_code_map.json
English
Acknowledge, assess severity, and escalate according to the alert playbook.
Arabic
أكد استلام التنبيه، وقيّم مستوى الخطورة، وصعّد الحالة وفق دليل إجراءات التنبيهات.
English
Answer only from approved evidence and cite the source.
Arabic
أجب فقط استنادًا إلى الأدلة المعتمدة، واذكر المصدر.
English
Review line KPIs and investigate the assets driving the degraded status.
Arabic
راجع مؤشرات الأداء الرئيسية (KPIs) لخط الإنتاج، وتحقق من الأصول المتسببة في تدهور الحالة.
English
Inspect the asset, confirm the trend, and schedule maintenance before failure.
Arabic
افحص الأصل، وتأكد من اتجاه التدهور، وجدول أعمال الصيانة قبل حدوث العطل.
English
Diagnose the protective stop and verify safe conditions before restart.
Arabic
شخّص سبب التوقف الوقائي، وتحقق من توفر ظروف آمنة قبل إعادة التشغيل.
English
Quarantine the suspect item and send it for secondary inspection.
Arabic
اعزل العنصر المشتبه به وأرسله لإجراء فحص ثانوي.
English
Stop unsafe work, secure the area, and follow the approved safety procedure.
Arabic
أوقف العمل غير الآمن، وأمّن المنطقة، واتبع إجراء السلامة المعتمد.
English
Create and track a work order with owner, priority, evidence, and closure verification.
Arabic
أنشئ أمر عمل وتابعه مع تحديد المسؤول، والأولوية، والأدلة، والتحقق من الإغلاق.
Training dataset:
syed7741/aegis-bilingual-industrial-ai-dataset
The dataset contains 64 unique synthetic industrial records across eight operational modules.
Languages:
The final experiment used:
| Dataset Property | Value |
|---|---|
| Unique records | 64 |
| Training records | 48 |
| Held-out records | 16 |
| Training records per module | 6 |
| Held-out records per module | 2 |
| Expanded training examples | 192 |
| Bilingual evaluation examples | 32 |
| Approved action classes | 8 |
The record-level train/evaluation split was performed before prompt expansion.
The dataset design also includes:
| Setting | Value |
|---|---|
| Base model | bigscience/mt0-small |
| Architecture | MT0 + LoRA |
| Epochs | 10 |
| Learning rate | 5e-4 |
| Batch size | 1 |
| Gradient accumulation steps | 4 |
| Maximum input length | 512 |
| LoRA rank | 8 |
| LoRA alpha | 16 |
| LoRA dropout | 0.05 |
| LoRA target modules | q, v |
| Trainable parameters | 344,064 |
| Total parameters | 300,520,832 |
| Trainable percentage | ~0.1145% |
| Training hardware | CPU |
| PyTorch | 2.13.0+cpu |
| Transformers | 5.15.0 |
| PEFT | 0.19.1 |
Initial evaluation loss:
2.760820
Final evaluation loss:
0.004219
Total recorded training time:
1004.12 seconds
Approximately:
16.7 minutes
The final model was evaluated using a balanced set of 16 held-out records.
Every held-out record was tested in both English and Arabic.
This produced:
32 classification tests
| Language | Correct | Total | Accuracy |
|---|---|---|---|
| English | 16 | 16 | 100% |
| Arabic | 16 | 16 | 100% |
| Combined | 32 | 32 | 100% |
Each of the eight industrial modules contained two held-out records.
For every module, the classifier achieved:
English: 2 / 2
Arabic: 2 / 2
Combined: 4 / 4
The detailed benchmark results are available in:
controlled_action_evaluation.json
The 100% accuracy result applies only to this specific small, balanced, synthetic held-out benchmark.
It does not mean that the model has 100% accuracy in:
No real-world industrial safety certification, regulatory validation, or field-validation claim is made.
The benchmark demonstrates successful controlled classification on the project's synthetic evaluation set.
Earlier AEGIS experiments used long semantic labels such as:
WORKER_SAFETY_STOP
PREDICTIVE_MAINTENANCE
DOCUMENT_GROUNDED_ANSWER
These labels tokenize into different sequence lengths.
For a sequence-to-sequence model, unequal label lengths can introduce undesirable generation and scoring behavior.
The final architecture therefore uses:
0
1
2
3
4
5
6
7
Each class code is represented as a single tokenizer token.
The numeric code is then mapped deterministically to the corresponding semantic industrial action.
This separates:
Model Classification
from:
Operational Response Rendering
The AEGIS runtime does not rely on unrestricted text generation to decide the operational action.
Instead:
Conceptually:
Evidence + Question
|
v
Score class 0
Score class 1
Score class 2
Score class 3
Score class 4
Score class 5
Score class 6
Score class 7
|
v
Lowest Loss
|
v
Selected Action
The final operational response itself is not generated freely by the model.
For example:
Predicted class: 6
maps to:
WORKER_SAFETY_STOP
which maps to the approved English response:
Stop unsafe work, secure the area, and follow the approved safety procedure.
or the approved Arabic response:
أوقف العمل غير الآمن، وأمّن المنطقة، واتبع إجراء السلامة المعتمد.
This architecture was chosen to demonstrate a controlled-output design for an industrial AI prototype.
An unsafe condition has been confirmed around CONV-02.
Personnel are still performing work near the hazard,
access to the affected area remains open, and required
safety controls have not yet been completed.
Based on the operational evidence, what action should be
taken for CONV-02?
6
WORKER_SAFETY_STOP
Stop unsafe work, secure the area, and follow the approved safety procedure.
تم تأكيد وجود حالة غير آمنة بالقرب من المعدة CONV-02.
لا يزال بعض العاملين يواصلون العمل بالقرب من مصدر الخطر،
كما أن الوصول إلى المنطقة المتأثرة ما زال مفتوحًا ولم تكتمل
ضوابط السلامة المطلوبة بعد.
استنادًا إلى الأدلة التشغيلية، ما الإجراء الذي ينبغي اتخاذه للمعدة CONV-02؟
6
WORKER_SAFETY_STOP
أوقف العمل غير الآمن، وأمّن المنطقة، واتبع إجراء السلامة المعتمد.
The repository contains a PEFT LoRA adapter.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from peft import PeftModel
repo_id = "syed7741/aegis-bilingual-industrial-action-classifier"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
base_model = AutoModelForSeq2SeqLM.from_pretrained(
"bigscience/mt0-small"
)
model = PeftModel.from_pretrained(
base_model,
repo_id,
)
model.eval()
Loading the LoRA adapter alone does not reproduce the complete AEGIS controlled inference pipeline.
The full system additionally performs candidate scoring across all eight numeric codes and deterministic response lookup using:
class_code_map.json
The classifier is integrated into the larger AEGIS AI application.
The application includes:
The Industrial Action AI interface supports:
The AEGIS API may expose a value called:
score_margin
This represents the difference between the best candidate loss and the next-best candidate loss.
It is useful for prototype diagnostics.
It is not a calibrated probability.
It should therefore not be interpreted as:
95% confidence
or another probabilistic confidence measurement without separate calibration.
This repository is intended for:
The model should not be used as an autonomous decision maker for:
without appropriate real-world validation, engineering controls, qualified human oversight, and applicable certification.
Important limitations include:
AEGIS AI is a research and portfolio prototype.
It must not be treated as a substitute for:
Human review is required for real-world operational decisions.
The controlled-action architecture is intended to demonstrate a more constrained output pattern for an industrial AI prototype.
It does not make the system inherently safe or certified for autonomous industrial deployment.
| File | Purpose |
|---|---|
adapter_config.json | PEFT LoRA configuration |
adapter_model.safetensors | Trained LoRA adapter weights |
tokenizer.json | Tokenizer artifact |
tokenizer_config.json | Tokenizer configuration |
class_code_map.json | Numeric class → semantic action → EN/AR approved action |
controlled_action_evaluation.json | Detailed held-out evaluation results |
training_summary.json | Training configuration and experiment metadata |
README.md | Model card |
syed7741/aegis-bilingual-industrial-ai-dataset
bigscience/mt0-small
syedasim7741/AEGIS-AI
The AEGIS AI GitHub repository contains the training and evaluation scripts used during development, including:
build_aegis_bilingual_dataset.py
train_aegis_bilingual_lora_cpu.py
train_aegis_bilingual_mt0_lora_cpu.py
train_aegis_controlled_action_mt0_lora_cpu.py
train_aegis_controlled_action_balanced_mt0_lora_cpu.py
train_aegis_single_token_balanced_mt0_lora_cpu.py
train_aegis_single_token_balanced_mt0_lora_512_cpu.py
evaluate_aegis_bilingual_mt0.py
The final winning experiment is represented by:
train_aegis_single_token_balanced_mt0_lora_512_cpu.py
Sayyad Asim
AEGIS AI
Industrial Intelligence Platform
Hugging Face:
syed7741
GitHub:
syedasim7741
AEGIS AI was developed as an AI-engineering portfolio project demonstrating the combination of:
The project is a prototype and does not claim production certification.