Downloads · 30 days
11
30% of all-time downloads
swedishembedded/minilm-l6-option-head-doom
minilm-l6-option-head-doom is a reinforcement learning model from swedishembedded. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for brain. The card lists the license as apache-2.0.
A 445k-parameter adapter that turns a frozen sentence encoder into a policy: it reads a situation as text, reads a list of things that could be done right now as text, and returns a probability for each.
Downloads · 30 days
11
30% of all-time downloads
All-time downloads
37
Public
Parameters
445K
1.8 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.8 MB · 100%
From the Hugging Face model README
A 445k-parameter adapter that turns a frozen sentence encoder into a policy: it reads a situation as text, reads a list of things that could be done right now as text, and returns a probability for each.
It is not a generator. It never writes an action - it scores the ones it is handed, and the list may be different at every decision.
sentence-transformers/all-MiniLM-L6-v2, frozen. This file is 1.7 MB of head
weights and means nothing without it.
One packed sequence for the encoder:
rows 0..R the situation, in windows of `max_span` tokens with overlap
rows R..R+S one span per option, each "<instructions> [SEP] <option text>"
Each option span starts with [CLS]. The head reads those rows as queries,
cross-attends over the situation's rows, and emits one scalar per option. The
softmax is taken on the host, over that call's options only - which is why the
number of options is free to change between calls and no kernel has an opinion
about it.
q = hidden[cls_rows] @ Wq + bq [S, 384]
kv = hidden[0..R] @ Wkv + bkv [R, 768]
ctx = crossattn(q -> kv) [S, 384]
out = LayerNorm(ctx + q) [S, 384]
z_i = out_i . w + b [S]
p = softmax(z) host side
head.wq.weight [384, 384] head.wkv.weight [768, 384]
head.wq.bias [384] head.wkv.bias [768]
head.ln.weight [384] head.ln.bias [384]
head.score.weight [1, 384] head.score.bias [1]
DOOM, through an engine that hands the agent a text observation and a list of options each decision. Behaviour cloning from a scripted player, then PPO.
It matches its teacher and does not beat it. Over 24 shared episodes:
exits deaths progress
scripted 10 5 0.70
this policy 10 2 0.73
Twelve iterations of policy gradient bought what the behaviour cloning had already reached. Read it as a demonstration of the architecture, not as a strong DOOM player.
Each option's score depends only on that option and the situation - options are coupled solely by the softmax that normalises them. There is no mechanism for comparing two options directly, so any preference between them has to be inferable from the situation text.
Swedish Embedded AB builds decision models that run on the customer's own hardware, choosing among actions a machine defines at run time. If your team needs that, you can procure our services by sending an email to [email protected].