Comments (6)
This isn't part of llamasharp I'm very familiar with, but it does look like it's just meant to be valid JSON. Here's the relevant code:
InteractiveExecutorState state = (InteractiveExecutorState)GetStateData();
using(FileStream fs = new FileStream(filename, FileMode.OpenOrCreate, FileAccess.Write))
{
JsonSerializer.Serialize(fs, state);
}
I think it's because it's using OpenOrCreate
, so there's still junk in the file if the new content is smaller than the old content.
Try deleting the file before saving.
saddam213 beat me to it ๐
from llamasharp.
Deleting the file before saving works well.
from llamasharp.
Could you share a copy of the JSON file?
from llamasharp.
Here is an image of it in VS code. Is the SaveState supposed to just write out well formed JSON? It looks like it is writing out a bunch of odd data after the JSON.
If you need the full file I can try to paste it here.
from llamasharp.
We need to change FileMode.OpenOrCreate
to FileMode.Create
so it overwrites the entite file
from llamasharp.
I just pushed up a PR that should fix this, could you confirm if using the master
branch fixes it?
from llamasharp.
Related Issues (20)
- CentOS x86_64 Failed Loading 'libllama.so' HOT 4
- System.TypeInitializationException: 'The type initializer for 'LLama.Native.NativeApi' threw an exception.' HOT 12
- How do I continously print the answer word for word when using document ingestion with kernel memory? HOT 1
- How to rebuild LLamaSharp backends HOT 2
- Namespace should be consistent
- Mamba HOT 10
- Android Backend HOT 2
- [Feature] Allow async model loading and cancellation
- [CI] Add more unit test to ensure the the outputs are reasonable HOT 3
- Take multiple chat templates into account
- [Feature]: Support for Function Calling or Tools HOT 1
- [BUG]: DefragThreshold default is not matching llama.cpp and probably not intended HOT 6
- [BUG]: Answer stop abruptly after contextsize, even with limiting prompt size HOT 1
- [BUG]: Linux cuda version detection could be incorrect HOT 2
- [BUG]: WSL2 has problem running LLamaSharp with cuda11
- Add unit test about long context HOT 2
- Add debug mode of LLamaSharp
- How to better provide system information for LLMs HOT 3
- LLAVA Configuration HOT 4
- [Feature]: ไธๅ็LLMๆจกๅ๏ผไปฃ็ ่ฆไปฅๆๆ ท็ๆนๅผ่ๅๅฐ้กน็ฎ้ HOT 3
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.