Skip to main content
gLM2 Perplexity
License: This constraint can use multiple tools, each under its own license. See the Tools Used tab and each tool’s page for license details.

This constraint is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.


ProtoProtoevo-design/proto-language
View source
Constraint contributors
Forward gLM2/Minerva scoring of the one-hot sequence via masked pseudo-log-likelihood.

API Reference

ConfigGLM2PerplexityConfig Source
Configuration for gLM2/Minerva perplexity scoring (forward + gradient).
enum
default:"tattabio/gLM2_650M"
gLM2 (‘tattabio/…’) or Minerva-MLM (‘gbrixi/…’) checkpointOptions: tattabio/gLM2_150M, tattabio/gLM2_650M, gbrixi/minerva-mlm, gbrixi/minerva-mlm-8k
number
required
Softmax temperature applied to logits (fixed for this constraint).
boolean
default:"True"
Hard one-hot forward pass with soft-probability gradients.
string
default:"cuda"
Device for model execution, e.g. ‘cuda’ or ‘cuda:0’.
integer
Masked PLL variants per forward pass; lower if OOM.
enum
default:"nll"
Return raw mean NLL by default, or perplexity when set to ‘ppl’.Options: nll, ppl
number
default:"1.0"
Pre-scale raw logits; gradients are scaled back by the same factor.
ReturnsConstraintOutput
Per-proposal scores with NLL and perplexity metadata.

Usage

python

Metadata