Tiles
AppleDownload
Skip to Content
MIR Extension

MIR Extension

MIR

Based on the specifications defined by Darkshapes’ MIR (Machine Intelligence Resource), a naming schema for AIGC and ML work, and Ollama’s Modelfile, this blueprint aims to extend Modelfile’s capabilities to support intent-based model chaining driven by the prompt, with an implementation currently in progress.

# Base model (required) FROM ./model.safetensors # MIR identifier (custom extension) # Format: mir:[domain].[architecture].[series]:[compatibility] MIR "mir:model.art.gpt-oss:mlx-q4" # License for this model LICENSE """ Apache-2.0 """ # System prompt SYSTEM """ You are a lightweight technical model. """ # Prompt formatting TEMPLATE "{{ .Prompt }}" # Add adapters (optional LoRA layers) ADAPTER ./adapter1.safetensors # Runtime parameters PARAMETER temperature 0.7 PARAMETER num_ctx 4096 # Initial message context MESSAGE user "Hello." MESSAGE assistant "Hi there!"

MIR Reference

Copied verbatim from: github.com/darkshapes/MIR:

MIR (Machine Intelligence Resource)

A naming schema for AIGC/ML work.

The MIR classification format seeks to standardize and complete a hyperlinked network of model information, improving accessibility and reproducibility across the AI community.

Example:

mir : model . transformer . clip-l : stable-diffusion-xl

mir : model . lora . hyper : flux-1 ↑ ↑ ↑ ↑ ↑ [URI]:[Domain].[Architecture].[Series]:[Compatibility]

Code for this project can be found at darkshapes/MIR on GitHub.

Definitions

Like other URI schema, the order of the identifiers roughly indicates their specificity from left (broad) to right (narrow).

DOMAINS

↑Most Specific/Decentralized

Dev

Pre-release or under evaluation items without an identifier in an expected format
Anything in in-training, pre-public release, and items under evaluation

Meant to be created by anyone, derived from code and file analysis

  • Contextual
  • Layers of neural networks
  • Dynamic
Model

Publicly released machine learning models with an identifier in the database
Model weight tensors with arbitrary locations and quantitative dimensions

Meant to be created by file hosts, derived from research pre-prints

  • Contextual
  • Layers of neural networks
  • Fixed
Ops

References to specific optimization or manipulation techniques
Algorithms, optimizations and procedures for models

Meant to be created by code libraries, derived from research pre-prints

  • Universal
  • Attributes of neural networks
  • Dynamic
Info

Metadata of layer names or settings with an identifier in the database
Information about the model and tensor specifications

Meant to be created by standards community, derived from code and file analysis

  • Universal
  • Attributes of neural networks
  • Fixed

↓Most General/Centralized

ARCHITECTURE

Broad and general terms for system architectures:

AbbreviationDescription
GRUGated recurrent unit
RBMRestricted Boltzmann machine
TAETiny Autoencoder
VAEVariable Autoencoder
LSTMLong Short-Term Memory
RESNETResidual Network
CNNConvolutional Neural Network
RCNNRegion-based Convolutional Neural Network
RNNRecurrent Neural Network
BRNNBi-directional Recurrent Neural Network
GANGenerative Adversarial Model
SSMState-Space Model
DETRDetection Transformer
VITVision Transformer
MOEMixture of Experts
AETAutoencoding Transformer
STSTSequence-to-Sequence Transformer
ARTAutoregressive Transformer
LORALow-Rank Adaptation
CONTROLNETControlnet
UNCLASSIFIEDUnknown

SERIES

Foundational network and technique types.

Rules
  • Lowercase, hyphen only
  • Remove parameter size, non-breaking semantic versioning, library names

Example: tencent-hunyuan/hunyuandiT-v1.2-diffusers
SERIES : hunyuandit-v1

Example: black-forest-labs/FLUX.1-dev
SERIES : flux1dev

In regex (roughly):

BREAKING*SUFFIX = r".*(?:-)(prior)$|.*(?:-)(diffusers)$|.\*[\*-](\d{3,4}px|-T2V$|-I2V$)" PARAMETERS*SUFFIX = r"(\d{1,4}[KkMmBb]|[.*-]\d+[\._-]\d+[Bb][._-]).\*?$" SEARCH*SUFFIX = r"\d+[.*-]?\d+[BbMmKk](it)?|[._-]\d+[BbMmKk](it)?"

COMPATIBILITY

Implementation details based on version-breaking changes, configuration inconsistencies, or other conflicting indicators that have practical application.

Rules

An additional SERIES label for identifying cross-compatibility

Notes

If you would like to regenerate or update the example file here, use nnll:

MIR is inspired by:

Last updated on