Class: LLaMACpp::TokenData

Inherits:
Object
  • Object
show all
Defined in:
ext/llama_cpp/dummy.rb

Overview

Class for token data

Instance Method Summary collapse

Constructor Details

#initialize(id:, logit:, p:) ⇒ TokenData

Create token data.

Parameters:

  • id (Integer)

    The id of token data.

  • logit (Float)

    The logit of token data.

  • p (Float)

    The probability of token data.



406
# File 'ext/llama_cpp/dummy.rb', line 406

def initialize(id:, logit:, p:); end

Instance Method Details

#idInteger

Returns the id of token data.

Returns:

  • (Integer)


414
# File 'ext/llama_cpp/dummy.rb', line 414

def id; end

#id=(id) ⇒ Object

Sets the id of token data.

Parameters:

  • id (Integer)


410
# File 'ext/llama_cpp/dummy.rb', line 410

def id=(id); end

#logitFloat

Returns the logit of token data.

Returns:

  • (Float)


422
# File 'ext/llama_cpp/dummy.rb', line 422

def logit; end

#logit=(logit) ⇒ Object

Sets the logit of token data.

Parameters:

  • logit (Float)


418
# File 'ext/llama_cpp/dummy.rb', line 418

def logit=(logit); end

#pFloat

Returns the probability of token data.

Returns:

  • (Float)


430
# File 'ext/llama_cpp/dummy.rb', line 430

def p; end

#p=(prob) ⇒ Object

Sets the probability of token data.

Parameters:

  • prob (Float)


426
# File 'ext/llama_cpp/dummy.rb', line 426

def p=(prob); end