this post was submitted on 22 Nov 2023
1 points (100.0% liked)

Machine Learning

1 readers
1 users here now

Community Rules:

founded 11 months ago
MODERATORS
 

I'm looking for insights and advice on extending the context window of the LLMs (most specifically Mistral).

Whether you're a researcher, developer, or enthusiast in the field, I'd love to hear about your experiences and recommendations. Are there any specific techniques, methodologies, or tools you've found effective in extending the context window for LLMs?

Additionally, if you've encountered challenges in this area, how did you overcome them? Any resources, papers, or community discussions you can point me to would be greatly appreciated.

top 6 comments
sorted by: hot top controversial new old
[–] Thenameis_Meme@alien.top 1 points 10 months ago

have you considered utilizing sliding window techniques to expand the context window for LLMs? It's a commonly used approach that can effectively increase the context window without overwhelming computational resources. Additionally, leveraging hierarchical approaches or incorporating external knowledge sources could also be beneficial for extending the context window. Good luck with your exploration!

[–] woopdedoodah@alien.top 1 points 10 months ago (1 children)

I have been able to expand the context window of multimodal models like gpt4 simply by rendering the text to images at a small font size and then feeding it in as images. I've not done large scale studies to determine the total increase in perplexity or anything but my empirical results have been great. Plus you get the ability to analyze non standard text.

If it were me, I would LoRA adapt a model to take in image input. There's a lot of space in the token embedding space that is completely barren that could be used for reasoning.

[–] light24bulbs@alien.top 1 points 10 months ago
[–] Born-Hearing2479@alien.top 1 points 10 months ago

https://arxiv.org/abs/2309.17453

This paper might be useful. They use window attention with attention sinks to deal with longer texts.

[–] sshh12@alien.top 1 points 10 months ago (1 children)

I've been working on some experimental context window extensions using multimodal models https://github.com/sshh12/multi_token

Similar to the idea of putting text into an image for GPT4V, I'm just directly encoding chunks of texts into embeddings and injecting them in the models. This gives you a very lossy 128x extension of your context window which is pretty massive.

[–] Infamous-Belt8671@alien.top 1 points 10 months ago

Thanks for the input. This seems amazing.