Class: GGUFLoad::SmolLM2Flags

Inherits:
Object
  • Object
show all
Defined in:
lib/toy/io/loaders/toy_smollm2_loader.rb

Overview

Detect llama-family GGUF capability flags without instantiating the Ruby Mat-backed model. Returns has_untied_output + has_qkv_bias so the caller can build the FFI cache directly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(untied, qkv_bias, qk_norm, swa_window, is_moe, n_experts, n_experts_used, qk_norm_kind = 0, has_post_norms = false, embed_scale = 1.0, attn_softcap = 0.0, final_softcap = 0.0, swa_alternates = false) ⇒ SmolLM2Flags

Returns a new instance of SmolLM2Flags.



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 156

def initialize(untied, qkv_bias, qk_norm, swa_window,
               is_moe, n_experts, n_experts_used, qk_norm_kind = 0,
               has_post_norms = false, embed_scale = 1.0,
               attn_softcap = 0.0, final_softcap = 0.0,
               swa_alternates = false)
  @untied         = untied
  @qkv_bias       = qkv_bias
  @qk_norm        = qk_norm
  @swa_window     = swa_window
  @is_moe         = is_moe
  @n_experts      = n_experts
  @n_experts_used = n_experts_used
  @qk_norm_kind   = qk_norm_kind
  @has_post_norms = has_post_norms
  @embed_scale    = embed_scale
  @attn_softcap   = attn_softcap
  @final_softcap  = final_softcap
  @swa_alternates = swa_alternates
end

Instance Attribute Details

#attn_softcapObject

Returns the value of attribute attn_softcap.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def attn_softcap
  @attn_softcap
end

#embed_scaleObject

Returns the value of attribute embed_scale.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def embed_scale
  @embed_scale
end

#final_softcapObject

Returns the value of attribute final_softcap.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def final_softcap
  @final_softcap
end

#has_post_normsObject

Returns the value of attribute has_post_norms.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def has_post_norms
  @has_post_norms
end

#is_moeObject

Returns the value of attribute is_moe.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def is_moe
  @is_moe
end

#n_expertsObject

Returns the value of attribute n_experts.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def n_experts
  @n_experts
end

#n_experts_usedObject

Returns the value of attribute n_experts_used.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def n_experts_used
  @n_experts_used
end

#qk_normObject

Returns the value of attribute qk_norm.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def qk_norm
  @qk_norm
end

#qk_norm_kindObject

Returns the value of attribute qk_norm_kind.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def qk_norm_kind
  @qk_norm_kind
end

#qkv_biasObject

Returns the value of attribute qkv_bias.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def qkv_bias
  @qkv_bias
end

#swa_alternatesObject

Returns the value of attribute swa_alternates.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def swa_alternates
  @swa_alternates
end

#swa_windowObject

Returns the value of attribute swa_window.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def swa_window
  @swa_window
end

#untiedObject

Returns the value of attribute untied.



128
129
130
# File 'lib/toy/io/loaders/toy_smollm2_loader.rb', line 128

def untied
  @untied
end