Skip to main content

Marquee

Turns one item in a media library into Plex-style rows of other items in that same library. Built for self-hosted media servers.

IN:  "The Sopranos"

OUT:
  Shows like The Sopranos      Gomorrah, Boardwalk Empire, The Wire, ZeroZeroZero
  More from Tim Van Patten     Game of Thrones, Black Mirror, Boardwalk Empire
  More with Edie Falco         Nurse Jackie, Oz
  Shot by Alik Sakharov        Game of Thrones, House of Cards

Two halves, both required

A retriever decides what goes in the rows, by joining your library on shared cast, crew and franchise and by embedding similarity. A small fine-tuned model decides which rows are worth showing, their order, and what to call them.

The model never sees item ids — it answers with index references into candidates it was handed, so it cannot invent a title that isn't in your library.

pip install marquee-ai

Get the model

Weights live on Hugging Face: KernelMedia/marquee-ai

pip install huggingface_hub
hf download KernelMedia/marquee-ai --local-dir marquee-model

cd marquee-model
ollama create marquee -f Modelfile     # 2.4 GB, needs ollama.com
cd ..

Do not edit the Modelfile's TEMPLATE block or raise temperature -- both are load-bearing, see SETUP.md.

Quickstart

# metadata -- free TMDB key from themoviedb.org/settings/api
echo 'TMDB_API_KEY=your_key' >> .env
marquee harvest --out tmdb_full.jsonl        # ~55 min, ~120k titles

# join it to your server's library
marquee ingest --server library.jsonl --catalog tmdb_full.jsonl \
               --out lib.jsonl --mode requestable

# serve
marquee serve --library lib.jsonl --model marquee --port 8080

Your server exports one JSON object per line — only tmdb_id and media_type are required:

{"id": "myserver-04471", "tmdb_id": 335984, "media_type": "movie"}

Anything missing from the harvest is fetched from TMDB on demand at ingest, so coverage is complete however you filtered.

API

POST /recommend   {"seed_id": "myserver-04471", "row_size": 20}
GET  /search?q=Scorsese          # matches titles AND people
GET  /person?name=Roger%20Deakins
GET  /health
DELETE /cache                    # after a library rescan

/search and /person are pure index lookups — no model call, effectively instant. Only /recommend uses the GPU.

Items carry an owned flag, so a UI can offer a Request button on anything not on the server. Ambiguous titles return 409 with the candidates rather than guessing — Godzilla matches three films. Narrow with year and media_type, or write "Top Gun (1986)" directly.

Use it as a library

The HTTP API is optional. If your server is Python, skip it:

from marquee import Library
from marquee.contract import messages, parse, repair, expand_rows

lib = Library.load("lib.jsonl")
lib.build_embeddings(cache=Path("lib.emb.npz"))     # once at startup

request = lib.build_request(seed_id, semantic_k=14, row_size=20)
raw = call_your_llm(messages(request))              # any OpenAI-compatible endpoint
rows = expand_rows(repair(parse(raw), request), request, 20)

Requirements

VRAM ~3.5 GB (Q4_K_M). Runs on a 4 GB card, or CPU.
RAM ~2.2 GB for a 120k-title catalog
Latency ~1 s per request on an RTX 3060; cached responses are instant

Full setup and troubleshooting: SETUP.md

Data

You harvest TMDB yourself with your own free key; no catalog is distributed. TMDB is free for non-commercial use and requires attribution — commercial use needs a written agreement with them.

This product uses the TMDB API but is not endorsed or certified by TMDB.

Licence

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marquee_ai-1.0.2.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marquee_ai-1.0.2-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file marquee_ai-1.0.2.tar.gz.

File metadata

  • Download URL: marquee_ai-1.0.2.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for marquee_ai-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d0185f172ae188f39d9f9f06d1910c08a1e007b8c50ff810d868ff96af3f09d5
MD5 573d55ba2be6ddbd1f4387ae5d63de9b
BLAKE2b-256 3a2685e4bc93280014deeb8bb7ec947591d94fd848ead67249681bffbe531800

See more details on using hashes here.

File details

Details for the file marquee_ai-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: marquee_ai-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for marquee_ai-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1edb7a2dde18b4015486850a0ace3f4f225331beea1bdafb90874577ecff5dde
MD5 2531f21502eae04a3532b04f6366aad8
BLAKE2b-256 2111bef540def0a21717564466fcd73ad023e7cb8acde58dd0d63cf49b9332ff

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.3

2 files

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page