You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, for my LLM input I need to split input prompt tokens into chunks, where each chunk represent a context window (or session):
lettokensToChunks=function(arr,chunks){returnarr.map(function(e,i){returni%chunks===0 ? arr.slice(i,i+chunks) : null;}).filter(function(e){returne;});};// inputTokens is Uint32Arrayletsessions=tokensToChunks(Array.from(inputTokens),max_tokens)
in order to respect the max_tokens at each inference session. This works ok in most cases, but occasionally subwords may fall into different chunks e.g.
thus causing the context window to have improper or missing semantic meaning.
Assumed we work at token level (hence no words, but codes), any good practice to handle in-context chunking to avoid this semantic displacement between different contexts (chunks)?
The text was updated successfully, but these errors were encountered:
Hello, for my LLM input I need to split input prompt tokens into chunks, where each chunk represent a context window (or session):
in order to respect the
max_tokens
at each inference session. This works ok in most cases, but occasionally subwords may fall into different chunks e.g.thus causing the context window to have improper or missing semantic meaning.
Assumed we work at token level (hence no words, but codes), any good practice to handle in-context chunking to avoid this semantic displacement between different contexts (chunks)?
The text was updated successfully, but these errors were encountered: