TensorPlay AI
Open navigation
MegaLM — Inference in motion, an inference engine by TensorPlay
MegaLM by TensorPlay

High-performance inference, powered by TensorPlay.

MegaLM

MegaLM is the high-performance inference engine of the TensorPlay ecosystem. Built on the transparent TensorPlay compute stack, it delivers native model execution and OpenAI-compatible serving on consumer GPUs.

Overview

MegaLM builds the model inference hot path directly on TensorPlay, without relying on Transformers for execution. It targets single-machine consumer GPUs while balancing high throughput, long contexts, and straightforward deployment.

The engine exposes OpenAI-compatible /v1/chat/completions, /v1/completions, and /health endpoints, so it can replace an existing serving backend without changing the application pipeline, model weights, or numerical precision.

Core capabilities

  • Native model execution: the inference hot path runs on the native TensorPlay compute stack.
  • Paged attention and prefix caching: paged KV cache and prefix reuse reduce repeated computation.
  • Adaptive KV cache: cache capacity is determined automatically from the device memory budget.
  • Quantized MoE: optimized for group-128 INT4 weights with a BF16 compute path.
  • OpenAI-compatible serving: chat completions, completions, and health-check endpoints.
  • Multiple model sources: local checkpoints plus MegaHub / Hugging Face / ModelScope repo IDs.

Performance highlights

On a single RTX 3090 (24 GB), MegaLM reaches a peak output throughput of 643.3 tokens/s with Inkling 2 Mini, and 39.5% higher throughput than llama.cpp at matched concurrency 32.

In the OXR document parsing workflow, MegaLM cuts end-to-end latency for a 14-page IEEE paper from 24.43 s to 16.71 s (about 1.46× throughput), with 99.93% text similarity between the two Markdown outputs.

The news posts below include full benchmark settings, data tables, and reproduction notes.

Quick start

Linux with an NVIDIA Ampere or newer GPU and Python 3.12+ are required. After installation, start an OpenAI-compatible server with a single command:

# Linux + NVIDIA Ampere+, Python 3.12+
python -m pip install tensorplay
python -m pip install -e .
# optional: load models by Hub repo ID
python -m pip install -e '.[hub]'

# start the server
megalm-server --model <your-model> --served-model-name <name> --host 127.0.0.1 --port 8000

# health check
curl http://127.0.0.1:8000/health

Model support

MegaLM supports local checkpoints as well as repo IDs from MegaHub, Hugging Face, and ModelScope.

  • Thinking Machines Inkling 2 Mini: looped Transformer + sparse MoE, 643.3 tokens/s on a single RTX 3090.
  • SoMarkAI OXR-1.0: long-context document parsing for page-level reading-order prediction.
  • Mainstream open models such as Qwen3-8B: loaded directly by Hub repo ID.

Resources

Brand & ecosystem

MegaLM — Inference in motion. High-performance inference, powered by TensorPlay.

MegaLM is part of the open TensorPlay ecosystem, sharing its transparent engineering approach with the core framework, MegaHub, and other projects.

Ask DeepWiki