| Internet-Draft | RTP Payload for MLM Tokens | December 2026 |
| Mekuria | Expires 7 June 2027 | [Page] |
This document specifies an RTP payload format for AI data streams exchanged by distributed multi-modal AI pipelines. It covers two representations: discrete tokens (codebook indices) and continuous embeddings such as the output of a vision encoder in a split vision-language model. It reuses the shared AI Data Unit header defined for the RTP, Media over QUIC Transport (MOQT), and HTTP bindings, and maps timing, sequencing, priority, and multiplexing onto native RTP mechanisms. It defines per-element position lists for selected (pruned) token subsets, an end-of-group indication for sender-side truncation, and element-aligned packetization that turns packet loss into the loss of whole tokens. It addresses the transport requirements of the companion framework document and establishes the registries for the Representation Type and Modality code points shared with the other bindings.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 4 June 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Distributed multi-modal AI pipelines exchange AI data between encoding, inference, and decoding stages (see [I-D.discrete-token-transport-mlm] for motivation, the representation taxonomy, and the transport requirements REQ-1 through REQ-13). This document defines an RTP [RFC3550] payload format for such streams in real-time deployments.¶
Two representations are specified:¶
Discrete tokens (RType=0): integer codebook indices produced by vector quantization, as used by token-native multimodal models and neural codecs.¶
Continuous embeddings (RType=1): floating-point or quantized vectors, in particular the output of the vision encoder (vision transformer and projector) of a vision-language model whose language model runs remotely. This split is used by currently popular deployed vision-language models, and its carriage over RTP has been evaluated with measured task accuracy under packet loss [SA4-EMB].¶
The format uses a single, small payload header (shared with the MOQT [I-D.moqt-mlm-token-streams] and HTTP [I-D.http-mlm-tokens] specifications) carried after the RTP fixed header, with RTP itself providing timing, sequencing, and loss detection. Carrying AI data in this compact binary form, rather than as the text or JSON used by current AI-serving interfaces, keeps per-token wire cost close to the size of the data itself and removes serialization latency from the real-time path (see [I-D.discrete-token-transport-mlm] Sections 4.5 and 7.5).¶
Applicability. This payload format targets token streams that have a media clock and benefit from real-time delivery, typically the uplink from a device that tokenizes or encodes captured media. Generated tokens returned by a model are often delivered over HTTP [I-D.http-mlm-tokens]. This payload format is intended for RTP implementations that allow new payload formats to be added and for operator real-time media services.¶
Section 3 gives a short background on the data carried. Section 4 defines the payload format: the use of the RTP header, the payload header and payload data, packetization, positions, and token groups. Sections 5 to 7 cover receiver behaviour, priority and loss resilience, and model configuration. Section 8 defines the payload format parameters and their use in SDP, and Section 9 gives examples.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals.¶
This document uses the terms AI Data, Token, Discrete Token, Continuous Embedding, Representation Type, Modality, Layer, Codebook, Adapter, and Model Configuration as defined in [I-D.discrete-token-transport-mlm]. The data model is used consistently at three granularities, from the atomic element up to the unit of information:¶
the atomic payload unit. For discrete tokens, a single codebook index of b bits (16 by default). For continuous embeddings, a single vector (one token row) of dimension d in the negotiated element format (Section 4.3).¶
the unit of uniform handling -- one payload header (Section 4.2) plus elements of one token group that share the same handling attributes (representation type, modality, layer, and priority). An ADU is carried as exactly one RTP payload. Elements that differ in priority or layer are carried in separate ADUs, so that a single priority applies to the whole ADU. The only case in which content spans packets is an element too large for one packet, which is carried in a sequence of ADUs by element fragmentation (Section 4.4).¶
one or more ADUs that jointly represent one unit of information (e.g., all tokens of one image or one video frame); the token group is the unit mapped to a 3GPP PDU Set (Section 4.6).¶
the location of an element within the position space of its token group, for its representation type, modality, and layer (e.g., the patch row and column of a visual token in the frame's token grid, or the index of a token in an audio segment; Section 4.5).¶
the decision by a sender not to transmit the remaining elements of a token group (Section 4.6).¶
This section gives a short overview of the data carried; more background, measured traffic characteristics, and the transport requirements are given in [I-D.discrete-token-transport-mlm] Sections 3, 5, 7, and 8.¶
Discrete tokens. A tokenizer maps each segment of the input (e.g., an image patch or an audio frame) to the index of an entry of a learned codebook of K entries. An index needs ceil(log2 K) bits; codebooks of up to 65536 entries are common, so a token is commonly carried as a 16-bit integer, and larger codebooks use more bits. Hierarchical schemes such as Residual VQ produce several indices per segment, of decreasing importance.¶
Continuous embeddings. A modality encoder, for example the vision encoder of a vision-language model, maps each image patch (or group of patches) to a vector of dimension d in the input space of the language model; a frame typically yields a few hundred such vectors. Raw, a vector is a few kilobytes. A sender can keep only the most important vectors (token selection), reduce their dimension with a trained adapter, and quantize them, which can reduce a vector to a few hundred octets.¶
In both cases the tokens of one image, video frame, or audio segment form one unit of information, called a token group in this document. In reported evaluations, tokens differed in their importance to the task, and task accuracy degraded gradually when packets carrying whole tokens were lost ([I-D.discrete-token-transport-mlm] Section 7). The payload format is designed around these properties: each packet carries whole tokens, their positions where needed, and an importance value, and the end of each token group is signaled.¶
The codebook, encoder, adapter, and quantizer -- the model configuration -- are specific to a model and are needed to interpret the tokens. They are not defined or carried by this payload format; they are identified in signaling (Section 7).¶
An RTP packet of this payload format carries exactly one AI Data Unit after the RTP header: a payload header (Section 4.2) followed by the payload data (Section 4.3), as shown in Figure 1.¶
+---------------------------------------------------------------+ | RTP header [RFC3550], including any CSRC list and header | | extensions (Section 4.1) | +---------------------------------------------------------------+ | Payload header: 8 octets plus optional fields (Section 4.2) | +---------------------------------------------------------------+ | Payload data: Element Count elements (Section 4.3) | +---------------------------------------------------------------+
A dynamic PT (96-127) negotiated via SDP.¶
The media-clock instant of the token group (e.g., the capture time of the video frame) carried by the packet, satisfying REQ-4. Clock rate is negotiated in SDP (e.g., the audio sample rate, or 90000 for image/video). All packets of the same token group carry the same timestamp; the timestamp therefore also identifies the token group when no Group Identifier is used.¶
Per-packet sequencing per [RFC3550], used with Seq Start for loss and reordering detection (REQ-3).¶
Set to 1 on the last packet of a token group. A packet with T=1 MUST have M=1. This mirrors common RTP video usage.¶
Each media source and modality is sent as its own RTP stream with its own SSRC [RFC3550] [RFC7656]; for example, audio tokens and visual embeddings from the same device use two SSRCs, each with its own clock rate. The Modality field in the payload header describes the content. Per-packet priority and resilience (Section 6) require neither several SSRCs per source nor a layered structure.¶
The payload header is the AI Data Unit header shared by the three bindings (RTP, MOQT, HTTP), so that a payload is interpreted identically regardless of transport. The fixed part is 8 octets. Optional fields follow in the order shown, each present only when its flag is set; all fields are in network byte order:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver=1 | RType |Modal. | Layer |S|E|I|C| PRI |G|X|P|T|F| Rsv | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Element Count | Seq Start | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : Codebook/Model ID (16) : (present iff C=1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : Group Identifier (32) : : (present iff G=1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : Position 0 (16) : Position 1 (16) ... : : (Element Count entries, present iff P=1) : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : Payload data ... (Section 4.3) : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The header length is therefore 8 + 2*C + 4*G + 2*P*(Element Count) octets, computable from the fixed part alone.¶
Format version, MUST be 1. A receiver MUST discard an ADU with any other version.¶
Representation Type. 0 = Discrete-Token, 1 = Embedding (continuous embeddings), 0xF = Experimental; others unassigned (Section 12.2). (Satisfies REQ-11.) A receiver MUST discard an ADU with an RType it does not support. This payload format specifies RType=0 and RType=1 (Section 4.3).¶
0 AUDIO, 1 VIDEO, 2 IMAGE, 3 SPEECH, 4 METADATA, 5 IMAGE_TEXT, 6 VIDEO_TEXT, 7 SPEECH_TEXT, 8 GENERIC, 0xF EXPERIMENTAL; others unassigned (Section 12.3).¶
Optional, informational scalability layer (e.g., the Residual VQ quantization level, or an embedding precision/rank layer); 0 for single-level schemes. This field is descriptive metadata and MUST NOT be required for forwarding, dropping, or resilience decisions, which use PRI (Section 6).¶
S - when F=1, first fragment of the element. When F=0, S MUST be 1. E - when F=1, last fragment of the element. When F=0, E MUST be 1. I - independently decodable (a resynchronization point). C - Codebook/Model ID present (adds 2 octets). G - Group Identifier present (adds 4 octets). X - Extension present; reserved for future extensions. It MUST be 0 in this version. Because the length of an extension is not defined, a receiver MUST discard an ADU with X=1. P - Position List present (adds 2 octets per element; Section 4.5). T - End of token group: this is the last ADU the sender will send for the current token group, whether or not all of the group's elements were sent (Section 4.6). F - Element fragment: the packet carries part of a single element that is too large for one packet (Section 4.4).¶
Per-packet priority/importance: 1 = highest importance (protect), 15 = lowest (most droppable), and 0 = importance not specified. The values are aligned with the PDU Set Importance of [TS26.522]. A generic marking used for preferential scheduling, dropping, unequal loss protection, and sender-side truncation order (Sections 6 and 10); it does not depend on any layer structure.¶
Reserved, set to 0, ignored on receipt.¶
Number of elements carried in this ADU. It MUST NOT be 0, except in an end-of-group marker (Section 4.6). When F=1 it MUST be 1.¶
When F=0, the zero-based index, within the token group, of the first element of this ADU, counted separately for each combination of representation type, modality, and layer. It lets a receiver place the elements of an ADU in their token group even when other ADUs of the group are lost. A token group can therefore hold at most 65536 elements per such combination. When F=1, the zero-based octet offset, within the encoded element, of the first element octet carried in this packet; fragment offsets are therefore limited to 65535 octets.¶
Opaque identifier, present only if C=1, not interpreted by the transport (Section 7). It is a short label whose association with a model configuration is agreed out of band; it is not an encoding of the "codebook-id" parameter (Section 8.2).¶
Present only if G=1. An identifier that is constant across all AI Data Units of one token group -- one unit of information, e.g., one image, one video frame, or one audio segment. It is opaque to the transport and to network nodes, which use it only for equality (to group AI Data Units that belong together; see Section 4.6) and never parse or interpret it. Its scope is one RTP stream (SSRC); a sender MUST NOT reuse a value for another token group of the same stream while ADUs of the earlier group may still be in transit. An endpoint MAY additionally use it to associate the elements with an application-level frame, image, or request identifier.¶
Present only if P=1. Entry k gives the position of element k of this packet within the position space of its token group, encoded in the position format of Section 4.5. When P=0, the elements are contiguous: element k of the ADU is element Seq Start + k of its token group, for its representation type, modality, and layer, in the token order of the group (e.g., raster order for a grid).¶
The payload header is followed by the payload data: the concatenation of Element Count elements, each of the negotiated element width. Only the header fields are meaningful to the transport; the elements are opaque payload, interpretable only by an endpoint holding the codebook or model (Section 7). One ADU carries elements of one handling class (representation type, modality, layer, and PRI); elements of different layer or priority are placed in separate ADUs and, where they form one unit of information, are handled together as a token group (Section 4.6).¶
Discrete tokens (RType=0). The element is a codebook index of b bits, where b is given by the "token-bits" parameter (Section 8.2; default 16) and a codebook of K entries needs b >= ceil(log2 K). The indices are packed most significant bit first without gaps. The payload data of each packet starts on an octet boundary and its last octet is padded with zero bits, so that it is ceil(Element Count * b / 8) octets and a lost packet never affects the elements of another packet. With the default b=16, the payload data is a sequence of 16-bit unsigned, big-endian integers.¶
Continuous embeddings (RType=1). The element is one vector (one token row) of dimension d. The dimension and the element format are fixed per stream and negotiated in SDP (Section 8); they are not carried per packet:¶
number of components per vector, e.g., the language model hidden size (post-projector) or the reduced dimension output by an adapter.¶
the component format:¶
Floating-point components are in network byte order. For the integer formats ("int8", "int4"), each element is preceded by a 16-bit bfloat16 scale s, and the dequantized component value is s * q for each integer component q.¶
The encoded element width is therefore¶
W = (2 if elem-format is an integer format, else 0)
+ ceil(d * bits(elem-format) / 8) octets.
¶
Examples: d=256 int8: W = 258 octets. d=2048 bf16: W = 4096 octets. d=5120 int8: W = 5122 octets. Because fragment offsets are 16 bits (Section 4.2), W MUST NOT exceed 65536 octets when element fragmentation (F=1) is used.¶
Packetization is element-aligned, which is the basis of loss resilience: the impairment seen by the receiver is then the loss of whole elements, never a partly corrupted element.¶
A packet SHOULD carry as many elements as fit (Element Count > 1 where possible), because a discrete token is a few octets and per-packet overhead would otherwise dominate. Elements of a different layer or priority are placed in separate ADUs (Section 2), so a single PRI applies to the whole packet.¶
A sender MUST NOT split an element across packets unless W exceeds the payload capacity available for a single element. Otherwise each packet carries as many complete elements as fit in the available payload capacity (e.g., four d=256 int8 elements per packet of 1100 octets of payload, or several hundred discrete tokens). When the elements of a token group that share the same handling attributes do not fit in one packet, they are carried in several ADUs, each in its own packet, split at element boundaries. Each ADU carries the Seq Start of its first element within the token group (and, where P=1, the positions of its elements), so each packet is independently usable: a lost packet removes only the elements it carried.¶
An element whose width exceeds the payload capacity (typically a wide embedding vector) is carried in an ADU of its own and split by element fragmentation: every fragment sets F=1 and Element Count=1; Seq Start carries the octet offset of the fragment within the encoded element. The fragments do not overlap and together cover the element: the first (Seq Start=0) sets S=1, and the last, whose octets end at the element width, sets E=1. Every fragment sets P=1 and carries the position of the element, since Seq Start does not give it. A receiver MUST discard an element for which any fragment is missing at the time the token group is released (Section 5.2). For example, for d=2048 int8 (W = 2050 octets) an element spans two packets; for d=5120 int8 it spans five packets. The loss of any one of them removes that token only.¶
A sender may transmit a selected subset of the tokens of a token group (token selection or pruning), chosen by an importance measure, for example the most important visual tokens of a frame. The receiver then needs the original position of every received element, both to place it in the model's positional encoding and to tolerate loss without re-signaling.¶
When the elements of a token group are not the complete, ordered token sequence, the sender MUST set P=1 in every ADU of the group, so that every packet lists the positions of the elements it carries. Each packet is then self-describing: no separate per-frame metadata packet is needed, and losing a packet never makes other packets uninterpretable.¶
Each position is 16 bits, and its format depends on the Modality:¶
For VIDEO and IMAGE, the high-order octet is the token-grid row and the low-order octet the token-grid column (grids up to 256 x 256). The receiver does not need the grid size to place a token, so this format suits dynamic resolution.¶
For all other modalities, the position is the zero-based index of the element within its token group (up to 65536 elements), e.g., the index of an audio token within a segment.¶
Positions are relative to the token group and to the representation type, modality, and layer; elements of different layers may have the same position. For temporal token merging (one token group covering several frames), the token group is the merged unit and its RTP timestamp is that of its first frame; a temporal component of the position is not defined in this version and is for further study.¶
One or more ADUs often jointly carry one unit of information (e.g., all tokens of one image or video frame). Such a token group (Section 2) is the natural unit for coordinated handling and aligns with the 3GPP PDU Set concept. The packets of a token group share one RTP timestamp; a token group MAY in addition be identified by a common Group Identifier (G=1, Section 4.2) carried in every packet of the group, which lets a receiver or an endpoint-adjacent function group the packets without transport-specific cues. The RTP marker bit delimits the last packet of a group.¶
The sender sets T=1 (and M=1) on the last packet it sends for a token group, whether or not all of the group's elements were sent. If that packet has already been sent, the sender MAY send an end-of-group marker: an ADU with T=1, Element Count=0, S=E=1, F=0, P=0, C=0, Seq Start=0, no Position List, and no payload data. It ends the entire token group, across all layers. It carries the RType and Modality of the group, the group's RTP timestamp, and the group's Group Identifier (G=1) if one is used; its Layer field is set to 0 and ignored on receipt. The T flag lets the receiver distinguish packets that were never sent from packets that are delayed or lost, and release the group without waiting for its deadline.¶
A receiver MUST discard an ADU that it cannot interpret consistently, in particular when:¶
Ver is not 1, RType or Modality is not supported or not assigned, or X=1 (Section 4.2);¶
F=0 and S or E is 0, or F=1 and Element Count is not 1 or P=0;¶
Element Count is 0 and the ADU is not a valid end-of-group marker (Section 4.6);¶
F=0 and the payload length differs from the length computed from the header, Element Count, and the element width;¶
F=1 and Seq Start plus the number of element octets carried exceeds the element width, S=1 with a non-zero Seq Start, or the fragment overlaps another fragment of the same element; or¶
a position is outside the position space (Section 4.5), or occurs twice for the same representation type, modality, and layer within a token group. The fragments of one element (F=1) repeat the element's position and count as one element; this check applies to complete elements.¶
Discarding an ADU removes only its own elements; the rest of the token group remains usable.¶
The receiver forms the input of a token group from the complete elements received, placed at their positions. For discrete tokens, missing elements can be concealed, e.g., by repeating or interpolating the previous unit (Section 6.2). For continuous embeddings, missing elements MAY simply be omitted, in which case the token group is equivalent to a more strongly pruned one, which models that accept variable-length, position-aware input handle natively, or MAY be replaced by a concealment value such as the mean of the received embeddings; both approaches were used in reported evaluations.¶
A token group is released to the model when its end has been indicated (a packet with T=1 or M=1 has been received) and a receiver-chosen reordering window has then passed, or when a receiver-chosen deadline for the group expires, whichever comes first. The group is released with the elements received at that time. A jitter buffer MUST be able to release a token group with missing packets; it MUST NOT discard a token group only because some of its packets are missing.¶
Retransmission is not required. The evaluated configurations operated without retransmission and maintained task accuracy over a useful range of loss rates for both representations ([I-D.discrete-token-transport-mlm] Section 7.4); for continuous embeddings, element-aligned carriage kept task accuracy within about two points of the loss-free case at uniform packet loss up to 30 % [SA4-EMB]. RTP retransmission [RFC4588] MAY be used for high-priority ADUs when the deadline permits (Section 6.2).¶
This payload format does not rely on layered (SVC-style) transport or on several SSRCs per source. Importance is expressed per packet, and loss is handled generically by exploiting the intrinsic robustness of tokenized content. This may suit wireless and other lossy paths, where generic resilience and unequal error protection can be preferable to source-layer-aware dropping.¶
The PRI field (REQ-6) marks the relative importance of each packet (1 highest, 15 lowest, 0 not specified), and, where grouping is used, a common Group Identifier (Section 4.2) marks the packets of one token group. PRI is generic: single-level tokenizers, hierarchical ones (RVQ), and embeddings ranked by importance all use it. The Layer field, if present, is informational only.¶
PRI SHOULD reflect the relative importance of the elements in the ADU, for example the layer for hierarchical discrete tokens, or the score used for token selection (vector norm or attention). A sender SHOULD place elements of similar importance in the same ADU, so that PRI-based protection, network dropping (Section 6.3), and sender-side truncation (Section 4.6) all remove the least important tokens first. When no importance information is available, a sender SHOULD set PRI to 0 (not specified) in all ADUs.¶
Packet loss removes whole elements and never corrupts the remaining ones. For discrete tokens, each element within the codebook range is a valid symbol, so loss produces localized, concealable gaps rather than decoder failure, unless the model makes later tokens depend on earlier ones (see [I-D.discrete-token-transport-mlm] Section 7.2). A receiver treats an index outside the codebook range like a missing element. Receivers SHOULD conceal lost packets (e.g., repeat or interpolate the previous unit) and MAY use the I flag to resume cleanly at the next independently decodable unit. For continuous embeddings, the receiver proceeds with the elements received (Section 5.2).¶
Where residual loss is too high for concealment alone, generic protection MAY be added and applied according to PRI (unequal protection): RTP retransmission [RFC4588] for high-priority packets when the deadline permits, or forward error correction [RFC8627] / redundant transmission [RFC2198] weighted toward high-priority packets. These mechanisms are priority-driven, not layer-driven, and need no multi-SSRC structure.¶
Every field of the payload header is carried in the RTP payload and is therefore encrypted under SRTP. This payload format does not define an RTP header extension for network-visible marking. Where a network needs per-packet importance or token-group membership, existing mechanisms can be used, in particular the PDU Set marking RTP header extension of [TS26.522]. A sender using such a mechanism populates it consistently with the payload header, which remains the endpoint source of truth. Positions are never exposed outside the payload.¶
How the per-packet importance and the grouping reach network elements depends on the deployment and the direction of the flow. The mechanisms below are informative; they are outside the scope of this document and impose no requirement on any network node.¶
RTP header extension. When the PDU Set marking RTP header extension of [TS26.522] is used, each token group is mapped to a PDU Set, and the sender populates the PDU Set fields (including the PDU Set sequence number, the PDU sequence number within the set, the end indication, and the PDU Set Importance) according to [TS26.522]. PRI maps to the PDU Set Importance, whose values it shares. Any association between the Group Identifier and the PDU Set sequence number is local to the sender. Header extensions are visible to the network under plain SRTP, but not when they are encrypted, e.g., with [RFC9335] or [RFC6904].¶
Downlink (network to device). A 5G/6G user-plane function may use such marking to construct PDU Set information for the radio access network. This is a 3GPP matter, referenced here only as motivation.¶
Uplink (device to network). Mapping of importance to radio or QoS treatment on the uplink is implementation-specific; where supported, reflective QoS may be used to derive uplink treatment from the downlink. The uplink is the main direction for this payload format.¶
IP transport. A sender MAY map PRI to an IP DSCP value for differentiated handling within an administrative or operator domain. DSCP is commonly re-marked or ignored across the public Internet and is not relied upon as a general guarantee.¶
The sender and receiver must agree on everything needed to interpret the elements: for discrete tokens, the codebook; for continuous embeddings, the encoder (e.g., a vision encoder and projector), any dimension-reducing adapter (e.g., a trained down-projection at the sender paired with an up-projection at the receiver), and any fixed quantizer. This model configuration is opaque to this payload format, is never carried in band by it, and is handled per the binding modes of [I-D.discrete-token-transport-mlm] Section 10.7:¶
Implicit (out-of-band): C=0 and no identifier on the wire; both endpoints share the codebook or model by construction. This mode MUST be supported and is the default.¶
Reference: an opaque Codebook/Model ID is carried (C=1) or declared once in SDP with the "codebook-id" parameter. The identifier MAY, for example, include a hash of the configuration, so that a mismatch can be detected; a hash shows that a configuration is untampered only when the expected identifier is itself authenticated or pinned.¶
Explicit in-band distribution of codebook or model content is out of scope of this payload format.¶
Per-packet carriage of the Codebook/Model ID is NOT required; where an identifier is used it SHOULD be declared in SDP and C left 0. Since each payload type identifies one model configuration (Section 8.2), the in-band Codebook/Model ID is needed only where an application uses its own out-of-band mapping of such labels. Within one negotiated payload type, the Codebook/Model ID MUST NOT be used to switch to a different model configuration.¶
This section defines the media type of this payload format, its parameters, and their mapping to SDP. The parameters convey the session metadata of REQ-5.¶
application¶
mlm-tokens¶
rate (the RTP clock rate, when used with RTP); rtype (Section 8.2).¶
token-bits, emb-dim, elem-format, codebook-id (Section 8.2).¶
This media type is framed and binary; see Section 4.8 of [RFC6838]. With RTP, it is framed as an RTP payload, one AI Data Unit per packet (this document). As an HTTP message body it is a sequence of AI Data Units [I-D.http-mlm-tokens].¶
See Section 11.¶
The payload is interpreted with the model configuration identified in signaling (Section 7).¶
This document; [I-D.http-mlm-tokens] for use as an HTTP message body.¶
Distributed multimodal AI inference, for example split vision-language models.¶
Fragment identifier considerations: N/A.¶
Deprecated alias names: N/A; magic numbers: N/A; file extensions: N/A; Macintosh file type code: N/A.¶
Person and email address to contact for further information: Rufael Mekuria <rufael.mekuria@huawei.com>¶
rate REQUIRED with RTP. The RTP clock rate
(Section 8.4).
rtype REQUIRED. Representation Type: "token" or
"embedding".
token-bits For rtype=token: number of bits b per codebook
index, from 1 to 32 (Section 4.3); default 16.
Receivers MUST support 16.
emb-dim For rtype=embedding: REQUIRED. Vector dimension d.
elem-format For rtype=embedding: "bf16" (default), "fp16",
"fp8-e4m3", "int8", or "int4" (Section 4.3).
codebook-id OPTIONAL. Opaque identifier of the model
configuration (Section 7). At most one per payload
type; different model configurations use different
payload types. Its absence means the configuration
is agreed implicitly.
¶
The token-bits range and the elem-format values are defined by this document and extended only by revising it.¶
The syntax of the parameters, as carried in an SDP "a=fmtp" attribute or in the media type parameters, is defined using ABNF [RFC5234]:¶
mlm-params = mlm-param *( ";" *SP mlm-param )
mlm-param = rtype-p / tok-bits-p / emb-dim-p / elem-format-p
/ cb-id-p / ext-p
rtype-p = "rtype=" ( "token" / "embedding" )
tok-bits-p = "token-bits=" 1*2DIGIT ; 1 to 32
emb-dim-p = "emb-dim=" 1*5DIGIT
elem-format-p = "elem-format=" ( "bf16" / "fp16" / "fp8-e4m3"
/ "int8" / "int4" )
cb-id-p = "codebook-id=" 1*64id-char
ext-p = 1*id-char "=" 1*id-char ; unknown, ignored
id-char = ALPHA / DIGIT / "-" / "." / "_"
¶
Parameter names and the enumerated values are case-insensitive, as are ABNF string literals [RFC5234]; the value of codebook-id is compared case-sensitively. A parameter MUST NOT appear more than once. Receivers MUST ignore parameters they do not understand.¶
The media type ("application") is used in the SDP "m=" line, and the subtype ("mlm-tokens") as the encoding name in "a=rtpmap".¶
The RTP clock rate in "a=rtpmap" is the "rate" of the media type (e.g., 90000 for image and video, the sample rate for audio).¶
The remaining parameters are carried in "a=fmtp" as defined in Section 8.3.¶
One payload type describes one representation and one model configuration. Several model configurations are offered as several payload types; separate media sources or modalities use separate RTP streams (Section 4.1).¶
The offer/answer model [RFC3264] applies. The parameters of a payload type describe the RTP stream that is sent with that payload type.¶
Sendonly offer (e.g., a device offering its uplink): the offerer lists the payload types it is able to send. The answerer keeps those it can receive, with the same parameter values, and removes the others; the offerer sends using one of the payload types kept.¶
Recvonly offer: the offerer lists the payload types it is able to receive, possibly several with different parameters; the answerer sends using one of them.¶
Sendrecv: as required by [RFC3264], each endpoint lists the payload types, with parameters, that it is willing to both send and receive. An endpoint that needs different parameters in the two directions uses sendonly and recvonly media descriptions (or separate media descriptions) instead.¶
In declarative use (e.g., RTSP or SAP), the parameters describe the stream as sent. A receiver that does not support the declared rtype, token-bits, or element format MUST NOT join the session.¶
The following examples show how token groups are carried in RTP packets and how the payload format is declared in SDP. The sizes and values are example values, not recommendations. Flags not mentioned are 0; the payload header layouts themselves are illustrated in [I-D.discrete-token-transport-mlm] Section 10.10.¶
A device tokenizes each frame of a 30 frame/s video into 1024 discrete tokens with the default b=16 (2048 octets), from a codebook of at most 65536 entries; it uses an SDP declaration as in Example 3 of Section 9.3, but without the token-bits parameter. With a payload budget of 1200 octets, a frame does not fit in one packet, so it is carried in two ADUs, split at element boundaries:¶
Packet SN Timestamp M Payload header
1 n t 0 T=0, PRI=0, Element Count=596,
Seq Start=0 (8 + 1192 octets)
2 n+1 t 1 T=1, PRI=0, Element Count=428,
Seq Start=596 (8 + 856 octets)
¶
Both packets carry the timestamp t of the frame, and the next frame uses the timestamp t + 3000 (90 kHz clock). If packet 1 is lost, the receiver detects the gap from the sequence numbers, places the tokens of packet 2 at indices 596 to 1023 using Seq Start, and conceals the missing tokens (Section 5.2).¶
A device runs a vision encoder and an adapter on each frame, keeps the 64 most important tokens, and sends them with d=256 and elem-format "int8" (W = 258 octets), as declared in Example 2 of Section 9.3. It orders the tokens by importance and places four in each ADU, with their positions (P=1), so that each payload is 8 + 8 + 4 x 258 = 1048 octets:¶
Packet SN Timestamp M Payload header
1-4 n..n+3 t 0 PRI=1, P=1, Element Count=4,
Seq Start=0, 4, 8, 12
5-15 n+4..n+14 t 0 PRI=3, P=1, Element Count=4,
Seq Start=16, 20, ..., 56
16 n+15 t 1 PRI=3, P=1, T=1,
Element Count=4, Seq Start=60
¶
If the available rate drops after the tenth packet, which has already been sent without T=1, the sender stops and sends an end-of-group marker:¶
11 n+10 t 1 T=1, Element Count=0,
Seq Start=0 (8-octet payload)
¶
The receiver then releases the group with 40 tokens, at their positions, without waiting for its deadline (Section 5.2). If the PDU Set marking header extension of [TS26.522] is used, the frame is one PDU Set, the end indication is set on the packet with M=1, and the PDU Set Importance of each packet equals its PRI (Section 6.3).¶
In the following examples, lines of an "a=fmtp" attribute that are folded for display are shown indented; in an actual SDP the attribute is a single line. The examples use the RTP/AVPF profile [RFC4585]. Example 1 uses an implicitly agreed codebook (no codebook-id).¶
Example 1: a device sends audio tokens with an implicit codebook.¶
m=application 5004 RTP/AVPF 96 a=rtpmap:96 mlm-tokens/16000 a=fmtp:96 rtype=token a=sendonly¶
Example 2: a device sends vision-encoder embeddings for selected tokens (256 dimensions after an adapter, int8).¶
m=application 5006 RTP/AVPF 97 a=rtpmap:97 mlm-tokens/90000 a=fmtp:97 rtype=embedding;emb-dim=256;elem-format=int8; codebook-id=vt-a3b-p256 a=sendonly¶
Example 3: discrete video tokens from a codebook of 2^18 entries, carried as 18-bit indices.¶
m=application 5008 RTP/AVPF 98 a=rtpmap:98 mlm-tokens/90000 a=fmtp:98 rtype=token;token-bits=18 a=sendonly¶
Congestion control for RTP SHALL be used in accordance with [RFC3550] and with any applicable RTP profile, for example [RFC3551]. Senders SHALL implement the RTP circuit breakers of [RFC8083], and SHOULD use a congestion control algorithm that meets the requirements of [RFC8836], driven by RTCP feedback (e.g., with the RTP/AVPF profile [RFC4585]). A sender can reduce its rate by sending fewer elements per token group (token selection, Section 4.5), least important first (Section 6.1), and ending the group early (Section 4.6). How quickly AI senders can adapt the number of tokens to network conditions, and the mechanisms for doing so, are for further study.¶
A sender SHOULD pace the packets of a token group over the group interval rather than sending them in one burst, which can overflow receive buffers.¶
RTP packets using the payload format defined in this specification are subject to the security considerations discussed in the RTP specification [RFC3550], and in any applicable RTP profile such as RTP/AVP [RFC3551], RTP/AVPF [RFC4585], RTP/SAVP [RFC3711], or RTP/SAVPF [RFC5124]. However, as "Securing the RTP Protocol Framework: Why RTP Does Not Mandate a Single Media Security Solution" [RFC7202] discusses, it is not an RTP payload format's responsibility to discuss or mandate what solutions are used to meet the basic security goals like confidentiality, integrity, and source authenticity for RTP in general. This responsibility lies on anyone using RTP in an application. They can find guidance on available security mechanisms and important considerations in "Options for Securing RTP Sessions" [RFC7201]. Applications SHOULD use one or more appropriate strong security mechanisms. The rest of this section discusses the security-impacting properties of the payload format itself.¶
Confidentiality. Token and embedding streams inherit the sensitivity of the source data, since both can be reconstructed given the codebook or by embedding inversion (see [I-D.discrete-token-transport-mlm] Section 11). This applies fully to vision-encoder embeddings: although the image itself never leaves the device, its embeddings can reveal its content. Confidentiality protection, for example with SRTP [RFC3711], is therefore particularly important for this payload format.¶
Integrity and source authentication. Crafted tokens or embeddings injected into an inference pipeline can manipulate its output, so integrity protection and source authentication (e.g., SRTP) are particularly important. Keeping the codebook or model out of band (Section 7) reduces model-fingerprint exposure; an identifier that includes a hash of the configuration allows a mismatch to be detected without disclosing the configuration, and a tampered configuration to be detected when the expected identifier is authenticated or pinned.¶
Metadata exposure. Under SRTP the payload header is encrypted with the payload. Network-visible marking, where used (Section 6.3), reveals an importance pattern and token-group structure to on-path observers; header extensions can be encrypted with [RFC9335] or [RFC6904], at the cost of that visibility. Position lists, which indicate which regions of an image the sender considered important, are carried only in the encrypted payload.¶
Resource use. Depacketization of this payload format does not exhibit any significant non-uniformity in the receiver-side computational complexity for packet processing, and the payload format does not contain any active content. The cost of the model that consumes the elements is outside this payload format. A receiver MUST bound the resources it commits per token group and validate each ADU using Section 5.1, including its fragment and complete-element position checks.¶
IANA is requested to register the media type "application/mlm-tokens" defined in Section 8.1 in the "Media Types" registry, following [RFC6838] and [RFC4855]. This document does not register an RTP header extension.¶
IANA is requested to create a new registry group "AI Data Unit Parameters" and, within it, the "AI Data Representation Type" registry for the 4-bit RType field of the AI Data Unit header (Section 4.2), which is shared by this document, [I-D.moqt-mlm-token-streams], and [I-D.http-mlm-tokens]. The registration policy is IETF Review [RFC8126]. Each entry has a value, a name, and a reference. The initial contents are:¶
Value Name Reference
0x0 Discrete-Token this document
0x1 Embedding this document
0x2-0xE Unassigned
0xF Experimental (not to be this document
registered)
¶
IANA is requested to create, within the "AI Data Unit Parameters" registry group, the "AI Data Modality" registry for the 4-bit Modality field of the AI Data Unit header (Section 4.2). The registration policy is IETF Review [RFC8126]. Each entry has a value, a name, the position format used (Section 4.5), and a reference. The initial contents are:¶
Value Name Position format Reference
0x0 AUDIO index this document
0x1 VIDEO row/column this document
0x2 IMAGE row/column this document
0x3 SPEECH index this document
0x4 METADATA index this document
0x5 IMAGE_TEXT index this document
0x6 VIDEO_TEXT index this document
0x7 SPEECH_TEXT index this document
0x8 GENERIC index this document
0x9-0xE Unassigned
0xF EXPERIMENTAL index this document
(not to be registered)
¶
Mapping to [I-D.discrete-token-transport-mlm] requirements:¶
REQ-1 Low latency RTP/UDP real-time delivery; small packets.
REQ-2 Batching/compact Element Count batching (many same-class
elements per ADU); compact binary (b-bit
indices, quantized embedding formats) over
text/JSON (Sections 4.3, 4.4).
REQ-3 Sequencing RTP sequence number + Seq Start.
REQ-4 Timestamping RTP timestamp (per token group).
REQ-5 Metadata SDP fmtp (Section 8) + header fields.
REQ-6 Priority Per-packet PRI, 0 = not specified (+
optional Group Identifier); network-visible
marking via existing mechanisms
([TS26.522], DSCP); no layering required
(Section 6).
REQ-7 Partial reliab. Element-aligned packets; intrinsic token
resilience + concealment; embeddings
proceed with received elements; optional
priority-driven FEC/RTX; group-relative
Seq Start; I/F framing (Sections 4.4, 5,
6.2).
REQ-8 Multiplexing One SSRC per media source / modality.
REQ-9 Security Strong security mechanisms per [RFC7202],
e.g., SRTP (Section 11).
REQ-10 Codebook agree. Opaque, out-of-band by default (Section 7).
REQ-11 Rep-type signal RType field in the header (Section 4.2).
REQ-12 Positions Per-packet Position List (P flag,
Section 4.5).
REQ-13 Adaptation End-of-group signal (T flag / marker,
Section 4.6); pacing; rate adaptation for
further study (Section 10).
¶
The author thanks the contributors to the 3GPP SA4 study on 6G media, in particular Qualcomm, NTT DOCOMO, vivo, and MediaTek, whose evaluation results, including the carriage of continuous embeddings over RTP [SA4-EMB], informed this document. The views expressed here are those of the author and do not necessarily represent those of 3GPP or of the contributing companies.¶