<-Reference Software Go to ToC

This chapter is informative.

1 Implementations

1.1 A resource-constrained Implementation

  • The Controller is a single process, or a library function on a computing board, that runs the Module and operates on interrupt call-backs.
  • The AIMs are in the Controller’s process; the Module is built from AIM Instance Metadata held locally.
  • The Controller is reached through a secure communication interface.
  • The User Agent acts on the Module at the request of its user.

1.2 An Implementation that is not resource-constrained

  • The Controller obtains the AIM Instance Metadata of the Module, and the Implementations it names, from the MPAI Store, after the two have authenticated each other, and verifies them.
  • The Controller instantiates the AIMs: in its own process, in other processes, or on AIM hosts on other machines, which it admits by the Trust Protocol.
  • The Controller establishes the Channels, runs the Module by exchange or continuously, and keeps its Trace.
  • User Agents drive the Module through the Controller API, locally or remotely over MPAI-MAS.

2 Examples of types

Table 1 – Examples of types

Type Meaning
byte[] bitstream_t An array of bytes of variable length.
{int32 frameNumber; int16 x; int16 y; byte[] frame} frame_t A struct_type with four members, frameNumber, x, y and frame: an int32, an int16, an int16 and an array of bytes of variable length.
{int32 i32 | int64 i64} variant_t A variant_type that is either an int32 or an int64.

3 Example of AIM Metadata

The AIM Metadata of Automatic Speech Recognition (MMC-ASR-V2.5) of MPAI-MMC: a Basic AIM whose Ports are identified by Data Type and, where a Data Type recurs on one side, Port Number. The fields that an AIM Instance Metadata fills in are shown as comments.

{ "Identifier":       {"ImplementerID": "IIDRA-assigned", "ImplementationID": "/* String from Implementer */", "AIMName": "MMC-ASR-V2.5"},
  "Header":            "MMC-ASR-V2.5",

  "APIProfile":       "Basic",
  "Description":      "Automatic Speech Recognition: receives an Audio Object and provides a Text Object and Speech Descriptors.",

  "InternalTypes":   [ ],

  "ExternalPorts":   [{"Name": "LanguageSelector",  "Direction": "Input",  "DataType": "OSD-SEL-V1.5",                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "AuxiliaryText",     "Direction": "Input",  "DataType": "OSD-TXO-V1.5",                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "SpeakerID",         "Direction": "Input",  "DataType": "OSD-IID-V1.5",                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "SpeechOverlap",     "Direction": "Input",  "DataType": "MMC-SOL-V2.5",                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "RecognisedText",    "Direction": "Output", "DataType": ["OSD-BTO-V1.5", "OSD-TXO-V1.5"], "PortNumber": 1,                     "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "SpeechDescriptors", "Direction": "Output", "DataType": "MMC-SDO-V2.5",                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "ImageSpeech",       "Direction": "Input",  "DataType": "OSD-BSO-V1.5", "PortNumber": 1,                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "ResponseSpeech",    "Direction": "Input",  "DataType": "OSD-BSO-V1.5", "PortNumber": 2,                   "IsOptional": true, "Technology": "", "Protocol": "", "IsRemote": ""},
                     {"Name": "TextQuestion",      "Direction": "Output", "DataType": "OSD-BTO-V1.5", "PortNumber": 2,                                       "Technology": "", "Protocol": "", "IsRemote": ""}],

  "SubAIMs":         [ ],

  "Topology":        [ ],

  "Implementations": [{ "ImplementationURI":"/* absolute URI locating the Implementation */",
                        "BinaryName":       "/* provided by implementer */",
                        "Architecture":     "/* x86-64 | ARM64 */",
                        "MASPort":          443,
                        "Firewall":         [{ "Protocol": "TCP | UDP", "Version": "IPV4 | IPV6", "Direction": "Ingress | Egress | Both", "Range": "9990[-9999]", "Source": "0.0.0.0/0" }],
                        "OperatingSystem":  "/* Windows | Linux | MacOS */",
                        "Version":          "/* implementer version */",
                        "Source":           "/* AIMStorage | MPAIStore */",
                        "Destination":      "/* provided by implementer */" }],

  "ResourcePolicies":[{ "Name": "Memory",               "Minimum": "/* GB */",             "Maximum": "/* GB */",             "Request": "/* GB */" },
                      { "Name": "CPU:Number",           "Minimum": "/* integer, 0=all */", "Maximum": "/* integer, 0=all */", "Request": "/* integer */" },
                      { "Name": "CPU:Class",            "Minimum": "/* string */",         "Maximum": "/* string */",         "Request": "/* string */" },
                      { "Name": "GPU:Number",           "Minimum": "/* integer, 0=all */", "Maximum": "/* integer, 0=all */", "Request": "/* integer */" },
                      { "Name": "GPU:CUDA:Class",       "Minimum": "/* string */",         "Maximum": "/* string */",         "Request": "/* string */" },
                      { "Name": "GPU:CUDA:FrameBuffer", "Minimum": "/* GB */",             "Maximum": "/* GB */",             "Request": "/* GB */" },
                      { "Name": "GPU:CUDA:MemorySpeed", "Minimum": "/* GB/s */",           "Maximum": "/* GB/s */",           "Request": "/* GB/s */" } ],

  "DataXMData":         { },

  "Documentation":     [{"Type": "Tutorial", "URI": "https://mpai.community/standards/mpai-mmc/v2-5/"}]}

4 Standards using MPAI-AIF V3.0

The following MPAI Standards specify AIMs and Composite AIMs whose Metadata is AIM Metadata of MPAI-AIF V3.0:

Table 2 – Standards using MPAI-AIF V3.0

Standard Title
MPAI-MMC Multimodal Conversation
MPAI-PAF Portable Avatar Format
MPAI-OSD Object and Scene Description
MPAI-CAV Connected Autonomous Vehicle – Technologies
MPAI-AIH AI for Health – Health Secure Platform

An example of a Workflow is given in Workflow Description.

<-Reference Software Go to ToC