lucataco
/
bge-m3
BGE-M3, the first embedding model which supports multiple retrieval mode, multilingual and multi-granularity retrieval.
Prediction
lucataco/bge-m3:3af6c861IDtdyhblrbhppnc7cf45f5jwvavuStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- max_length
- 4096
- sentences_1
- What is BGE M3? Defination of BM25
- sentences_2
- BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction. BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document
- embedding_type
- dense
{ "max_length": 4096, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "dense" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "lucataco/bge-m3:3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", { input: { max_length: 4096, sentences_1: "What is BGE M3?\nDefination of BM25", sentences_2: "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", embedding_type: "dense" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "lucataco/bge-m3:3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", input={ "max_length": 4096, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "dense" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", "input": { "max_length": 4096, "sentences_1": "What is BGE M3?\\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "dense" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
[[0.626 0.3477] [0.3499 0.678 ]]{ "completed_at": "2024-02-07T20:45:41.668007Z", "created_at": "2024-02-07T20:42:48.689400Z", "data_removed": false, "error": null, "id": "tdyhblrbhppnc7cf45f5jwvavu", "input": { "max_length": 4096, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "dense" }, "logs": "Sentences_1 split out:\n['What is BGE M3?', 'Defination of BM25']\nSentences_2 split out:\n['BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document']\nencoding: 0%| | 0/1 [00:00<?, ?it/s]\nencoding: 100%|██████████| 1/1 [00:23<00:00, 23.31s/it]\nencoding: 100%|██████████| 1/1 [00:28<00:00, 28.09s/it]\nencoding: 0%| | 0/1 [00:00<?, ?it/s]\nencoding: 100%|██████████| 1/1 [00:22<00:00, 22.75s/it]\nencoding: 100%|██████████| 1/1 [00:25<00:00, 25.20s/it]", "metrics": { "predict_time": 53.449435, "total_time": 172.978607 }, "output": "[[0.626 0.3477]\n [0.3499 0.678 ]]", "started_at": "2024-02-07T20:44:48.218572Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tdyhblrbhppnc7cf45f5jwvavu", "cancel": "https://api.replicate.com/v1/predictions/tdyhblrbhppnc7cf45f5jwvavu/cancel" }, "version": "3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb" }
Generated inSentences_1 split out: ['What is BGE M3?', 'Defination of BM25'] Sentences_2 split out: ['BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document'] encoding: 0%| | 0/1 [00:00<?, ?it/s] encoding: 100%|██████████| 1/1 [00:23<00:00, 23.31s/it] encoding: 100%|██████████| 1/1 [00:28<00:00, 28.09s/it] encoding: 0%| | 0/1 [00:00<?, ?it/s] encoding: 100%|██████████| 1/1 [00:22<00:00, 22.75s/it] encoding: 100%|██████████| 1/1 [00:25<00:00, 25.20s/it]
Prediction
lucataco/bge-m3:3af6c861IDwu2utkjbymdffjnyr4dgrroqjmStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- max_length
- 8192
- sentences_1
- What is BGE M3? Defination of BM25
- sentences_2
- BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction. BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document
- embedding_type
- sparse
{ "max_length": 8192, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "sparse" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "lucataco/bge-m3:3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", { input: { max_length: 8192, sentences_1: "What is BGE M3?\nDefination of BM25", sentences_2: "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", embedding_type: "sparse" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "lucataco/bge-m3:3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", input={ "max_length": 8192, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "sparse" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", "input": { "max_length": 8192, "sentences_1": "What is BGE M3?\\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "sparse" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
0.19549560546875 0{ "completed_at": "2024-02-07T20:46:40.011402Z", "created_at": "2024-02-07T20:45:52.312034Z", "data_removed": false, "error": null, "id": "wu2utkjbymdffjnyr4dgrroqjm", "input": { "max_length": 8192, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "sparse" }, "logs": "Sentences_1 split out:\n['What is BGE M3?', 'Defination of BM25']\nSentences_2 split out:\n['BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document']\nencoding: 0%| | 0/1 [00:00<?, ?it/s]\nencoding: 100%|██████████| 1/1 [00:21<00:00, 21.18s/it]\nencoding: 100%|██████████| 1/1 [00:23<00:00, 23.67s/it]\nencoding: 0%| | 0/1 [00:00<?, ?it/s]\nencoding: 100%|██████████| 1/1 [00:21<00:00, 21.35s/it]\nencoding: 100%|██████████| 1/1 [00:23<00:00, 23.90s/it]\nThe weights for each token:\n[{'What': 0.08356, 'is': 0.08154, 'B': 0.1295, 'GE': 0.2517, 'M': 0.1702, '3': 0.2695, '?': 0.0408}, {'De': 0.05008, 'fin': 0.1368, 'ation': 0.04517, 'of': 0.0634, 'BM': 0.2517, '25': 0.3335}]", "metrics": { "predict_time": 47.683793, "total_time": 47.699368 }, "output": "0.19549560546875\n0", "started_at": "2024-02-07T20:45:52.327609Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wu2utkjbymdffjnyr4dgrroqjm", "cancel": "https://api.replicate.com/v1/predictions/wu2utkjbymdffjnyr4dgrroqjm/cancel" }, "version": "3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb" }
Generated inSentences_1 split out: ['What is BGE M3?', 'Defination of BM25'] Sentences_2 split out: ['BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document'] encoding: 0%| | 0/1 [00:00<?, ?it/s] encoding: 100%|██████████| 1/1 [00:21<00:00, 21.18s/it] encoding: 100%|██████████| 1/1 [00:23<00:00, 23.67s/it] encoding: 0%| | 0/1 [00:00<?, ?it/s] encoding: 100%|██████████| 1/1 [00:21<00:00, 21.35s/it] encoding: 100%|██████████| 1/1 [00:23<00:00, 23.90s/it] The weights for each token: [{'What': 0.08356, 'is': 0.08154, 'B': 0.1295, 'GE': 0.2517, 'M': 0.1702, '3': 0.2695, '?': 0.0408}, {'De': 0.05008, 'fin': 0.1368, 'ation': 0.04517, 'of': 0.0634, 'BM': 0.2517, '25': 0.3335}]
Prediction
lucataco/bge-m3:3af6c861IDvy65tbbbpvldplp3fqaqvodhtiStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- max_length
- 8192
- sentences_1
- What is BGE M3? Defination of BM25
- sentences_2
- BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction. BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document
- embedding_type
- colbert
{ "max_length": 8192, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "colbert" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "lucataco/bge-m3:3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", { input: { max_length: 8192, sentences_1: "What is BGE M3?\nDefination of BM25", sentences_2: "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", embedding_type: "colbert" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "lucataco/bge-m3:3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", input={ "max_length": 8192, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "colbert" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/bge-m3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb", "input": { "max_length": 8192, "sentences_1": "What is BGE M3?\\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "colbert" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
tensor(0.7796) tensor(0.4622){ "completed_at": "2024-02-07T20:47:57.345646Z", "created_at": "2024-02-07T20:47:08.358094Z", "data_removed": false, "error": null, "id": "vy65tbbbpvldplp3fqaqvodhti", "input": { "max_length": 8192, "sentences_1": "What is BGE M3?\nDefination of BM25", "sentences_2": "BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.\nBM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document", "embedding_type": "colbert" }, "logs": "Sentences_1 split out:\n['What is BGE M3?', 'Defination of BM25']\nSentences_2 split out:\n['BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document']\nencoding: 0%| | 0/1 [00:00<?, ?it/s]\nencoding: 100%|██████████| 1/1 [00:22<00:00, 22.43s/it]\nencoding: 100%|██████████| 1/1 [00:25<00:00, 25.08s/it]\nencoding: 0%| | 0/1 [00:00<?, ?it/s]\nencoding: 100%|██████████| 1/1 [00:21<00:00, 21.28s/it]\nencoding: 100%|██████████| 1/1 [00:23<00:00, 23.77s/it]", "metrics": { "predict_time": 48.973038, "total_time": 48.987552 }, "output": "tensor(0.7796)\ntensor(0.4622)", "started_at": "2024-02-07T20:47:08.372608Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/vy65tbbbpvldplp3fqaqvodhti", "cancel": "https://api.replicate.com/v1/predictions/vy65tbbbpvldplp3fqaqvodhti/cancel" }, "version": "3af6c861256a2a8e07a54a478813e6632f339f05235b59374f292f4759555bfb" }
Generated inSentences_1 split out: ['What is BGE M3?', 'Defination of BM25'] Sentences_2 split out: ['BGE M3 is an embedding model supporting dense retrieval, lexical matching and multi-vector interaction.', 'BM25 is a bag-of-words retrieval function that ranks a set of documents based on the query terms appearing in each document'] encoding: 0%| | 0/1 [00:00<?, ?it/s] encoding: 100%|██████████| 1/1 [00:22<00:00, 22.43s/it] encoding: 100%|██████████| 1/1 [00:25<00:00, 25.08s/it] encoding: 0%| | 0/1 [00:00<?, ?it/s] encoding: 100%|██████████| 1/1 [00:21<00:00, 21.28s/it] encoding: 100%|██████████| 1/1 [00:23<00:00, 23.77s/it]
Want to make some of these yourself?
Run this model