Browse Source

fix: always add bos when inference.

tags/v0.2.2
Yaohui Liu 3 years ago
parent
commit
ea5f9d38ac
No known key found for this signature in database GPG Key ID: E86D01E1809BD23E
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      LLama/LLamaModel.cs

+ 1
- 1
LLama/LLamaModel.cs View File

@@ -317,7 +317,7 @@ namespace LLama
{
int n_left = _n_past - _params.n_keep;

_n_past = _params.n_keep;
_n_past = Math.Max(1, _params.n_keep);

// insert n_left/2 tokens at the start of embed from last_n_tokens
_embed.InsertRange(0, _last_n_tokens.GetRange(_n_ctx - n_left / 2 - _embed.Count, _embed.Count));


Loading…
Cancel
Save