Comments (4)
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)
- How to get token level similarity scores? HOT 1
- Cannot access pre-trained ColBERT model on Windows 11 (CPU-only) HOT 2
- ImportError: DLL load failed while importing segmented_maxsim_cpp: The specified module could not be found. HOT 1
- Can't search with k over 128 HOT 2
- Inconsistent search results length for high top-k values HOT 4
- Rework Dependencies: ship with barebones dependencies & bundle different features as extras HOT 1
- 02-basic_training.ipynb fails HOT 1
- You have a GPU available, but only `faiss-cpu` is currently installed. HOT 4
- TypeError: array([15055, 320, 22479, 2853, 8197, ..., 374, 3827]) is not JSON serializable HOT 5
- Can't install on WSL 2 Windows 10 or Crashes (using faiss-gpu) HOT 8
- mac m1: trainer.train: ImportError: incompatible architecture (have 'x86_64', need 'arm64') HOT 2
- Pytorch 2.1 on Runpod running Examples hangs with message HOT 5
- llama-index version 0.10.x not compatible HOT 2
- Training resume feature isn't available due to removal in upstream ColBERT HOT 1
- Replace ColBERT with jina-colbert-v1-en HOT 2
- ImportError: cannot import name 'Document' from 'llama_index' (unknown location) HOT 11
- ImportError: cannot import name 'LLM' from 'llama_index.core.llms' HOT 1
- Discussion / forum for RAGatouille? HOT 1
- Is there a way to quiet the progress bar printout?
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 ragatouille.