Vllm.LogitsProcess.NoBadWordsLogitsProcessor (VLLM v0.3.0)

Copy Markdown View Source

Wrapper for Python class NoBadWordsLogitsProcessor.

Summary

Functions

Python method NoBadWordsLogitsProcessor._check_token_ids_bounds.

Python method NoBadWordsLogitsProcessor._init_word_bias.

Initialize self. See help(type(self)) for accurate signature.

Types

t()

@opaque t()

Functions

_check_token_ids_bounds(ref, vocab_size, opts \\ [])

@spec _check_token_ids_bounds(SnakeBridge.Ref.t(), integer(), keyword()) ::
  {:ok, nil} | {:error, Snakepit.Error.t()}

Python method NoBadWordsLogitsProcessor._check_token_ids_bounds.

Parameters

  • vocab_size (integer())

Returns

  • nil

_init_word_bias(ref, logits, opts \\ [])

@spec _init_word_bias(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, nil} | {:error, Snakepit.Error.t()}

Python method NoBadWordsLogitsProcessor._init_word_bias.

Parameters

  • logits (term())

Returns

  • nil

new(bad_words_ids, opts \\ [])

@spec new(
  [[integer()]],
  keyword()
) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}

Initialize self. See help(type(self)) for accurate signature.

Parameters

  • bad_words_ids (list(list(integer())))