Prediction
cbh123/samsum:2d1f4bf15916a2a93bc1068e72da42a71a05a9a6bfa3cd8f8d7077e22d83605fID
msodiedbf67kxi26j4gazeolpm
Status
Succeeded
Source
Web
Hardware
A100 (80GB)
Total duration
Created
Input
- debug
- top_k
- 50
- top_p
- 0.9
- prompt
- Input: Amanda: I baked cookies. Do you want some? Jerry: Sure! Amanda: I'll bring you tomorrow :-) [/INST] Summary:
- temperature
- 0.75
- max_new_tokens
- 128
- min_new_tokens
- -1
{
"debug": false,
"top_k": 50,
"top_p": 0.9,
"prompt": "Input:\nAmanda: I baked cookies. Do you want some?\nJerry: Sure!\nAmanda: I'll bring you tomorrow :-) [/INST]\n\nSummary: ",
"temperature": 0.75,
"max_new_tokens": 128,
"min_new_tokens": -1
}
Install Replicate’s Node.js client library:
npm install replicate
Set the
REPLICATE_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 cbh123/samsum using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cbh123/samsum:2d1f4bf15916a2a93bc1068e72da42a71a05a9a6bfa3cd8f8d7077e22d83605f",
{
input: {
debug: false,
top_k: 50,
top_p: 0.9,
prompt: "Input:\nAmanda: I baked cookies. Do you want some?\nJerry: Sure!\nAmanda: I'll bring you tomorrow :-) [/INST]\n\nSummary: ",
temperature: 0.75,
max_new_tokens: 128,
min_new_tokens: -1
}
}
);
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 the
REPLICATE_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 cbh123/samsum using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cbh123/samsum:2d1f4bf15916a2a93bc1068e72da42a71a05a9a6bfa3cd8f8d7077e22d83605f",
input={
"debug": False,
"top_k": 50,
"top_p": 0.9,
"prompt": "Input:\nAmanda: I baked cookies. Do you want some?\nJerry: Sure!\nAmanda: I'll bring you tomorrow :-) [/INST]\n\nSummary: ",
"temperature": 0.75,
"max_new_tokens": 128,
"min_new_tokens": -1
}
)
# The cbh123/samsum model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/cbh123/samsum/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run cbh123/samsum 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": "cbh123/samsum:2d1f4bf15916a2a93bc1068e72da42a71a05a9a6bfa3cd8f8d7077e22d83605f",
"input": {
"debug": false,
"top_k": 50,
"top_p": 0.9,
"prompt": "Input:\\nAmanda: I baked cookies. Do you want some?\\nJerry: Sure!\\nAmanda: I\'ll bring you tomorrow :-) [/INST]\\n\\nSummary: ",
"temperature": 0.75,
"max_new_tokens": 128,
"min_new_tokens": -1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Amanda will bring Jerry some cookies tomorrow..</s>
{
"completed_at": "2023-09-01T00:25:07.946413Z",
"created_at": "2023-09-01T00:23:59.038290Z",
"data_removed": false,
"error": null,
"id": "msodiedbf67kxi26j4gazeolpm",
"input": {
"debug": false,
"top_k": 50,
"top_p": 0.9,
"prompt": "Input:\nAmanda: I baked cookies. Do you want some?\nJerry: Sure!\nAmanda: I'll bring you tomorrow :-) [/INST]\n\nSummary: ",
"temperature": 0.75,
"max_new_tokens": 128,
"min_new_tokens": -1
},
"logs": "Your formatted prompt is:\nInput:\nAmanda: I baked cookies. Do you want some?\nJerry: Sure!\nAmanda: I'll bring you tomorrow :-) [/INST]\nSummary:",
"metrics": {
"predict_time": 1.064938,
"total_time": 68.908123
},
"output": [
" Am",
"anda",
" will",
" bring",
" Jerry",
" some",
" cookies",
" tom",
"orrow",
".",
".</s>"
],
"started_at": "2023-09-01T00:25:06.881475Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/msodiedbf67kxi26j4gazeolpm",
"cancel": "https://api.replicate.com/v1/predictions/msodiedbf67kxi26j4gazeolpm/cancel"
},
"version": "2d1f4bf15916a2a93bc1068e72da42a71a05a9a6bfa3cd8f8d7077e22d83605f"
}