Mjolnir
Copyright 2026 Mieszko Syty (ms1design)

This product is licensed under the Apache License, Version 2.0 (see LICENSE),
except where a file states otherwise. It includes or modifies the third-party
works listed below; each keeps its own license and copyright notice.

-------------------------------------------------------------------------------
1. NVIDIA CUTLASS — CuTe DSL examples                         BSD-3-Clause
-------------------------------------------------------------------------------
src/mjolnir/mjolnir/arch/thor/decode.py (the Mjolnir decode-attention kernel) is
derived from

  examples/python/CuTeDSL/cute/blackwell/kernel/attention/mixed_input_fmha/
  mixed_input_fmha_decode.py
  https://github.com/NVIDIA/cutlass
  Copyright (c) 2025 - 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

The file is distributed under the BSD-3-Clause license, as a whole, with the
original NVIDIA notice and license text retained at its top; the Mjolnir
modifications to it are Copyright (c) 2026 Mieszko Syty and are licensed under
the same BSD-3-Clause terms.

-------------------------------------------------------------------------------
2. vLLM                                                          Apache-2.0
-------------------------------------------------------------------------------
https://github.com/vllm-project/vllm — Copyright the vLLM project contributors.

- docker/vllm-thor/patches/*.patch (except thor-gdn-prefill-fi-sm110.patch)
  modify vLLM source files; the narandill/mjolnir-vllm image applies them to
  the vLLM package of the official vllm/vllm-openai image, and marks every file
  it changes (see docker/vllm-thor/apply_patches.py). Patches 49652, 50885,
  54165 and 55519 are adapted from the corresponding (unmerged) vLLM pull
  requests; patch 64739 is a backport of the corresponding (open) vLLM pull
  request.
- src/mjolnir/mjolnir/qwen4exp/ple_disk.py adapts vLLM's qwen4_exp PLE
  embedding (it keeps vLLM's header); maps_entry in ple_disk_table.py is
  copied from vLLM's qwen4_exp ngram_embedding.py (_maps_entry).
- src/mjolnir/mjolnir/qwen4exp/screened_head.py is a backport of vLLM pull
  request #60566 (screened lm_head: its error bound and Triton kernels; it
  keeps vLLM's header); the other qwen4exp modules build on vLLM's qwen4_exp
  classes.
- docker/perses/dashboards/performance_statistics.yaml and
  query_statistics.yaml are adapted from
  examples/observability/dashboards/perses/ (changes listed in their headers).

-------------------------------------------------------------------------------
3. FlashAttention (FA4, CuTe DSL; vendored in vLLM as vllm_flash_attn) BSD-3-Clause
-------------------------------------------------------------------------------
https://github.com/Dao-AILab/flash-attention — Copyright (c) Tri Dao and
contributors. thor-fa4-fp8kv-sm110.patch, thor-fa4-hd256-fp8-sm110.patch and
thor-fa4-hd256-1cta-decode-sm110.patch modify files of vllm/vllm_flash_attn/
cute/ (the FlashAttention 4 kernels as vendored by vLLM). The Mjolnir kernel
itself contains no FlashAttention code; it follows the published
FlashAttention / FlashDecoding algorithms (online softmax, split-KV + LSE merge).

-------------------------------------------------------------------------------
4. FlashInfer                                                    Apache-2.0
-------------------------------------------------------------------------------
https://github.com/flashinfer-ai/flashinfer — Copyright the FlashInfer
contributors. thor-gdn-prefill-fi-sm110.patch modifies flashinfer/gdn_prefill.py
in the image's FlashInfer package.

-------------------------------------------------------------------------------
5. NemoClaw-Thor (PLE / ngram serving ideas)                      MIT
-------------------------------------------------------------------------------
https://github.com/pastoriomarco/NemoClaw-Thor — Copyright Marco Pastorio.
Any Mjolnir implementation of the partially-resident-embedding (PLE) n-gram
table serving from that project's recipes — the CLOCK slot pool, the disk
page-cache path, the prefetch/early-row-fetch split — is a reimplementation
and MUST carry this attribution in the patch, module docstring or config
comment that first ships it (per the repo convention: new third-party
derivation -> this file). The qwen4 gap analysis
(docs/faq/qwen4-27b.md, "The NemoClaw-Thor gap analysis") is the design
record; the upstream PLE disk offload itself is vLLM #59958, in the base
since 0.34.0. The first such implementation is src/mjolnir/mjolnir/qwen4exp/
ple_disk.py, ple_disk_table.py and ple_disk_cache.py (the slot-pool cache and
prefetch in front of that upstream disk table).

-------------------------------------------------------------------------------
6. NVIDIA TensorRT Edge-LLM                                      Apache-2.0
-------------------------------------------------------------------------------
https://github.com/NVIDIA/TensorRT-Edge-LLM — Copyright NVIDIA CORPORATION &
AFFILIATES. The GPU slot pool of src/mjolnir/mjolnir/qwen4exp/ple_disk_cache.py
follows the design of its 0.12 PLE cache (`--ple-residency cached`: CLOCK slot
index, page-aligned read planner, parallel pread readers), and
tests/cli/test_qwen4exp_ple_disk_cache.py carries a sequential Python port of
its PleCache as the reference the slot index is checked against.

-------------------------------------------------------------------------------
The narandill/mjolnir-vllm container image
-------------------------------------------------------------------------------
The image is built FROM the official vllm/vllm-openai image and redistributes
everything in it (vLLM, PyTorch, FlashInfer, NVIDIA CUDA libraries, the
NVIDIA CUTLASS DSL, Ubuntu packages, ...) under those components' own licenses
— see the license files inside the image and the upstream projects. It adds
the mjolnir-kernel package and the patches above; their LICENSE and this
NOTICE are installed at /usr/share/doc/mjolnir/.
