Comments (6)
I'll close this issue since it looks like it's been resolved :)
from llamasharp.
PROBABLY (!!) the reason of that exception is that that every news row started with "Дата:" (which is "Date:" in Russian) and LLM (?) decides that it's a kind of Role... So when I added minus before the Date ("- Дата:") then I can't reproduce the exception... Checking it...
from llamasharp.
I've got this exception again, even if I used "minus" signs before the every news row.
In StatelessExecutor, in the line 81, it comes from LlamaContext:
DecodeResult decodeResult = await Context.DecodeAsync(_batch, cancellationToken);
if (decodeResult != 0)
{
throw new LLamaDecodeError(decodeResult);
}
from llamasharp.
The NoKvSlot
error means that there's not enough memory to hold all of the tokens you're trying to submit to the system.
You'll probably need to reduce the amount of text you are submitting in the initial prompt.
from llamasharp.
ok, got it, thanks for the info!
I increased ModelParams.ContextSize 1024 -> 4096, checking it now (BTW - will it help? I've just started learning LLMs and LLamaSharp)... The prompt I used before had length of 2009 symbols, and if my assumption is right, it caused these exceptions
UPD - this is for llama-2-7b-chat.Q4_K_M, I can see that Mistral-based LLMs can have 8K as the context size, will check it later.
from llamasharp.
There are 2 "contexts" here, which means different things. There's actually a PR in llama.cpp to change the naming, because it's so confusing!
There is a pre-allocated buffer (called the KV cache) which holds information about each token. That's what's set by the ModelParams.ContextSize
parameter. If you had this set to 1024 then that will definitely cause an issue with trying to fit in 2009 tokens.
I can see that Mistral-based LLMs can have 8K as the context size
LLMs are trained for a certain number of positions (i.e. how many tokens they can understand, you can feed in more but this isn't something the system is trained for). That's what the 8k "context size" is here.
from llamasharp.
Related Issues (20)
- Nuget references both CPU and CUDA simultaneously HOT 2
- Thread Safety in llama.cpp HOT 1
- Llama.web app published into iis windows 64bit server, after deployment model values not loaded from appsettings HOT 4
- Not able to read fields from appsetings.json HOT 3
- Examples don't run with CUDA12 HOT 17
- Consider adding Windows on ARM build of llama.dll to LLamaSharp.Backend.Cpu HOT 7
- Drastic CUDA compute speed drop in last version HOT 13
- Build CUDA with AVX HOT 2
- Fatal error. System.Runtime.InteropServices.SEHException HOT 32
- Godot game engine example HOT 25
- how to prevent the llama from completing requests HOT 1
- about NVidia GPU use example HOT 4
- SemanticKernel ChatCompletion is Stateless HOT 5
- Segmentation fault on Docker HOT 2
- [LLamaSharp.Backend.Cuda12 v0.10.0] Unable to load the model onto multiple GPUs HOT 3
- Unable to use lora in llamasharp but can use it in llama.cpp HOT 8
- AMD GPUs Support
- Exception error when sending any prompts. HOT 7
- Parallel Inferencing? HOT 28
- Information on new important updates in llama.cpp 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.