Coder Social home page Coder Social logo

Comments (4)

NohTow avatar NohTow commented on July 21, 2024

I did some additional experiments which confirmed that the issue is in the compression process.
I computed the similarity between original vectors and decompression of the compressed version (np.diag(embs[:100] @ self.decompress(ResidualCodec.Embeddings(codes, residuals))[:100].T.cpu())).
This value is, for the original ColBERTv2 model 0.9995, whereas, for the BGE model, it is 0.010826.

In an attempt to understand why, I reversed every modification done to make BGE compatible with RAGatouille and identified one that strongly affect the score: the final normalization (after the linear layer) is L2 in the original ColBERT and L1 in BGE. Using L2 allows to increase the reconstruction similarity to 0.394.

More surprising is that, by reducing the number of bits (setting nbits = 2 manually), the score did not decrease but increased to 0.9473. This means that the model is actually usable in this state, but it would be better to understand why:

  • Using L1 destroys the compression results. Although it is not a big deal, BGE has been trained with L1 and using L2 might hurt the results.
  • How 2 bits quantization can be better than 8 bits. Again, it is usable like so, but given that BGE is using a very large embedding size, it would be cool to use more bits to encode it

from ragatouille.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.