Run this model with HF Jobs

Run Cyrax321/MIEU-M1-Mini on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Cyrax321/MIEU-M1-Mini. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Cyrax321/MIEU-M1-Mini on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Cyrax321/MIEU-M1-Mini. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Cyrax321/MIEU-M1-Mini. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

MIEU-M1-Mini

MIEU-M1-Mini is the causal structured-consolidation model of the MIEU bi-temporal agent memory architecture. Given a conversational turn, timestamp, and candidate memories retrieved by MIEU-M1-Nano, it emits deterministic E-R-V-T-v1 JSON state transitions (ADD, UPDATE, DELETE, NOOP) to maintain a consistent, auditable bi-temporal knowledge store.

MIEU-M1 Model Family

Model Role Size Formats Link
MIEU-M1-Nano Gatekeeper, Conflict Reranker & Bi-Encoder 149M FP32, FP16, ONNX Cyrax321/MIEU-M1-Nano
MIEU-M1-Mini (this repo) Bi-Temporal JSON Consolidator (E-R-V-T-v1) 600M (749M pipeline) FP32, FP16, GGUF Cyrax321/MIEU-M1-Mini
Source Code & Pipeline Training, SQLite Bi-Temporal Store & Eval — Python (Apache-2.0) github.com/Cyrax321/mieu

Model Summary

Property Specification
Model Variant MIEU-M1-Mini
Model Category Causal Bi-Temporal Memory Consolidator (E-R-V-T-v1 JSON Generator)
Parameter Count 749M total (149M + 600M)
Schema & Operations E-R-V-T-v1 (ADD, UPDATE, DELETE, NOOP)
Max Context Length 2048 tokens (non-thinking deterministic mode, temperature=0.0)
Distribution Formats PyTorch HF (fp32/, fp16/), GGUF (MIEU-M1-Mini-f16.gguf, Q4_K_M, Q8_0)
License Apache-2.0

Architecture & Bi-Temporal Pipeline

MIEU-M1-Mini operates as Stage 2 of the MIEU memory system, downstream of MIEU-M1-Nano gating and SQLite hybrid retrieval:

flowchart LR
    G["MIEU-M1-Nano Gate & Top-5 Reranked Atoms"] --> P["Prompt (Turn + Timestamp + Candidate Atoms + Conflict Probs)"]
    P --> MINI["MIEU-M1-Mini (Causal Consolidator, non-thinking)"]
    MINI --> JSON["E-R-V-T-v1 JSON Batch: ADD / UPDATE / DELETE / NOOP"]
    JSON --> VER["Schema & Temporal Consistency Verifier"]
    VER --> DB["Bi-Temporal SQLite Store (t_valid, t_invalid, t_ingested)"]

Instead of overwriting facts destructively, every stored atom carries bi-temporal validity intervals $a = (\text{id}, e, r, v, t_{\text{valid}}, t_{\text{invalid}}, t_{\text{ingested}})$. An UPDATE or DELETE operation soft-invalidates the target atom by setting $t_{\text{invalid}} \leftarrow t_{\text{turn}}$ while preserving historical facts for point-in-time queries ($t_{\text{valid}} \le t_q < t_{\text{invalid}}$).

Mathematical Formulation

1. Bi-Temporal State Transition Constraint

For a candidate batch $\mathcal{B} = {o_1, \dots, o_m}$ applied at turn timestamp $t_{\text{turn}}$, the deterministic verifier enforces:

  • ADD: $(e, r, v)$ must not duplicate an already-active atom ($t_{\text{invalid}} = \varnothing$).
  • UPDATE / DELETE: target_id must reference an existing active atom, and temporal ordering $t_{\text{valid}}(o) \ge t_{\text{valid}}(\text{target})$ must hold.

2. Alignment Objective: Contrastive DPO with SFT Regularization

After LoRA Supervised Fine-Tuning (SFT), MIEU-M1-Mini is aligned using Contrastive Direct Preference Optimization (dpo_with_sft_loss, $\beta=0.1$, $\lambda_{\text{SFT}}=0.05$) over offline contrastive pairs blended with on-policy Verifier-Guided DPO (VO-DPO) rollouts:

LDPO+SFT(θ)=−E(x,yw,yl) ⁣[log⁡σ ⁣(βlog⁡πθ(yw∣x)πSFT(yw∣x)−βlog⁡πθ(yl∣x)πSFT(yl∣x))]+λSFT LNLL(πθ;yw∣x)\mathcal{L}_{\text{DPO+SFT}}(\theta) = -\mathbb{E}_{(x, y_w, y_l)}\!\left[\log \sigma\!\left(\beta \log \frac{\pi_\theta(y_w \mid x)}{\pi_{\text{SFT}}(y_w \mid x)} - \beta \log \frac{\pi_\theta(y_l \mid x)}{\pi_{\text{SFT}}(y_l \mid x)}\right)\right] + \lambda_{\text{SFT}} \, \mathcal{L}_{\text{NLL}}(\pi_\theta; y_w \mid x)

where rejected rollouts $y_l$ are automatically tagged by the deterministic verifier for json_invalid, duplicate_add, wrong_target_id, hallucinated_delete, or missing_update.

Evaluation Summary

Evaluation metrics have not yet been attached to this bundle. Run python3 evaluation/evaluate.py and re-publish to populate this section.

Quick Start

1. Run GGUF Directly with llama.cpp or Ollama

# llama.cpp (Q4_K_M, ~373 MiB)
llama-cli -hf Cyrax321/MIEU-M1-Mini:Q4_K_M -p "<turn prompt>" -n 160 --temp 0

# Ollama
ollama run hf.co/Cyrax321/MIEU-M1-Mini:Q4_K_M

2. Run with transformers (no extra repo required)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo_id = "Cyrax321/MIEU-M1-Mini"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, torch_dtype=torch.float16, device_map="auto").eval()

messages = [
    {"role": "user", "content": "Timestamp: 2025-05-01\nTurn: I moved from Austin to Seattle today."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
    out = model.generate(**inputs, max_new_tokens=160, do_sample=False)
print(tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

3. Run with Full MIEU Pipeline (github.com/Cyrax321/mieu)

from mieu.memcore import MemCoreConfig, MemCoreEngine

engine = MemCoreEngine("Cyrax321/MIEU-M1-Mini", MemCoreConfig(temperature=0.0))
batch = engine.consolidate("I moved from Austin to Seattle today.", timestamp="2025-05-01", candidates=[])
print(batch.to_json())

Technical Details & Backbone

Detail Value
Base Backbone Qwen/Qwen3-0.6B (merged SFT + DPO weights)
Training Datasets nayohan/multi_session_chat, AlekseyKorshuk/persona-chat, YuWangX/Memalpha-full, MIEU MemSynth
SFT Regime LoRA (r=32, alpha=64, dropout=0.05, all linear projections, lr=1.5e-4, 1 epoch, max_seq_length=1024)
DPO / VO-DPO Regime LoRA (beta=0.1, sft_reg_lambda=0.05, lr=2.0e-5, 1 epoch, blended on-policy VO-DPO + offline contrastive pairs)
Precision & Hardware Profile FP16, sdpa attention, gradient checkpointing, seed 42
Repository Contents Root HF weights (model.safetensors, config.json, tokenizer), fp32/, fp16/, gguf/, evaluation/, logs/, configs/
Author Cyrax321 (GitHub)
Intended Scope & Limitations Specialized for structured E-R-V-T-v1 memory operations in non-thinking mode (enable_thinking=false); not intended for general open-ended chat or reasoning tasks.

Citation

@software{mieu_m1_mini_2026,
  title={MIEU-M1-Mini: Bi-Temporal Agent Memory Consolidator with Verifier-Guided DPO},
  author={Cyrax321},
  year={2026},
  url={https://huggingface.co/Cyrax321/MIEU-M1-Mini}
}
Downloads last month
15
Safetensors
Model size
0.6B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Cyrax321/MIEU-M1-Mini

Finetuned
Qwen/Qwen3-0.6B
Finetuned
(1,553)
this model

Datasets used to train Cyrax321/MIEU-M1-Mini