Class: SmolLM2KVStepResultMetal

Inherits:
Object
  • Object
show all
Defined in:
lib/toy/llm/engine/llama_kv_engine_metal.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) ⇒ SmolLM2KVStepResultMetal

Returns a new instance of SmolLM2KVStepResultMetal.



1439
1440
1441
1442
1443
# File 'lib/toy/llm/engine/llama_kv_engine_metal.rb', line 1439

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.



1438
1439
1440
# File 'lib/toy/llm/engine/llama_kv_engine_metal.rb', line 1438

def kv_step_logits
  @kv_step_logits
end

#t_posObject

Returns the value of attribute t_pos.



1438
1439
1440
# File 'lib/toy/llm/engine/llama_kv_engine_metal.rb', line 1438

def t_pos
  @t_pos
end

#t_token_idObject

Returns the value of attribute t_token_id.



1438
1439
1440
# File 'lib/toy/llm/engine/llama_kv_engine_metal.rb', line 1438

def t_token_id
  @t_token_id
end