Comments (6)
I should mention that I am saving state right after creating a new executor so I have a "clean state" that I can reload later.
from llamasharp.
Works great! Thanks
from llamasharp.
Do you have a stacktrace from the error, to help track down exactly where it's coming from?
from llamasharp.
System.ArgumentException
HResult=0x80070057
Message=.NET number values such as positive and negative infinity cannot be written as valid JSON. To make it work when using 'JsonSerializer', consider specifying 'JsonNumberHandling.AllowNamedFloatingPointLiterals' (see https://docs.microsoft.com/dotnet/api/system.text.json.serialization.jsonnumberhandling).
Source=System.Text.Json
StackTrace:
at System.Text.Json.ThrowHelper.ThrowArgumentException_ValueNotSupported()
at System.Text.Json.Utf8JsonWriter.WriteNumberValue(Single value)
at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo
1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.JsonConverter
1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](Utf8JsonWriter writer, TValue& value, JsonTypeInfo jsonTypeInfo, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStream[TValue](Stream utf8Json, TValue& value, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Serialize[TValue](Stream utf8Json, TValue value, JsonSerializerOptions options)
at LLama.InteractiveExecutor.SaveState(String filename)
at ArchobotLLMServer.LLMServerAzureHybrid.d__31.MoveNext() in C:\Users\Owner\source\repos\mphacker\Archobotcore\ArchobotLLMServer\LLMServerHybrid.cs:line 93
from llamasharp.
I tracked down the issue to the mirostat_mu
value. It's initially a NaN
value to indicate a "not initialised yet" state and it gets set to a valid value the first time the model is evaluated. JSON serialization doesn't like NaN, so you get the error above.
Could you try out #88 to see if it fixes the issue for you? I've changed it to use a nullable float instead of a NaN
value.
from llamasharp.
I've merged #88, so this should be fixed in the master branch now. If you can confirm it works for you I'll close the issue
from llamasharp.
Related Issues (20)
- LLama.Native.SafeLLamaContextHandle.Tokenize bug? HOT 6
- LLamaWeights.LoadFromFile HOT 2
- Isn't StatelessExecutor missing eos check? HOT 1
- Cannot add a user message after another user message HOT 2
- Responses are always Chinese HOT 4
- AccessViolationException in LlamaWeights.LoadFromFile() when the model file doesn't exist HOT 1
- Token Healing
- using LLamaSharp.Backend.Cuda12 does not select GPU HOT 3
- What model formats are supported by LLamaSharp HOT 2
- using CUDA when both CPU and Cuda12 back-ends are present. HOT 5
- on linux centos 8 get The type initializer for 'LLama.Native.NativeApi' threw an exception HOT 8
- session.ChatAsync This code will loop output infinitely,Is there parameter control?
- failed to quantize on windows
- DllImport should not be prefixed with lib HOT 1
- Enable OpenCL/ROCm HOT 6
- [Proposal] Drop support for netstandard2.0 and .NET 6.0 HOT 3
- Docs broken HOT 1
- Saving State after GetState HOT 1
- Wrong result when change to other model. HOT 3
- Using this repo in unity 3d. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llamasharp.