Context about exploration & goals— So, the core idea is to leverage SONAR multi modality…
- User
Context about exploration & goals— So, the core idea is to leverage SONAR multi modality embeddings as a form of auxiliary input to LLaMA to get a better model even tho SONAR isn't a token based embedding model like w2vec, glove, bert, etc.
The hypothesis is that since SONAR vector representations are inherently multi modal if we can successfully integrate it, we can achieve some sort of pesudo multi modality and better results for downstream tasks without actually fine tuning LLaMA or modifying it's core params in any meaningful.
Currently, the goal is exploration of various ways to tackle this challenge of integration. As SONAR output has a fixed dimension of 1024 and also since they are not token level embeddings this poses a problem as LLaMA has an output dimensionality of 4096. So what should we do to make it match?
The simple plan for now is to see if a global bias is viable (before trying to implement dynamic bias); It's to basically just treat SONAR as a form of embedding layer (like w2vec) and use a simple linear up-projection match dimensionality of LLaMA's token embeddings. It results in lossy data as we're projecting onto a higher dimensional plane so the goal is to make a good projection. Then, instead of tryna concatenate the two representations (which would mess up the transformer architecture) we'll add the up-projected SONAR vector to each token embedding before it's fed into LLaMA. Mathematically, it's just
y_t = x_t + Linear(sonar_embed)(this is terrible ik) So, in this case the Linear(sonar_embed) effectively acts as a global context vector and we're adding bias to all the tokens, x_t is token & y_t is augmented token It's highly experimental and there's no theoretical or empirical evidence that this will work, but I'm attempting to do it because it seems plausible and it wouldn't take much time.As the approach isn't super sophisticated, but it's a very simple, low-effort way to see if this is a viable strategy or not. If you're interested feel free to join in and help even tho we'll probably fail.
Assistant
Thank you for sharing this interesting exploration of integrating SONAR embeddings with LLaMA. Let me analyze the approach and provide some technical insights based on the SONAR codebase.
From the code context, I can see that SONAR provides two main types of embeddings:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.