Commit Graph

493 Commits

Author SHA1 Message Date
George Panchuk
48136cd67f refactoring: alter workflow names 2024-11-13 13:08:31 +01:00
George Panchuk
f64d0f0df9 fix: do not run windows and mac os tests on gpu branch 2024-11-13 13:08:31 +01:00
George Panchuk
5bcc480e09 new: gpu package publish workflow 2024-11-13 13:08:31 +01:00
amietn
9841666bd5 Remove numpy<2 dependency (#362)
This causes an incompatibility with spaCy because no matching
versions of numpy can be found when using both libraries at once.

It looks like the tests pass again without the numpy<2 requirement
so there is no reason to keep this requirement anymore.
v0.4.2
2024-11-13 11:43:02 +01:00
Hossam Hagag
860e2ad691 Tsk 375 add jina rerankers (#379)
* feat: Added jina reranker models

* chore: Added jina reranker canonical score values

* chore: added rounding of the output for easier reproducability

* chore: Added jina reranker models in batch test

* chore: remove redundant np.round

* chore: test only <1gb files in local

* chore: Updated docs to add rerankers

* fix: recompute canonical values with fp16

* new: extend NOTICE with jina reranker v2

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-11-13 10:48:45 +01:00
Hossam Hagag
d141e29784 Fix type hint (#392)
* fix: Fix return of onnx_embed

* fix: Fix type hint of start method in worker class

* fix: Fix not passing kwargs in _preprocess_onnx_input and tokenize as base class

* fix: Fix not passing kwargs in _preprocess_onnx_input as base class

* fix: change tokenize in simpleTokenizer to classmethod

* chore: Changed query argument to Iterable to match base class

* chore: changed mask token id and pad token id to be int

* review suggestions (#398)

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2024-11-13 10:32:46 +01:00
Hossam Hagag
7c935717d2 improve: Changed the way we are adding the query and document markers in colbert (#391)
* improve: Changed the way we are adding the query and document markers in colbert

* fix: Truncate the inout_ids and attention_mask when adding query and document markers to original input length

* fix: Fix broadcast issue

* chore: Remove redundant if condition

* nit

* refactor (#397)

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2024-11-13 10:23:26 +01:00
paulmartrencharpro
8413066f7b Add rerankers to the list of supported models (Supported_Models.ipynb) (#393)
* Add rerankers to the list of supported models (Supported_Models.ipynb)

* fix: update imports

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-11-13 09:59:28 +01:00
George
faed7f1320 fix: fix model cleanup in tests (#400)
* fix: fix model cleanup in tests
2024-11-12 19:08:39 +01:00
George
5b895420b1 Update GitHub templates (#389)
* new: add PR template, decouple bug template with new model request

* new: add feature request, model request
2024-11-08 11:45:21 +01:00
George
e868bbaebc new: add reranker example to readme (#390)
* new: add reranker example to readme

* Update README.md

Co-authored-by: Anush  <anushshetty90@gmail.com>

* fix: compute the scores

---------

Co-authored-by: Anush <anushshetty90@gmail.com>
2024-11-07 17:31:13 +01:00
George Panchuk
a5f3f11829 bump version to v0.4.2 2024-11-07 12:03:34 +01:00
Hossam Hagag
3fc0e2b382 chore: Add notice file for jina ai models (#380)
* chore: Add notice file for jina ai models

* chore: Update notice

* Update NOTICE

Co-authored-by: George <george.panchuk@qdrant.tech>

* chore: added jina embeddings v3

* chore: removed unsupported models

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2024-11-05 14:22:03 +02:00
Hossam Hagag
12b06ece51 chore: Lock onnxruntime version to be < 1.20.0 (#386) 2024-11-04 22:53:50 +02:00
Hossam Hagag
1deb830328 Tsk 374 add jina colbert v2 (#378)
* feat: Added support for jina-colbert-v2

* chore: Generalized query marker and document marker

* nit: remove github action on dispatch

* chore: updated license

* fix: Fix attention mask to be all 1 in xlmrobertatokenizer

* feat: Added class for JinaColbertV2

* feat: Added jina colbert

* chore: Change tolerance of the test

* chore: Changed encoding of attention mask to 1 to be only in queries

* chore: Changed the replacable token to be ' @' as its considered as one token

* chore: Removed redundant functions

* chore: Updated supported models docs

* nit: Remove print statement

* nit: visual stuff

* fix: Fix dimention of jina colbert in description

* fix: canonical query and document values for jina colbert
2024-11-03 11:02:41 +02:00
George Panchuk
aba8fb43cf bump version to v0.4.1 v0.4.1 2024-10-21 23:56:19 +04:00
Dmitrii Ogn
69ffaa0f48 Pystemmer -> py-rust_stemmers (#366)
* bump version to 0.4.0

* py-rust-stemmers support instead of snowball stemmer and pystemmer

* py-rust-stemmers support instead of snowball stemmer and pystemmer

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-10-21 23:46:20 +04:00
Hossam Hagag
cf67a80ff7 Type fix (#371)
* fix: Fix type when calling parallelworkerpool
parallelworkerpool accepts num_workers as int only

* fix: Fix type OnnxOutputContext.
OnnxOutputContext takes attention_mask and input_ids as optional while we cannot assign none to ndarray

* fix: Fix progress might not be bool and might be literal 0
2024-10-21 21:31:17 +04:00
Hossam Hagag
a21e925000 chore: Updated colab gpu instructions (#367)
* chore: Updated colab gpu instructions

* chore: Update gpu docs

* chore: update gpu docs

* chore: Update gpu docs, add cuda 11 doc
2024-10-21 14:06:07 +04:00
Hossam Hagag
0638c011dc chore: Added license for all models (#364)
* chore: Added license for all models

* chore: added license as key value pair

* chore: Updated clip models text/image license
2024-10-17 08:57:33 +02:00
Hossam Hagag
eaecf7d471 Multi gpu support (#358)
* feat: Added multi gpu support for text embedding

* feat: Add support for multi-gpu for special text models

* fix: Fix lazy_load to load the model to child processes when parallel is not none

* feat: Added lazy_load and multi-gpu to colbert

* feat: Add lazy_load and multi gpu to image models

* feat: Support lazy_load and multi-gpu to sparse models (except BM25)

* fix: Fixed BM25 not working

* refactor: Remove redundant GPUParallelProcessor

* refactor: Refactor _embed_*_parallel

* feat: Add cuda argument
refactor: Refactor how worker assign device

* fix: Fix if providers and cuda are None

* fix: Fix providers and cuda are none

* WIP: Multi gpu support review (#361)

* WIP: review

* wip: review

* refactor: refactor images

* refactor: refactor sparse

* refactor: refactor late interaction

* add model loading

* add tests

* fix: uncomment models in tests

* fix: fix variable declaration order

* fix: fix device id assignment

* tests: add multi gpu tests

* fix: fix device id assignment for sparse embeddings

* tests: update multi gpu tests

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>

* refactor: remove redundant declarations

* fix: rollback redundant changes

* fix: remove num workers device ids dep, fix type hint

* fix: fix post process for sparse models

* fix: remove redundant model loading

* new: add lazy load and new gpu support to cross encoders

* fix: add rerankers to multi gpu tests

* fix: unlock multilingual test

* fix: fix gpu test with cross encoder

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-10-16 23:42:38 +02:00
Hossam Hagag
58b5a8ed9a fix: Fix error message when late interaction model name not found (#365)
chore: Updated type hint
2024-10-14 23:38:52 +03:00
Dmitrii Ogn
519b310f22 Api cross encoder (#355)
* create cross encoder api

* create cross encoder api

* create cross encoder api

* Create cross encoder api

* fix cross encoder

* update api cross encoder

* update cross encoder

* update cross encoder

* update cross encoder

* update cross encoder

* Fixes over comments

* Add CI space management and mere refactoring

* fix: update interface, update tests, add docstrings

* fix: fix input dtype

---------

Co-authored-by: quynhhuong <quynhhuong@ortho.fashion>
Co-authored-by: quynhhuong <hh3009@nyu.edu>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-10-09 22:14:57 +02:00
Dmitrii Ogn
e2e1f93685 Support gcs offline mode (#352)
* Added support of gcs offline init

* Proper error messages

* Moved local_files-only to class field

* Type hint for retries + retries fix
2024-09-30 22:08:52 +02:00
Hossam Hagag
dab4dcc99a chore: Updating docs of installing fastembed-gpu (#344)
* chore: Updating docs of installing fastembed-gpu

* chore: updated common issues

* chore: Update gcp setup

* chore: Updated an example of installing cuda12 and cudnn9 on ubuntu 22.04

* rephrasing

* update readme

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-09-24 17:09:35 +02:00
Hossam Hagag
40a03740ff fix: Fix deadlock when child gets kill -9 sig (#340)
* fix: Fix deadlock when child gets kill -9 sig

* chore: Better cleanup for resources

* chore: changed place of processes.clear

* fix: Added cancle_join_thread for emergency shutdown
2024-09-24 15:55:24 +02:00
Dmitrii Ogn
65c2efd6f1 Tf-idf fix: punctuation removal + lowercasing (#339)
* Tf-idf fix:
Remove punctuation properly + lowercase

* Test fix

* Test fix

* Test fix

* Redudant accum removal

* Redudant accum removal

* 0.878890950070688

* Latest changes with
Average recall: 0.8915516690721613

* Support of special characters

* Removal of debug print

* Type annotations

* Type annotation support for python 3.8

* Type annotation support for python 3.8
2024-09-24 13:21:07 +02:00
George
97f2fb278e wip: remove model dir (#350)
* wip: remove model dir

* fix: update pytest run

* wip: disable some tests not used atm

* wip: disable some tests in ci

* wip: add debug print

* fix: fix ci, remove models after usage

* fix: fix bm25 deletion

* fix: remove redundant ci commands
2024-09-24 12:18:44 +02:00
n0x29a
fa2205115d Fix: Normalize tokens to lowercase before checking stopwords in BM25 (#337)
* Fix: Normalize tokens to lowercase before checking stopwords in BM25

* Test: Normalize tokens to lowercase before checking stopwords in BM25

* Test Fix test_multilanguage: in "Je suis au lit", the "Je" should be skipped because it in the stopwords.

* chore: apply ruff

---------

Co-authored-by: H4-8ZSI <H4-8ZSI@EXAMPLE.COM>
2024-09-06 11:42:00 +02:00
George Panchuk
9445f95a32 bump version to v0.3.6 v0.3.6 2024-08-23 21:15:43 +02:00
George
ab9ab73278 Fix deprecated splade model (#333)
* fix: return prithvida model to supported models

* fix: fix deprecation warning stacklevel
2024-08-23 21:14:51 +02:00
George Panchuk
08925c9cfc bump version to v0.3.5 v0.3.5 2024-08-23 19:52:42 +02:00
Jenny
3a1f468ef1 Images description (#324)
* Description of text embedding models, fix for consistency

* fixed misplacing of one description

* Changed descriptions to image models in fastEmbed

* Update fastembed/image/onnx_embedding.py

* Update fastembed/image/onnx_embedding.py

* Update fastembed/image/onnx_embedding.py

* Update fastembed/image/onnx_embedding.py

---------

Co-authored-by: Evgeniya Sukhodolskaya <evgeniya.sukhodolskaya@tum.de>
Co-authored-by: George <george.panchuk@qdrant.tech>
2024-08-23 19:27:48 +02:00
Dmitrii Ogn
bfeeb28721 answerdotai/answerai-colbert-small-v1 support added (#330)
* answerdotai/answerai-colbert-small-v1 support added

* New useful description

* New useful description #2
2024-08-23 18:17:39 +02:00
Dmitrii Ogn
a6841a8bde Added DeprecationWarning for Splade model (#331)
* Added DeprecationWarning for Splade model

* Dry and simple
2024-08-21 15:56:47 +03:00
Dmitrii Ogn
62607c237b Fix to avoid overfloat and get rid of model_max_length (#319)
* Fix to avoid overfloat and get rid of model_max_length
* Fixes for max_length vs model_max_length logic
Jupter warning disabled

* Support of https://github.com/jwodder/versioningit/issues/48

* Update fastembed/common/preprocessor_utils.py
---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2024-08-14 15:59:22 +03:00
Jenny
49762a6d19 Description of text embedding models, fix for consistency (#317)
* Description of text embedding models, fix for consistency

* fixed misplacing of one description

---------

Co-authored-by: Evgeniya Sukhodolskaya <evgeniya.sukhodolskaya@tum.de>
2024-08-12 11:41:07 +02:00
Dmitrii Ogn
782273f851 Bm25 multilanguage (#318)
* Initial commit for opened images support

* Additional tests for image embeddings

* Added selfish logo test as requests input

* Isort for image tests

* Support of multilanguage for bm25
Tests for french

* Tests refactoring

* PR requested changes
2024-08-12 11:40:14 +02:00
Dmitrii Ogn
9c72d2f59f Opened images support (#315)
* Opened image support

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-07-31 13:23:17 +03:00
Anush
0e258ab875 feat: Added jina-embeddings-v2-base-code (#301)
* feat: Added jina-embeddings-v2-base-code

* fix: test embeddings for "hello world" not "Hello"

* docs: Updated supported models
2024-07-18 18:17:46 +05:30
George
e49789c129 fix: update push gpu command (#300) 2024-07-18 12:22:12 +03:00
Anush
1bf72922ce docs: fixed README.md examples (#298) 2024-07-17 17:49:29 +05:30
Anush
70566dff99 docs: Updated supported models (#302) 2024-07-17 16:44:50 +05:30
George Panchuk
fd116dd507 bump version to 0.3.4 v0.3.4 2024-07-15 15:59:52 +03:00
George
0315c3b8c6 new: add modifier flag into bm models config (#299)
* new: add modifier flag into bm models config

* refactoring: rename modifier field
2024-07-15 15:57:21 +03:00
Dmitrii Ogn
54e0f38914 Update README.md (#295) 2024-07-11 13:39:19 +03:00
George
3a8985b35c new: add retry logic for model downloading (#293)
* new: add retry logic for model downloading

* fix: add sleep
2024-07-10 20:09:11 +03:00
Dmitrii Ogn
f0ff09c546 Oml zoo (#291)
* Support of Qdrant/Unicom-ViT-B-16 and Qdrant/Unicom-ViT-B-32
2024-07-10 16:43:54 +03:00
Dmitrii Ogn
d09af55edd Nomic-embeddings-support (#280)
* Nomic-embeddings-support

* Jina models moved to pooled-normalized embeddings

* Canonical vector for nomic-ai/nomic-embed-text-v1.5-Q

* Moved all nomics to pooled_embeddings

---------

Co-authored-by: d.rudenko <dimitriyrudenk@gmail.com>
2024-07-10 11:45:30 +03:00
generall
9387ca3205 bump version to v0.3.3 v0.3.3 2024-07-06 00:53:45 +02:00