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.
Instructions to use Cyrax321/MIEU-M1-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cyrax321/MIEU-M1-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Cyrax321/MIEU-M1-Mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Cyrax321/MIEU-M1-Mini") model = AutoModelForCausalLM.from_pretrained("Cyrax321/MIEU-M1-Mini", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Cyrax321/MIEU-M1-Mini with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Cyrax321/MIEU-M1-Mini:Q4_K_M # Run inference directly in the terminal: llama cli -hf Cyrax321/MIEU-M1-Mini:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Cyrax321/MIEU-M1-Mini:Q4_K_M # Run inference directly in the terminal: llama cli -hf Cyrax321/MIEU-M1-Mini:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Cyrax321/MIEU-M1-Mini:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Cyrax321/MIEU-M1-Mini:Q4_K_M
Use Docker
docker model run hf.co/Cyrax321/MIEU-M1-Mini:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Cyrax321/MIEU-M1-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Cyrax321/MIEU-M1-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cyrax321/MIEU-M1-Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Cyrax321/MIEU-M1-Mini:Q4_K_M
- SGLang
How to use Cyrax321/MIEU-M1-Mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Cyrax321/MIEU-M1-Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cyrax321/MIEU-M1-Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Cyrax321/MIEU-M1-Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cyrax321/MIEU-M1-Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Cyrax321/MIEU-M1-Mini with Ollama:
ollama run hf.co/Cyrax321/MIEU-M1-Mini:Q4_K_M
- Unsloth Desktop
- Pi
How to use Cyrax321/MIEU-M1-Mini with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Cyrax321/MIEU-M1-Mini:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Cyrax321/MIEU-M1-Mini:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Cyrax321/MIEU-M1-Mini with Docker Model Runner:
docker model run hf.co/Cyrax321/MIEU-M1-Mini:Q4_K_M
- Lemonade
How to use Cyrax321/MIEU-M1-Mini with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Cyrax321/MIEU-M1-Mini:Q4_K_M
Run and chat with the model
lemonade run user.MIEU-M1-Mini-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Cyrax321/MIEU-M1-Mini with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Cyrax321/MIEU-M1-Mini:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default Cyrax321/MIEU-M1-Mini:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Cyrax321/MIEU-M1-Mini with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Cyrax321/MIEU-M1-Mini:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "Cyrax321/MIEU-M1-Mini:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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_idmust 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:
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