MominoMoE-v2 is a LoRA adapter fine-tuned on top of Qwen/Qwen3-0.6B for real-time kernel fault diagnosis. It is the AI subsystem of MominOS — a bare-metal x86-64 operating system built from scratch.
This is v2, succeeding MominoMoE_1.2B (a 1.2B custom MoE model trained from scratch). v2 uses a pretrained base with LoRA fine-tuning on synthetic kernel fault data, producing far better output quality at a fraction of the size.
Given a structured kernel fault report (MominOS harness envelope format), the model:
Identifies the fault type (page fault, GPF, stack overflow, etc.)
Explains the root cause in plain terms
Suggests a specific corrective action
Harness envelope format
[SYSTEM] MominOS kernel fault diagnostician. Analyze and suggest a fix.
[FAULT] vector=14 (Page Fault) err=0x0006 rip=0x0000000000401234 cr2=0x0000000000000008 tid=3 cwd=/bin
[REGISTERS] rax=0x0 rdi=0x8 rsi=0x100 rsp=0x7fff00100ff8
[RECENT_SYSCALLS]
SYS_OPEN /bin/sh 0 -> 3
SYS_READ 3 4096 -> 4096
[LOG]
[VFS] opened /bin/sh
[SCHED] thread 3 running
[QUERY] Diagnose this fault and suggest a corrective action.
How to Use
You need both the base model (1.4 GB) and this adapter (39 MB):
python
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
45base_id ="Qwen/Qwen3-0.6B"6adapter_id ="Momin-Aldahdouh/MominoMoE-v2"78tokenizer = AutoTokenizer.from_pretrained(adapter_id)9model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype=torch.float16, device_map="auto")10model = PeftModel.from_pretrained(model, adapter_id)11model.eval()1213SYSTEM =(14"You are MominOS, a kernel fault diagnostician running embedded in an x86-64 OS. "15"Given a kernel fault report in harness envelope format, identify the fault type, "16"root cause, and suggest a specific corrective action. Be concise and precise. /no_think"17)1819fault_prompt ="""[FAULT] vector=14 (Page Fault) err=0x0006 rip=0x0000000000401234 cr2=0x0000000000000008 tid=3 cwd=/bin
2021[REGISTERS] rax=0x0 rdi=0x8 rsi=0x100 rsp=0x7fff00100ff8
2223[RECENT_SYSCALLS]
24 SYS_OPEN /bin/sh 0 -> 3
25 SYS_READ 3 4096 -> 4096
2627[LOG]
28 [VFS] opened /bin/sh
29 [SCHED] thread 3 running
3031[QUERY] Diagnose this fault and suggest a corrective action."""3233messages =[34{"role":"system","content": SYSTEM},35{"role":"user","content": fault_prompt},36]37text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)38inputs = tokenizer(text, return_tensors="pt").to(model.device)3940with torch.no_grad():41 out = model.generate(**inputs, max_new_tokens=200, temperature=0.1, do_sample=True)4243response = tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)44print(response)
Training
Data
10,000 synthetic kernel fault diagnosis samples generated by training/generate_kernel_data.py. Each sample is a harness envelope prompt paired with a structured diagnosis response.
Input: Page fault at cr2=0x8, err=0x6 (write, non-present, user mode)
MominoMoE-v2:
Fault type: Null pointer dereference (write). CR2=0x8 indicates a write to offset 8 of a NULL pointer — likely a struct field access on an uninitialized pointer. err=0x6 confirms: write access, page not present, user mode. Corrective action: validate the pointer before dereferencing in the caller at RIP=0x401234. Add a NULL check before the struct field write.
Predecessor
MominoMoE_1.2B — a 1.2B custom MoE transformer trained from scratch. It produced poor results on kernel prompts because the training data was generic web API trajectories rather than OS/kernel fault data.
Citation
bibtex
1@misc{mominomoe2,
2 author = {Momin Aldahdouh},
3 title = {MominoMoE-v2: LoRA-finetuned kernel fault diagnostician for MominOS},
4 year = {2026},
5 url = {https://huggingface.co/Momin-Aldahdouh/MominoMoE-v2}
6}