Class: LLaMACpp::ContextParams

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

Overview

Class for parameters of context.

Instance Method Summary collapse

Instance Method Details

#attention_typeInteger

Returns the attention type.

Returns:

  • (Integer)


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

def attention_type; end

#attention_type=(attention_type) ⇒ Object

Sets the attention type.

Parameters:

  • attention_type (Integer)


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

def attention_type=(attention_type); end

#defrag_tholdFloat

Returns defragment the KV cache.

Returns:

  • (Float)


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

def defrag_thold; end

#defrag_thold=(defrag_thold) ⇒ Object

Sets the defragment the KV cache.

Parameters:

  • defrag_thold (Float)


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

def defrag_thold=(defrag_thold); end

#embeddingsBoolean

Returns the flag for embeddings mode only.

Returns:

  • (Boolean)


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

def embeddings; end

#embeddings=(flag) ⇒ Object

Sets the flag for embeddings mode only.

Parameters:

  • flag (Boolean)


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

def embeddings=(flag); end

#flash_attnBoolean

Returns the flag whether to use flash attention.

Returns:

  • (Boolean)


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

def flash_attn; end

#flash_attn=(flag) ⇒ Object

Sets the flag whether to use flash attention.

Parameters:

  • flag (Boolean)


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

def flash_attn=(flag); end

#logits_allBoolean

Returns the flag to compute all logits.

Returns:

  • (Boolean)


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

def logits_all; end

#logits_all=(flag) ⇒ Object

Sets the flag to compute all logits.

Parameters:

  • flag (Boolean)


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

def logits_all=(flag); end

#n_batchInteger

Returns the logical maximum batch size.

Returns:

  • (Integer)


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

def n_batch; end

#n_batch=(n_batch) ⇒ Object

Sets the logical maximum batch size.

Parameters:

  • n_batch (Integer)


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

def n_batch=(n_batch); end

#n_ctxInteger

Returns the number of text context

Returns:

  • (Integer)


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

def n_ctx; end

#n_ctx=(n_ctx) ⇒ Object

Sets the number of text context

Parameters:

  • n_ctx (Integer)


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

def n_ctx=(n_ctx); end

#n_seq_maxInteger

Returns the max number of sequences.

Returns:

  • (Integer)


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

def n_seq_max; end

#n_seq_max=(n_seq_max) ⇒ Object

Sets the max number of sequences.

Parameters:

  • n_seq_max (Integer)


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

def n_seq_max=(n_seq_max); end

#n_ubatchInteger

Returns the physical maximum batch size.

Returns:

  • (Integer)


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

def n_ubatch; end

#n_ubatch=(n_ubatch) ⇒ Object

Sets the physical maximum batch size.

Parameters:

  • n_ubatch (Integer)


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

def n_ubatch=(n_ubatch); end

#offload_kqv=(flag) ⇒ Object

Sets the flag whether to offload the KQV ops.

Parameters:

  • flag (Boolean)


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

def offload_kqv=(flag); end

#offload_kwvBoolean

Returns the flag whether to offload the KQV ops.

Returns:

  • (Boolean)


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

def offload_kwv; end

#pooling_typeInteger

Returns the pooling type.

Returns:

  • (Integer)


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

def pooling_type; end

#pooling_type=(pooling_type) ⇒ Object

Sets the pooling type.

Parameters:

  • pooling_type (Integer)


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

def pooling_type=(pooling_type); end

#rope_freq_baseFloat

Returns the RoPE base frequency.

Returns:

  • (Float)


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

def rope_freq_base; end

#rope_freq_base=(rope_freq_base) ⇒ Object

Sets the RoPE base frequency.

Parameters:

  • rope_freq_base (Float)


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

def rope_freq_base=(rope_freq_base); end

#rope_freq_scaleFloat

Returns the RoPE frequency scaling factor.

Returns:

  • (Float)


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

def rope_freq_scale; end

#rope_freq_scale=(rope_freq_scale) ⇒ Object

Sets the RoPE frequency scaling factor.

Parameters:

  • rope_freq_scale (Float)


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

def rope_freq_scale=(rope_freq_scale); end

#rope_scaling_typeInteger

Returns the RoPE scaling type.

Returns:

  • (Integer)


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

def rope_scaling_type; end

#rope_scaling_type=(scaling_type) ⇒ Object

Sets the RoPE scaling type.

Parameters:

  • scaling_type (Integer)


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

def rope_scaling_type=(scaling_type); end

#seedInteger

Return the random seed.

Returns:

  • (Integer)


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

def seed; end

#seed=(seed) ⇒ Object

Sets the random seed.

Parameters:

  • seed (Integer)


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

def seed=(seed); end

#type_kInteger

Returns the data type for K cache.

Returns:

  • (Integer)


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

def type_k; end

#type_k=(type_k) ⇒ Object

Sets the data type for K cache.

Parameters:

  • type_k (Integer)


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

def type_k=(type_k); end

#type_vInteger

Returns the data type for V cache.

Returns:

  • (Integer)


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

def type_v; end

#type_v=(type_v) ⇒ Object

Sets the data type for V cache.

Parameters:

  • type_v (Integer)


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

def type_v=(type_v); end

#yarn_attn_factorFloat

Returns the YaRN magnitude scaling factor.

Returns:

  • (Float)


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

def yarn_attn_factor; end

#yarn_attn_factor=(yarn_attn_factor) ⇒ Object

Sets the YaRN magnitude scaling factor.

Parameters:

  • yarn_attn_factor (Float)


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

def yarn_attn_factor=(yarn_attn_factor); end

#yarn_beta_fastFloat

Returns the YaRN low correction dim.

Returns:

  • (Float)


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

def yarn_beta_fast; end

#yarn_beta_fast=(yarn_beta_fast) ⇒ Object

Sets the YaRN low correction dim.

Parameters:

  • yarn_beta_fast (Float)


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

def yarn_beta_fast=(yarn_beta_fast); end

#yarn_beta_slowFloat

Returns the YaRN high correction dim.

Returns:

  • (Float)


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

def yarn_beta_slow; end

#yarn_beta_slow=(yarn_beta_slow) ⇒ Object

Sets the YaRN high correction dim.

Parameters:

  • yarn_beta_slow (Float)


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

def yarn_beta_slow=(yarn_beta_slow); end

#yarn_ext_factorFloat

Returns the YaRN extrapolation mix factor.

Returns:

  • (Float)


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

def yarn_ext_factor; end

#yarn_ext_factor=(yarn_ext_factor) ⇒ Object

Sets the YaRN extrapolation mix factor.

Parameters:

  • yarn_ext_factor (Float)


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

def yarn_ext_factor=(yarn_ext_factor); end

#yarn_orig_ctxInteger

Returns the YaRN original context size.

Returns:

  • (Integer)


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

def yarn_orig_ctx; end

#yarn_orig_ctx=(yarn_orig_ctx) ⇒ Object

Sets the YaRN original context size.

Parameters:

  • yarn_orig_ctx (Integer)


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

def yarn_orig_ctx=(yarn_orig_ctx); end