examples : replace llama_kv_cache_seq_* with llama_past_seq_*
This commit is contained in:
parent
372482dffe
commit
43d8d4bf9e
23 changed files with 125 additions and 112 deletions
|
@ -214,7 +214,7 @@ actor LlamaContext {
|
|||
}
|
||||
batch.logits[Int(batch.n_tokens) - 1] = 1 // true
|
||||
|
||||
llama_kv_cache_clear(context)
|
||||
llama_past_clear(context)
|
||||
|
||||
let t_pp_start = ggml_time_us()
|
||||
|
||||
|
@ -227,7 +227,7 @@ actor LlamaContext {
|
|||
|
||||
// bench text generation
|
||||
|
||||
llama_kv_cache_clear(context)
|
||||
llama_past_clear(context)
|
||||
|
||||
let t_tg_start = ggml_time_us()
|
||||
|
||||
|
@ -246,7 +246,7 @@ actor LlamaContext {
|
|||
|
||||
let t_tg_end = ggml_time_us()
|
||||
|
||||
llama_kv_cache_clear(context)
|
||||
llama_past_clear(context)
|
||||
|
||||
let t_pp = Double(t_pp_end - t_pp_start) / 1000000.0
|
||||
let t_tg = Double(t_tg_end - t_tg_start) / 1000000.0
|
||||
|
@ -296,7 +296,7 @@ actor LlamaContext {
|
|||
func clear() {
|
||||
tokens_list.removeAll()
|
||||
temporary_invalid_cchars.removeAll()
|
||||
llama_kv_cache_clear(context)
|
||||
llama_past_clear(context)
|
||||
}
|
||||
|
||||
private func tokenize(text: String, add_bos: Bool) -> [llama_token] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue