This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
scisharp
/
LLamaSharp
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
17
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
Fixed decoding of text "accumulating" over time (never properly clearing buffer)
tags/v0.7.0
Martin Evans
2 years ago
parent
51d4411a58
commit
a03fe003de
3 changed files
with
7 additions
and
6 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
LLama/LLamaStatelessExecutor.cs
+0
-4
LLama/Native/SafeLlamaModelHandle.cs
+6
-1
LLama/StreamingTokenDecoder.cs
+ 1
- 1
LLama/LLamaStatelessExecutor.cs
View File
@@ -100,7 +100,7 @@ namespace LLama
decoder.Add(id);
var decoded = decoder.Read();
yield return decode
r.Rea
d
()
;
yield return decoded;
tokens.Clear();
tokens.Add(id);
+ 0
- 4
LLama/Native/SafeLlamaModelHandle.cs
View File
@@ -1,11 +1,7 @@
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using LLama.Exceptions;
using LLama.Extensions;
namespace LLama.Native
{
+ 6
- 1
LLama/StreamingTokenDecoder.cs
View File
@@ -155,7 +155,12 @@ public sealed class StreamingTokenDecoder
/// <returns></returns>
public string Read()
{
return string.Join("", _characters);
if (_characters.Count == 0)
return "";
var str = string.Join("", _characters);
_characters.Clear();
return str;
}
/// <summary>
Write
Preview
Loading…
Cancel
Save