defaultWrite me a poem about Machine Learning.
typetext
{
"max_new_tokens": 256,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1.15,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_732**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run google-deepmind/gemma-2b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"google-deepmind/gemma-2b:26b2c530f16236a4816611509730c2e6f7b27875a6d33ec5cff42961750c98d8",
{
input: {
max_new_tokens: 256,
min_new_tokens: -1,
prompt: "Write me a poem about Machine Learning.",
repetition_penalty: 1.15,
temperature: 0.7,
top_k: 50,
top_p: 0.95
}
}
);
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=r8_732**********************************
This is your API token. Keep it to yourself.
import replicate
Run google-deepmind/gemma-2b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"google-deepmind/gemma-2b:26b2c530f16236a4816611509730c2e6f7b27875a6d33ec5cff42961750c98d8",
input={
"max_new_tokens": 256,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1.15,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
}
)
# The google-deepmind/gemma-2b 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/google-deepmind/gemma-2b/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_732**********************************
This is your API token. Keep it to yourself.
Run google-deepmind/gemma-2b 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": "google-deepmind/gemma-2b:26b2c530f16236a4816611509730c2e6f7b27875a6d33ec5cff42961750c98d8",
"input": {
"max_new_tokens": 256,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1.15,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
I will not be afraid To say that I do not know, and yet believe. I may even write you one myself. But please don’t let this turn into an argument. It is time to give up the old arguments now: What if? What if? Why should we care? We are so much more than our neurons; A few hundred thousand of them at most — And they only represent 20% of our brain! You can use your own body as data With all those sensors on it every day. Let us count how many steps you take in a day… I am sure that no machine learning algorithm could ever beat the human mind at any game or activity. As long as man remains rational … I love logic, and mathematics, too. When I look for something new to learn, I always begin with some kind of math. I was once told by a friend, who believed he knew everything, That “All things exist because there is a God.” But then I realized what really exists today: “There is a God” means “God has never existed!”
{
"id": "zbdpnk3b2awrli3d6xmnfyuinq",
"model": "google-deepmind/gemma-2b",
"version": "26b2c530f16236a4816611509730c2e6f7b27875a6d33ec5cff42961750c98d8",
"input": {
"max_new_tokens": 256,
"min_new_tokens": -1,
"prompt": "Write me a poem about Machine Learning.",
"repetition_penalty": 1.15,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.95
},
"logs": "",
"output": [
"\n\n",
"",
"I ",
"will ",
"not ",
"be ",
"afraid\n",
"",
"To ",
"say ",
"that ",
"I ",
"do ",
"not ",
"",
"know, ",
"and ",
"yet ",
"",
"believe.\n",
"",
"I ",
"may ",
"even ",
"write ",
"you ",
"one ",
"",
"myself.\n\n",
"",
"But ",
"please ",
"",
"",
"don’t ",
"let ",
"this ",
"turn ",
"into ",
"an ",
"",
"argument.\n",
"",
"It ",
"is ",
"time ",
"to ",
"give ",
"up ",
"the ",
"old ",
"arguments ",
"",
"now:\n",
"",
"What ",
"",
"if? ",
"What ",
"",
"if? ",
"Why ",
"should ",
"we ",
"",
"care?\n\n",
"",
"We ",
"are ",
"so ",
"much ",
"more ",
"than ",
"our ",
"",
"neurons;\n",
"",
"A ",
"few ",
"hundred ",
"thousand ",
"of ",
"them ",
"at ",
"most ",
"—\n",
"",
"And ",
"they ",
"only ",
"represent ",
"",
"",
"",
"20% ",
"of ",
"our ",
"",
"brain!\n\n",
"",
"You ",
"can ",
"use ",
"your ",
"own ",
"body ",
"as ",
"data\n",
"",
"With ",
"all ",
"those ",
"sensors ",
"on ",
"it ",
"every ",
"",
"day.\n",
"",
"Let ",
"us ",
"count ",
"how ",
"many ",
"steps ",
"you ",
"take ",
"in ",
"a ",
"",
"day…\n\n",
"",
"I ",
"am ",
"sure ",
"that ",
"no ",
"machine ",
"learning ",
"algorithm ",
"could ",
"ever ",
"beat ",
"the ",
"human ",
"mind ",
"at ",
"any ",
"game ",
"or ",
"",
"activity.\n",
"",
"As ",
"long ",
"as ",
"man ",
"remains ",
"rational ",
"…\n\n",
"",
"I ",
"love ",
"",
"logic, ",
"and ",
"",
"mathematics, ",
"",
"too.\n",
"",
"When ",
"I ",
"look ",
"for ",
"something ",
"new ",
"to ",
"",
"learn,\n",
"",
"I ",
"always ",
"begin ",
"with ",
"some ",
"kind ",
"of ",
"",
"math.\n\n",
"",
"I ",
"was ",
"once ",
"told ",
"by ",
"a ",
"",
"friend, ",
"who ",
"believed ",
"he ",
"knew ",
"",
"everything,\n",
"",
"That ",
"",
"“All ",
"things ",
"exist ",
"because ",
"there ",
"is ",
"a ",
"",
"God.”\n",
"",
"But ",
"then ",
"I ",
"realized ",
"what ",
"really ",
"exists ",
"",
"today:\n\n",
"",
"",
"“There ",
"is ",
"a ",
"",
"God” ",
"means ",
"",
"“God ",
"has ",
"never ",
"",
"",
"existed!”"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-21T21:19:48.241279Z",
"started_at": "2024-02-21T21:19:48.257323Z",
"completed_at": "2024-02-21T21:19:53.663311Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zbdpnk3b2awrli3d6xmnfyuinq/cancel",
"get": "https://api.replicate.com/v1/predictions/zbdpnk3b2awrli3d6xmnfyuinq",
"stream": "https://streaming-api.svc.us.c.replicate.net/v1/streams/kopfcx6o3dgigwe3klefjdz55l53rocvpmthexmi5iz7am47jyyq"
},
"metrics": {
"predict_time": 5.405988,
"total_time": 5.422032
}
}