Run this model with HF Jobs
Run sinequa/vectorizer.raspberry on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/sinequa/vectorizer.raspberry. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/sinequa/vectorizer.raspberry on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use sinequa/vectorizer.raspberry with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sinequa/vectorizer.raspberry with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("sinequa/vectorizer.raspberry") model = AutoModelForMaskedLM.from_pretrained("sinequa/vectorizer.raspberry", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update model card (#5)
Browse files- update model card (5aa22f3be6ac58b39854f24f575a67390667bca2)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124---pipeline_tag: sentence-similaritytags:- feature-extraction- sentence-similaritylanguage:- de- en- es- fr- it- nl- ja- pt- zh---# Model Card for `vectorizer.raspberry`This model is a vectorizer developed by Sinequa. It produces an embedding vector given a passage or a query. Thepassage vectors are stored in our vector index and the query vector is used at query time to look up relevant passagesin the index.Model name: `vectorizer.raspberry`## Supported LanguagesThe model was trained and tested in the following languages:- English- French- German- Spanish- Italian- Dutch- Japanese- Portuguese- Chinese (simplified)Besides these languages, basic support can be expected for additional 91 languages that were used during the pretrainingof the base model (see Appendix A of XLM-R paper).## Scores| Metric | Value ||:-----------------------|------:|| Relevance (Recall@100) | 0.613 |Note that the relevance score is computed as an average over 14 retrieval datasets (see[details below](#evaluation-metrics)).## Inference Times| GPU | Batch size 1 (at query time) | Batch size 32 (at indexing) ||:-----------|-----------------------------:|----------------------------:|| NVIDIA A10 | 2 ms | 19 ms || NVIDIA T4 | 4 ms | 52 ms |The inference times only measure the time the model takes to process a single batch, it does not include pre- orpost-processing steps like the tokenization.## Requirements- Minimal Sinequa version: 11.10.0- GPU memory usage: 610 MiBNote that GPU memory usage only includes how much GPU memory the actual model consumes on an NVIDIA T4 GPU with a batchsize of 32. It does not include the fix amount of memory that is consumed by the ONNX Runtime upon initialization whichcan be around 0.5 to 1 GiB depending on the used GPU.## Model Details### Overview- Number of parameters: 107 million- Base languagemodel: [mMiniLMv2-L6-H384-distilled-from-XLMR-Large](https://huggingface.co/nreimers/mMiniLMv2-L6-H384-distilled-from-XLMR-Large) ([Paper](https://arxiv.org/abs/2012.15828), [GitHub](https://github.com/microsoft/unilm/tree/master/minilm))- Insensitive to casing and accents- Output dimensions: 256 (reduced with an additional dense layer)- Training procedure: Query-passage-negative triplets for datasets that have mined hard negative data, Query-passagepairs for the rest. Number of negatives is augmented with in-batch negative strategy### Training DataThe model have been trained using all datasets that are cited inthe [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) model.In addition to that, this model has been trained on the datasets citedin [this paper](https://arxiv.org/pdf/2108.13897.pdf) on the 9 aforementioned languages.### Evaluation MetricsTo determine the relevance score, we averaged the results that we obtained when evaluating on the datasets of the[BEIR benchmark](https://github.com/beir-cellar/beir). Note that all these datasets are in English.| Dataset | Recall@100 ||:------------------|-----------:|| Average | 0.613 || | || Arguana | 0.957 || CLIMATE-FEVER | 0.468 || DBPedia Entity | 0.377 || FEVER | 0.820 || FiQA-2018 | 0.639 || HotpotQA | 0.560 || MS MARCO | 0.845 || NFCorpus | 0.287 || NQ | 0.756 || Quora | 0.992 || SCIDOCS | 0.456 || SciFact | 0.906 || TREC-COVID | 0.100 || Webis-Touche-2020 | 0.413 |We evaluated the model on the datasets of the [MIRACL benchmark](https://github.com/project-miracl/miracl) to test itsmultilingual capacities. Note that not all training languages are part of the benchmark, so we only report the metricsfor the existing languages.| Language | Recall@100 ||:----------------------|-----------:|| French | 0.650 || German | 0.528 || Spanish | 0.602 || Japanese | 0.614 || Chinese (simplified) | 0.680 |123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125---pipeline_tag: sentence-similaritytags:- feature-extraction- sentence-similaritylanguage:- de- en- es- fr- it- nl- ja- pt- zh---# Model Card for `vectorizer.raspberry`This model is a vectorizer developed by Sinequa. It produces an embedding vector given a passage or a query. The passage vectors are stored in our vector index and the query vector is used at query time to look up relevant passages in the index.Model name: `vectorizer.raspberry`## Supported LanguagesThe model was trained and tested in the following languages:- English- French- German- Spanish- Italian- Dutch- Japanese- Portuguese- Chinese (simplified)Besides these languages, basic support can be expected for additional 91 languages that were used during the pretraining of the base model (see Appendix A of XLM-R paper).## Scores| Metric | Value ||:-----------------------|------:|| Relevance (Recall@100) | 0.613 |Note that the relevance score is computed as an average over 14 retrieval datasets (see[details below](#evaluation-metrics)).## Inference Times| GPU | Quantization type | Batch size 1 | Batch size 32 ||:------------------------------------------|:------------------|---------------:|---------------:|| NVIDIA A10 | FP16 | 1 ms | 5 ms || NVIDIA A10 | FP32 | 2 ms | 18 ms || NVIDIA T4 | FP16 | 1 ms | 12 ms || NVIDIA T4 | FP32 | 3 ms | 52 ms || NVIDIA L4 | FP16 | 2 ms | 5 ms || NVIDIA L4 | FP32 | 4 ms | 24 ms |## Gpu Memory usage| Quantization type | Memory ||:-------------------------------------------------|-----------:|| FP16 | 550 MiB || FP32 | 1050 MiB |Note that GPU memory usage only includes how much GPU memory the actual model consumes on an NVIDIA T4 GPU with a batchsize of 32. It does not include the fix amount of memory that is consumed by the ONNX Runtime upon initialization whichcan be around 0.5 to 1 GiB depending on the used GPU.## Requirements- Minimal Sinequa version: 11.10.0- Minimal Sinequa version for using FP16 models and GPUs with CUDA compute capability of 8.9+ (like NVIDIA L4): 11.11.0- [Cuda compute capability](https://developer.nvidia.com/cuda-gpus): above 5.0 (above 6.0 for FP16 use)## Model Details### Overview- Number of parameters: 107 million- Base languagemodel: [mMiniLMv2-L6-H384-distilled-from-XLMR-Large](https://huggingface.co/nreimers/mMiniLMv2-L6-H384-distilled-from-XLMR-Large) ([Paper](https://arxiv.org/abs/2012.15828), [GitHub](https://github.com/microsoft/unilm/tree/master/minilm))- Insensitive to casing and accents- Output dimensions: 256 (reduced with an additional dense layer)- Training procedure: Query-passage-negative triplets for datasets that have mined hard negative data, Query-passagepairs for the rest. Number of negatives is augmented with in-batch negative strategy### Training DataThe model have been trained using all datasets that are cited in the [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) model. In addition to that, this model has been trained on the datasets cited in [this paper](https://arxiv.org/pdf/2108.13897.pdf) on the 9 aforementioned languages.### Evaluation MetricsTo determine the relevance score, we averaged the results that we obtained when evaluating on the datasets of the[BEIR benchmark](https://github.com/beir-cellar/beir). Note that all these datasets are in English.| Dataset | Recall@100 ||:------------------|-----------:|| Average | 0.613 || | || Arguana | 0.957 || CLIMATE-FEVER | 0.468 || DBPedia Entity | 0.377 || FEVER | 0.820 || FiQA-2018 | 0.639 || HotpotQA | 0.560 || MS MARCO | 0.845 || NFCorpus | 0.287 || NQ | 0.756 || Quora | 0.992 || SCIDOCS | 0.456 || SciFact | 0.906 || TREC-COVID | 0.100 || Webis-Touche-2020 | 0.413 |We evaluated the model on the datasets of the [MIRACL benchmark](https://github.com/project-miracl/miracl) to test its multilingual capacities. Note that not all training languages are part of the benchmark, so we only report the metrics for the existing languages.| Language | Recall@100 ||:----------------------|-----------:|| French | 0.650 || German | 0.528 || Spanish | 0.602 || Japanese | 0.614 || Chinese (simplified) | 0.680 |
README.md+125-124