Skip to content

ADR 0002 — No GPL code; port only from permissive sources

Accepted · 2026-10-31 · synapse/docs/adr/0002-no-gpl-port-only-permissive.md

Status: Accepted Date: 2026-10-31 Source: the stack’s no-GPL policy, set in cortex’s ADR 0002 Related: ADR-0001

cortex’s ADR 0002 rules out GPL code anywhere in cortex, for any purpose. The reason applies to synapse unchanged: partners redistribute the stack inside their own certified products, and any GPL obligation, even one confined to a test, is something their legal reviews would have to clear.

synapse works differently from cortex in one respect. cortex implements its operators clean-room from papers. synapse’s job is to run the models llama.cpp runs, with numerics that match llama.cpp’s, so parts of it are deliberately ports of llama.cpp and ggml code. Those are MIT-licensed, and the port is recorded (ADR-0001). This ADR records where that line is.

No GPL-licensed code anywhere in synapse, for any purpose. Not as a dependency, not in a test target, not as a build-time tool in what synapse builds, and not as a reference oracle. The scope is ADR-0001’s: what synapse ships, the code that builds it and the tests, and not the docs site’s toolchain.

  • Porting is allowed from permissive sources only: MIT, BSD, Apache-2.0, or a license of the same kind. Each port is recorded in THIRD_PARTY_NOTICES.md, and the ported header says so (ADR-0001, decision 2).
  • Check a source’s license before opening its code. Reading GPL source and then writing the same thing “from scratch” is neither a port nor clean-room. A GPL project’s structure may be consulted, meaning its directory layout and how it splits the problem into modules, and nothing else: never its code, data, tables or constants.
  • Otherwise, implement from papers, specifications and file formats. The GGUF reader, for example, is written from the format, and checked against llama.cpp’s gguf-py.
  • Test oracles must be permissive too. The golden outputs come from llama.cpp (MIT), written by scripts/. Never compare against a GPL program’s output.
  • LGPL, MPL, AGPL and SSPL sources are rejected, as dependencies and as sources to port from, as ADR-0001 rejects them. An exception would need an ADR of its own that supersedes this one.
  • synapse can follow llama.cpp closely where matching it matters (tokenization, quantized formats, the kernels’ arithmetic), at the cost of recording each port.
  • A contributor who wants to port from a new project checks its license first, and adds it to the ledger in the same PR.
  • Partners can redistribute synapse under MIT terms with no copyleft review.
  • Current state: every port in synapse is from MIT sources (llama.cpp, ggml and YaRN), listed in THIRD_PARTY_NOTICES.md. No GPL code or oracle is used.