Class: LlamaCpp::LlamaKvCacheView

Inherits:
Object
  • Object
show all
Defined in:
ext/llama_cpp/llama_cpp.c,
ext/llama_cpp/llama_cpp.c

Overview

“struct llama_kv_cache_view” wrapper class

Instance Method Summary collapse

Instance Method Details

#max_contiguousInteger

Returns:

  • (Integer)


1852
1853
1854
1855
# File 'ext/llama_cpp/llama_cpp.c', line 1852

static VALUE llama_kv_cache_view_get_max_contiguous(VALUE self) {
  struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
  return INT2NUM(data->max_contiguous);
}

#max_contiguous_idxInteger

Returns:

  • (Integer)


1857
1858
1859
1860
# File 'ext/llama_cpp/llama_cpp.c', line 1857

static VALUE llama_kv_cache_view_get_max_contiguous_idx(VALUE self) {
  struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
  return INT2NUM(data->max_contiguous_idx);
}

#n_cellsInteger

Returns:

  • (Integer)


1832
1833
1834
1835
# File 'ext/llama_cpp/llama_cpp.c', line 1832

static VALUE llama_kv_cache_view_get_n_cells(VALUE self) {
  struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
  return INT2NUM(data->n_cells);
}

#n_seq_maxInteger

Returns:

  • (Integer)


1837
1838
1839
1840
# File 'ext/llama_cpp/llama_cpp.c', line 1837

static VALUE llama_kv_cache_view_get_n_seq_max(VALUE self) {
  struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
  return INT2NUM(data->n_seq_max);
}

#token_countInteger

Returns:

  • (Integer)


1842
1843
1844
1845
# File 'ext/llama_cpp/llama_cpp.c', line 1842

static VALUE llama_kv_cache_view_get_token_count(VALUE self) {
  struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
  return INT2NUM(data->token_count);
}

#used_cellsInteger

Returns:

  • (Integer)


1847
1848
1849
1850
# File 'ext/llama_cpp/llama_cpp.c', line 1847

static VALUE llama_kv_cache_view_get_used_cells(VALUE self) {
  struct llama_kv_cache_view* data = get_llama_kv_cache_view(self);
  return INT2NUM(data->used_cells);
}