Comments (11)
@martindevans I looked at the fix, and if I understand correctly \n
is 3 tokens, could you confirm?
Until the bugfix is released, I'll hard code this edge case in Kernel Memory (which is using 0.9.1) to avoid exceptions.
from llamasharp.
https://github.com/aletfa/doctalk @martindevans TY.
from llamasharp.
Thanks for reporting this, I've reproduced it in a test and made some adjustments to the tokenizer which should fix it.
from llamasharp.
Btw in 0.9.1 the exception occurs also with these strings:
\t
\t\t
\t\t\t
- ......
\n\n
\n\n\n
\n\n\n\n
- ....
\t\n
\t\n\t\n\n\n\n\t\t
- ....
\b
\v
\0
from llamasharp.
Thanks for those examples, I've just added a unit test covering them (it passes, so it looks like the fix works).
if I understand correctly
\n
is 3 tokens
It's actually:
- 1: Beginning of string token
- 29871: A space (llama.cpp tokenizer really likes to add a space at the start)
- 13: The actual newline token
from llamasharp.
Another one is \nk.
from llamasharp.
All of these should be fixed by the changes currently in master :)
from llamasharp.
When a new Nuget package will be released with these fixes?
from llamasharp.
Very soon, it's been held up by some other OpenCL related changes. I hope by the end of this week.
from llamasharp.
I confirm that the fix resolves all the problems. TY. I'll wait for the next week.
from llamasharp.
I jsut released 0.10.0 with these changes :)
from llamasharp.
Related Issues (20)
- [BUG]: Vulkan backend crash on model loading HOT 3
- [BUG]: Different continuation after restoring state HOT 1
- Improve `LLamaEmbedder` HOT 2
- [BUG]: KernelMemory.AskAsync() does not work - exception: object reference not set to an instance of an object HOT 25
- [BUG]: fatal error using gemma-2-2b-it HOT 3
- [BUG]: "The type or namespace 'Common' does not exist in the namespace 'LLama'" HOT 4
- Application Not Using GPU Despite Installing LlamaSharp.Backend.Cuda12 HOT 1
- [Feature]: Add development support for Dev Containers HOT 6
- How do i use RAG by kernel memory and Semantic kernel Handlebar Planner with llama3 HOT 3
- versioning issue HOT 11
- [BUG]: gemma-2-9b-it-GGUF - error loading model HOT 3
- [BUG]: Error when starting LLama Cuda11/12 HOT 6
- [BUG]: Second Response Empty when using Grammar HOT 3
- LLamaSharp v0.15.0 broke cuda backend HOT 15
- [BUG]: KernelMemory - Simultaneous execution of AskDocument & ImportDocument HOT 18
- [BUG]: Error setting variables HOT 1
- [BUG:] When switching to new versions of LLamaSharp 0.16.0, there was a slowdown HOT 30
- A few moments in the process of work LLamaSharp & KernelMemory
- Question about promt templates
- [BUG]: DefaultSamplingPipeline - strange behavior at high temperature
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.