Text Generation
Transformers
GGUF
English
recommendation
media-server
plex
jellyfin
structured-output
qwen3
conversational
Run this model with HF Jobs
Run KernelMedia/marquee-ai on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/KernelMedia/marquee-ai. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/KernelMedia/marquee-ai on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/KernelMedia/marquee-ai. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use KernelMedia/marquee-ai with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KernelMedia/marquee-ai with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KernelMedia/marquee-ai")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KernelMedia/marquee-ai", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use KernelMedia/marquee-ai with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf KernelMedia/marquee-ai:Q6_K # Run inference directly in the terminal: llama cli -hf KernelMedia/marquee-ai:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf KernelMedia/marquee-ai:Q6_K # Run inference directly in the terminal: llama cli -hf KernelMedia/marquee-ai:Q6_K
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf KernelMedia/marquee-ai:Q6_K # Run inference directly in the terminal: ./build/bin/llama cli -hf KernelMedia/marquee-ai:Q6_K
Use Docker
docker model run hf.co/KernelMedia/marquee-ai:Q6_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use KernelMedia/marquee-ai with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KernelMedia/marquee-ai" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KernelMedia/marquee-ai", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KernelMedia/marquee-ai:Q6_K
- SGLang
How to use KernelMedia/marquee-ai with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "KernelMedia/marquee-ai" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KernelMedia/marquee-ai", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "KernelMedia/marquee-ai" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KernelMedia/marquee-ai", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use KernelMedia/marquee-ai with Ollama:
ollama run hf.co/KernelMedia/marquee-ai:Q6_K
- Unsloth Desktop
- Pi
How to use KernelMedia/marquee-ai with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KernelMedia/marquee-ai:Q6_K
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "KernelMedia/marquee-ai:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use KernelMedia/marquee-ai with Docker Model Runner:
docker model run hf.co/KernelMedia/marquee-ai:Q6_K
- Lemonade
How to use KernelMedia/marquee-ai with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KernelMedia/marquee-ai:Q6_K
Run and chat with the model
lemonade run user.marquee-ai-Q6_K
List all available models
lemonade list
- Hermes Agent
How to use KernelMedia/marquee-ai with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KernelMedia/marquee-ai:Q6_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default KernelMedia/marquee-ai:Q6_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use KernelMedia/marquee-ai with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KernelMedia/marquee-ai:Q6_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "KernelMedia/marquee-ai:Q6_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
real API examples, plug-and-play quickstart
Browse files11233456756789101112131415161718191011121314151617181920222321222523242528292627283229303132333536343536373839403940414243444542464744454849505152535455485657585960515261625463646557666768696061626364657071727374757677787980818283848586878889909192676893949570969798729910010175761021031041051061071081097980110111828384112113861141151168990117118119939495961201211221231241251261271281291301311321331349899135136137101102138139104140141142107143144145146147148149150151152153154155156157158159160110111161162163164113165166115116167168169170171172173174175176177178179180181182119120183184185122186187188189190191192193194195196197198199200201125126127202203204205206207208129130131132209210211212135136137213214215139140216217218219220221222142223224225226144145146227228229148230231232233152153154234235236237238239240241159160161242243244245246247248249250168251252253171254255256257258259260261173174175262263177178179264265266181267268183269# Running Marquee on your own server# Marquee
**Marquee-4B v1.0**Recommendation rows for a media server.
Complete setup, start to finish. Roughly an hour, most of it unattended.
## What you are building## Install
```bashpip install marquee-ai``` your media server | exports {id, tmdb_id, media_type} v marquee ingest ------> library index (titles, cast, crew, embeddings) | v marquee serve <-----> Ollama (the model) | HTTP v your media server UI
You also need [Ollama](https://ollama.com) to run the model.
## Download
```bashhf download KernelMedia/marquee-ai --local-dir marqueecd marqueeollama create marquee -f Modelfile```
The model decides which rows to show and names them. The **retriever** β the index βdecides what goes in them. Both matter; the model on its own is not useful.~2.8 GB: the model, plus a catalog of ~122,000 films and shows with full cast and crew.
## 1. Install## Run
```bashpip install marquee-aicurl -fsSL https://ollama.com/install.sh | sh # if you do not have itmarquee serve --library catalog.jsonl --port 8080```
## 2. Get the modelLoads in about 15 seconds.
## Use it
```bashhuggingface-cli download KernelMedia/marquee-ai --local-dir marquee-modelcd marquee-model && ollama create marquee -f Modelfile && cd ..curl -X POST localhost:8080/recommend \ -H 'Content-Type: application/json' \ -d '{"title": "The Sopranos", "row_size": 20}'```
Do not edit the `Modelfile`'s `TEMPLATE` block or raise `temperature`. Both areload-bearing β see Troubleshooting.```Shows like The Sopranos Gomorrah, Boardwalk Empire, The Wire, ZeroZeroZeroMore from Tim Van Patten Game of Thrones, Black Mirror, Boardwalk EmpireMore with Edie Falco Nurse Jackie, OzShot by Alik Sakharov Game of Thrones, House of Cards```
## 3. Get a TMDB keyOr from the command line:
Free, two minutes: https://www.themoviedb.org/settings/api β choose Developer,non-commercial.```bashmarquee recommend --library catalog.jsonl --seed "Blade Runner 2049" --row-size 20marquee person --library catalog.jsonl --name "Roger Deakins"```
Set `MARQUEE_LIBRARY` once and drop the flag:
```bashecho 'TMDB_API_KEY=your_key' >> .envexport MARQUEE_LIBRARY=$PWD/catalog.jsonlexport MARQUEE_MODEL=marqueemarquee recommend --seed "Dune (2021)"```
TMDB is free for non-commercial use and requires attribution. **Commercial use needs awritten agreement with TMDB** β if you charge for access to this, talk to them first.## API
## 4. Harvest metadata### `POST /recommend`
```bashmarquee harvest --out tmdb_full.jsonlcurl -X POST localhost:8080/recommend -H 'Content-Type: application/json' \ -d '{"title": "The Sopranos", "row_size": 20}'```
~55 minutes, ~120,000 titles, ~210 MB. It caches every response, so re-runs are freeand an interrupted run resumes.
This keeps titles with 10+ votes (plus all anime regardless, which skews to low votecounts). That drops TMDB's 1.4M entries to ~120k by removing shorts, unreleased stubsand uploads with no credits β none of which can form a recommendation row anyway.```json{ "seed": {"id": "tmdb:tv:1398", "title": "The Sopranos", "year": 1999, "media_type": "tv", "rating": 8.7, "owned": true}, "rows": [ {"type": "thematic", "title": "Shows like The Sopranos", "items": [ {"id": "tmdb:tv:31050", "title": "The Last Don", "year": 1997, "media_type": "tv", "rating": 7.1, "owned": true}, {"id": "tmdb:tv:12822", "title": "The Octopus", "year": 1984, "media_type": "tv", "rating": 7.8, "owned": true} ]}, {"type": "director", "title": "More from Tim Van Patten", "items": [ {"id": "tmdb:tv:1399", "title": "Game of Thrones", "year": 2011, "media_type": "tv", "rating": 8.5, "owned": true}, {"id": "tmdb:tv:1438", "title": "The Wire", "year": 2002, "media_type": "tv", "rating": 8.6, "owned": true} ]} ]}```
`--min-votes 0` takes everything: 1.4M titles, ~10 hours, ~108 GB of cache, and about27 GB of RAM to load. Not advised.Body fields: `seed_id` **or** `title`, plus optional `year`, `media_type`, `row_size`(items per row), `owned_only`, `semantic_k`.
## 5. Export your libraryRows arrive in a fixed order β thematic, franchise, director, cast, crew β so a UI canrender them top to bottom without sorting.
One JSON object per line. Only `tmdb_id` and `media_type` are required:An ambiguous title returns **409** with the candidates rather than guessing:
```json{"id": "myserver-04471", "tmdb_id": 335984, "media_type": "movie"}{"id": "myserver-04472", "tmdb_id": 1396, "media_type": "tv"}{"error": "5 items match 'Godzilla'; pass seed_id, or narrow with year/media_type", "matches": [ {"id": "tmdb:movie:124905", "title": "Godzilla", "year": 2014, "media_type": "movie"}, {"id": "tmdb:movie:929", "title": "Godzilla", "year": 1998, "media_type": "movie"}, {"id": "tmdb:movie:1678", "title": "Godzilla", "year": 1954, "media_type": "movie"} ]}```
Include `id` and recommendations come back keyed the way your server already refers tothings, so you need no lookup table.`{"title": "Godzilla", "year": 2014}` or `{"title": "Godzilla (2014)"}` resolves it.
**Jellyfin**: `/Items?Recursive=true&Fields=ProviderIds` gives `ProviderIds.Tmdb`.**Plex**: `/library/sections/{id}/all` β the `guid` field carries the TMDB id onrecent agents.### `GET /search?q=`
## 6. Build the library indexMatches titles **and** people, because "Scorsese" is not a title but has 109 credits.
```bashmarquee ingest --server library.jsonl --catalog tmdb_full.jsonl \ --out lib.jsonl --mode requestablecurl 'localhost:8080/search?q=Scorsese&limit=3'```
| mode | contents ||---|---|| `owned` | only what is on your server β every recommendation is playable || `requestable` | your items **plus** unowned titles flagged `owned: false`, so the UI can offer a Request button |```json{ "query": "Scorsese", "titles": [ {"id": "tmdb:tv:292130", "title": "Mr. Scorsese", "year": 2025, "media_type": "tv", "rating": 8.1, "owned": true} ], "people": [ {"key": "tmdb:person:1032", "name": "Martin Scorsese", "roles": {"director": 47, "actor": 50, "writer": 12}, "credits": 109} ], "count": 6}```
`requestable` plus `owned_only` at query time is the flexible setup: one index servesboth, and you can flip per user.`kind=title` or `kind=person` narrows it. Names are matched loosely: `samuel l jackson`,`Jackson Samuel` and `Inarritu` all resolve.
Anything whose `tmdb_id` is not in the harvest is fetched from TMDB on the spot, socoverage is complete however you filtered. `--no-fetch` disables that.### `GET /person?name=`
## 7. ServeEverything someone is credited on, films and shows in one list, best first.
```bashmarquee serve --library lib.jsonl --model marquee --port 8080curl 'localhost:8080/person?name=Roger%20Deakins&limit=3'```
```json{ "person": "Roger Deakins", "count": 3, "credits": [ {"id": "tmdb:movie:278", "title": "The Shawshank Redemption", "year": 1994, "media_type": "movie", "rating": 8.7, "score": 8.66, "votes": 31061, "owned": true, "roles": ["cinematographer"]}, {"id": "tmdb:movie:146233", "title": "Prisoners", "year": 2013, "media_type": "movie", "rating": 8.1, "score": 8.04, "votes": 13352, "owned": true, "roles": ["cinematographer"]} ]}```
First start builds embeddings (~3 min for 120k titles) and caches them next to thelibrary. Later starts take ~15 s.`score` is what the ranking uses: the raw rating damped toward the catalog mean by votecount, so an 8.2 from 600 votes sits below a 7.6 from 4,300. Someone who both directedand wrote a title appears once with both roles.
Watch for the startup line:Options: `media_type`, `owned_only`, `limit`, `by_role=true` for per-role shelves.
```[marquee] contract v1 self-test: PASS - contract v1 OK (3/3 clean)### `GET /health`
```json{ "status": "ok", "contract_version": 1, "model_self_test": {"passed": true, "detail": "contract v1 OK (3/3 clean)"}, "cache": {"entries": 0, "hits": 0, "misses": 0, "max": 2048}, "library_items": 121727, "owned": 121727, "requestable": 0, "model": "marquee", "backend": "http://localhost:11434/v1"}```
FAIL means the model and the package disagree, or the chat template is wrong. It willsay which.`status` is `degraded` if the self-test fails β the model and package disagree, or thechat template is wrong.
## API### `DELETE /cache`
Responses are cached per seed. Call this after a library rescan or you will serve rowsreferring to items you no longer have.
`/search` and `/person` are index lookups with no model call, so they are instant. Only`/recommend` uses the GPU.
## Restricting results to your own library (optional)
By default it recommends from the whole 122k catalog, whether or not you own the title.
To mark what is actually on your server -- so a UI can show a Request button on the rest-- export your library and join it:
```bashcurl -X POST localhost:8080/recommend \ -H 'Content-Type: application/json' \ -d '{"seed_id": "myserver-04471", "row_size": 20}'marquee ingest --server library.jsonl --catalog catalog.jsonl \ --out lib.jsonl --mode requestablemarquee serve --library lib.jsonl```
Your export needs one JSON object per line; `tmdb_id` and `media_type` are enough:
curl 'localhost:8080/search?q=Scorsese' # titles and peoplecurl 'localhost:8080/person?name=Roger+Deakins'curl localhost:8080/healthcurl -X DELETE localhost:8080/cache # after a library rescan```json{"id": "myserver-04471", "tmdb_id": 335984, "media_type": "movie"}```
`/recommend` takes `seed_id` (exact) or `title`. Ambiguous titles return **409 with thecandidates** rather than guessing β `Godzilla` matches three films. Narrow with `year`and `media_type`, or write `"Top Gun (1986)"` directly.Every item then carries `"owned": true|false`. Pass `"owned_only": true` on a request todrop the ones you do not have:
`/search` and `/person` are index lookups with no model call, so they are instant. Only`/recommend` uses the GPU.```bashcurl -X POST localhost:8080/recommend -H 'Content-Type: application/json' \ -d '{"seed_id": "myserver-04471", "row_size": 20, "owned_only": true}'```
`/health` reports the split:
### Caching```json{"library_items": 121727, "owned": 1670, "requestable": 120057}```
Recommendations for an item are stable until the library changes, so they are cached.`/health` reports hits and misses. **Call `DELETE /cache` after a rescan** or you willserve rows referring to items you no longer have.**Jellyfin**: `/Items?Recursive=true&Fields=ProviderIds` gives `ProviderIds.Tmdb`.**Plex**: `/library/sections/{id}/all` -- the `guid` carries the TMDB id on recent agents.
## Hardware## Requirements
| | ||---|---|| VRAM | ~3.5 GB. A 4 GB card is fine. CPU works but is slow β cache matters more there. || RAM | ~2.2 GB for a 120k catalog || Disk | 2.4 GB model, ~210 MB catalog, ~190 MB embeddings, ~2.6 GB API cache || VRAM | ~3.5 GB. A 4 GB card is fine; CPU works but is slower. || RAM | ~2.2 GB for the 122k catalog || Disk | ~2.8 GB || Latency | ~1 s per request on an RTX 3060; cached responses are instant |
## Troubleshooting
**Every row comes back typed `director`, titles look like item names.**The chat template is missing. Ollama ignores the Jinja template inside GGUF and fallsback to a raw passthrough, so the model never sees the `<|im_start|>` markers it wastrained on. Confirm your Modelfile has the `TEMPLATE` block:The chat template is missing. Ollama ignores the template inside GGUF metadata and fallsback to a raw passthrough, so the model never sees the tokens it was trained on:```bashollama show --template marquee # must NOT be just "{{ .Prompt }}"```Recreate from the supplied `Modelfile`, and do not remove its `TEMPLATE` block.
**Output is valid sometimes and not others.**`temperature` is too high. Structured output needs near-greedy decoding: 0.1 gave 8/8clean in testing, 0.3 gave 5/8.clean in testing, 0.3 gave 5/8. The Modelfile ships 0.1.
**Self-test fails at startup.**Model and package are on different contract versions. Both must be contract v1.The model and the package are built against different contract versions. Both must becontract v1.
**A title I own is missing.**The catalog covers ~122k titles with 10+ TMDB votes, plus all anime. Genuinely obscurereleases may not be there. `marquee harvest --min-votes 0` rebuilds a wider catalog withyour own free TMDB key.
**Server items are being dropped at ingest.**They have no TMDB id, or the id is wrong. The ingest reports the count and samples. On-demand fetch handles anything merely missing from the harvest.## Data
**Rows are thin, or missing entirely.**The library is small. A director with one other credit present gets no row β that isdeliberate, the model is trained not to pad. Harvest more, or use `requestable` mode.Catalog metadata is from TMDB. This product uses the TMDB API but is not endorsed orcertified by TMDB.
## Attribution## Licence
This product uses the TMDB API but is not endorsed or certified by TMDB.Apache-2.0.SETUP.md+190-104