Package smile.llm.model.minimax


package smile.llm.model.minimax
  • Class
    Description
    MiniMax-M3 language model: loads a BF16 checkpoint and serves requests through the ModelExecutor step API (bind, prefill, decode, finish).
    Placement of this process's ranks in a multi-node model.
    MiniMax-M3 grouped-query attention: per-head Gemma QK norm, partial RoPE, no output gate.
    One MiniMax-M3 decoder block: pre-norm, GQA/MSA attention, residual, post-norm, dense FFN or MoE, residual.
    A non-leader node of a multi-node MiniMax-M3: loads its share of the experts on its GPUs, joins the leader's NCCL communicator and executes every call the leader mirrors (MiniMax.serveCluster(ClusterFollower)).
    Key-only cache of MSA index keys, one [numKeyHeads, indexDim] vector per token and sparse layer.
    Gated feed-forward with the swigluoai activation, used for the dense layers, the shared expert and every routed expert: w2(glu * (up + 1)) where glu = gate * sigmoid(alpha * gate), gate is clamped above at limit and up to [-limit, limit].
    MiniMax-M3 text model: embeddings, decoder blocks, final norm and LM head.
    MiniMax-M3 text-tower hyperparameters: GQA with MiniMax Sparse Attention (MSA) and a sigmoid-routed mixture of experts.
    MiniMax-M3 sparse mixture of experts: sigmoid router with a selection bias, top-k routed experts and an always-on shared expert.
    A MiniMax-M3 prompt with its images and videos preprocessed: the token ids (every media placeholder expanded to one id per vision token) plus the patch matrices and grids the vision tower encodes during prefill.
    One rank of expert parallelism: this rank owns a contiguous range of the routed experts of every MoE layer and allocates their weights directly on device.
    MiniMax-M3 tokenizer: NFC normalization, then byte-level BPE with the model's case-aware split regex.
    One entry of added_tokens in tokenizer.json.
    Hyperparameters of the MiniMax-M3 vision encoder (CLIP-style ViT with 3D RoPE), the projector and the 2x2 patch merger, read from vision_config of config.json.
    Turns decoded images and video frames into the patch matrices of the MiniMax-M3 vision tower, following the reference MiniMaxM3VLImageProcessor / MiniMaxM3VLVideoProcessor: smart_resize to a multiple of patch * merge pixels under a pixel budget, bicubic antialiased resize, rescale and normalize, pad the frame count to a multiple of the temporal patch size by repeating the last frame, then cut into patches ordered by (time group, merge block row, merge block column, row in block, column in block), each patch flattened as (channel, time, row, column).
    Patches of one image or video and its (t, h, w) grid.
    MiniMax-M3 vision encoder: a CLIP-style ViT (Conv3d patch embedding, pre-LayerNorm, 32 pre-norm blocks with a partial 3D RoPE over t/h/w, no post-LayerNorm), followed by the projector MLP and the 2x2 patch-merge MLP that map patches to language-model embeddings.
    How the model's linear weights are stored and multiplied.