QDpy
Loading...
Searching...
No Matches
soft_prompt_local_model.FrozenDecoder Class Reference

Decode from actual input embeddings with a private generation RNG. More...

Public Member Functions

 initial_embedding (self, virtual_tokens)
 __call__ (self, embedding, seed)

Detailed Description

Decode from actual input embeddings with a private generation RNG.

Use an embedding prefix followed by a fixed text prompt.

Definition at line 20 of file soft_prompt_local_model.py.

Member Function Documentation

◆ __call__()

soft_prompt_local_model.FrozenDecoder.__call__ ( self,
embedding,
seed )
Sample a fixed-budget continuation using the supplied virtual tokens.

Definition at line 36 of file soft_prompt_local_model.py.

◆ initial_embedding()

soft_prompt_local_model.FrozenDecoder.initial_embedding ( self,
virtual_tokens )
Repeat the vocabulary's mean embedding for the initial soft prompt.

Definition at line 31 of file soft_prompt_local_model.py.


The documentation for this class was generated from the following file: