Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
nateraw /bge-large-en-v1.5:9cf9f015
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run nateraw/bge-large-en-v1.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"nateraw/bge-large-en-v1.5:9cf9f015a9cb9c61d1a2610659cdac4a4ca222f2d3707a68517b18c198a9add1",
{
input: {
texts: "[\"In the water, fish are swimming.\", \"Fish swim in the water.\", \"A book lies open on the table.\"]",
batch_size: 32,
convert_to_numpy: true,
normalize_embeddings: true
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run nateraw/bge-large-en-v1.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"nateraw/bge-large-en-v1.5:9cf9f015a9cb9c61d1a2610659cdac4a4ca222f2d3707a68517b18c198a9add1",
input={
"texts": "[\"In the water, fish are swimming.\", \"Fish swim in the water.\", \"A book lies open on the table.\"]",
"batch_size": 32,
"convert_to_numpy": True,
"normalize_embeddings": True
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run nateraw/bge-large-en-v1.5 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": "nateraw/bge-large-en-v1.5:9cf9f015a9cb9c61d1a2610659cdac4a4ca222f2d3707a68517b18c198a9add1",
"input": {
"texts": "[\\"In the water, fish are swimming.\\", \\"Fish swim in the water.\\", \\"A book lies open on the table.\\"]",
"batch_size": 32,
"convert_to_numpy": true,
"normalize_embeddings": true
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-10-05T08:54:37.825893Z",
"created_at": "2023-10-05T08:53:16.508248Z",
"data_removed": false,
"error": null,
"id": "wnn37y3boxihxnv2kyrk4atkiu",
"input": {
"path": null,
"texts": "[\"In the water, fish are swimming.\", \"Fish swim in the water.\", \"A book lies open on the table.\"]",
"batch_size": 32,
"convert_to_numpy": true,
"normalize_embeddings": true
},
"logs": "Torch cuda available True\ntorch cuda.get_device_name(0) NVIDIA A40\nort.get_available_providers() ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']\nParameter 'function'=<function Predictor.predict.<locals>.process at 0x7fc2940b2820> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.\nMap: 0%| | 0/3 [00:00<?, ? examples/s]\nBatches: 0%| | 0/1 [00:00<?, ?it/s]\u001b[A\nBatches: 100%|██████████| 1/1 [00:00<00:00, 86.99it/s]\nMap: 100%|██████████| 3/3 [00:00<00:00, 201.72 examples/s]\nSaved embeddings to /tmp/embeddings.npy. To load, run `np.load('/tmp/embeddings.npy')`",
"metrics": {
"predict_time": 1.023847,
"total_time": 81.317645
},
"output": "https://replicate.delivery/pbxt/bkf7f94q2qp2OE9cP7XbFy3Tee3x01i1SKveJ1syjonv5VYNC/embeddings.npy",
"started_at": "2023-10-05T08:54:36.802046Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/wnn37y3boxihxnv2kyrk4atkiu",
"cancel": "https://api.replicate.com/v1/predictions/wnn37y3boxihxnv2kyrk4atkiu/cancel"
},
"version": "9cf9f015a9cb9c61d1a2610659cdac4a4ca222f2d3707a68517b18c198a9add1"
}
Torch cuda available True
torch cuda.get_device_name(0) NVIDIA A40
ort.get_available_providers() ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
Parameter 'function'=<function Predictor.predict.<locals>.process at 0x7fc2940b2820> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
Map: 0%| | 0/3 [00:00<?, ? examples/s]
Batches: 0%| | 0/1 [00:00<?, ?it/s]
Batches: 100%|██████████| 1/1 [00:00<00:00, 86.99it/s]
Map: 100%|██████████| 3/3 [00:00<00:00, 201.72 examples/s]
Saved embeddings to /tmp/embeddings.npy. To load, run `np.load('/tmp/embeddings.npy')`