Class: SmolLM2KVStepResult

Inherits:
Object
  • Object
show all
Defined in:
lib/toy/llm/engine/llama_kv_engine.rb

Overview

Init-param names deliberately differ from the ivar names — same defensive pattern as GPT2KVStepResult.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tok_ptr, pos_ptr, logits_ptr) ⇒ SmolLM2KVStepResult

Returns a new instance of SmolLM2KVStepResult.



1506
1507
1508
1509
1510
# File 'lib/toy/llm/engine/llama_kv_engine.rb', line 1506

def initialize(tok_ptr, pos_ptr, logits_ptr)
  @t_token_id     = tok_ptr
  @t_pos          = pos_ptr
  @kv_step_logits = logits_ptr
end

Instance Attribute Details

#kv_step_logitsObject

Returns the value of attribute kv_step_logits.



1505
1506
1507
# File 'lib/toy/llm/engine/llama_kv_engine.rb', line 1505

def kv_step_logits
  @kv_step_logits
end

#t_posObject

Returns the value of attribute t_pos.



1505
1506
1507
# File 'lib/toy/llm/engine/llama_kv_engine.rb', line 1505

def t_pos
  @t_pos
end

#t_token_idObject

Returns the value of attribute t_token_id.



1505
1506
1507
# File 'lib/toy/llm/engine/llama_kv_engine.rb', line 1505

def t_token_id
  @t_token_id
end