dpp-lm-sampler / README.md
xtimv's picture
Use Python 3.12 (transformers 5.24 needs >= 3.11)
aefe750 verified
|
Raw History Blame Contribute Delete
793 Bytes

A newer version of the Gradio SDK is available: 6.32.0

Upgrade
metadata
title: Diverse Sampling Backend
emoji: 🎲
colorFrom: gray
colorTo: red
sdk: gradio
sdk_version: 5.50.0
python_version: '3.12'
app_file: app.py
pinned: false
short_description: Exact-log-prob sampling for the diverse-sampling demo

Backend for the interactive demo of A Model of Diverse Sampling from Language Models (arXiv:2611.25003): https://timvieira.github.io/dpp-lm-demo/

/sample draws N completions from the locally annealed proposal p°_{T′} and returns each one's exact log p(y) and log q(y) (end-of-string included) plus unit-norm MiniLM embeddings (base64 float32). The page does the DPP part.

Runs on free CPU hardware with small models; on ZeroGPU the @spaces.GPU decorator attaches a GPU and larger models become available.