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.
lucataco /phixtral-2x2_8:25d7b93b
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 lucataco/phixtral-2x2_8 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/phixtral-2x2_8:25d7b93bb0ec9e8dd94fcc69adc786759243a5628ba5574bd9609d6abafe57cf",
{
input: {
top_k: 50,
top_p: 0.95,
prompt: "Can you solve the equation 2x + 3 = 11 for x?",
temperature: 0.7,
max_new_tokens: 1024
}
}
);
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 lucataco/phixtral-2x2_8 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/phixtral-2x2_8:25d7b93bb0ec9e8dd94fcc69adc786759243a5628ba5574bd9609d6abafe57cf",
input={
"top_k": 50,
"top_p": 0.95,
"prompt": "Can you solve the equation 2x + 3 = 11 for x?",
"temperature": 0.7,
"max_new_tokens": 1024
}
)
# The lucataco/phixtral-2x2_8 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/lucataco/phixtral-2x2_8/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=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/phixtral-2x2_8 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": "25d7b93bb0ec9e8dd94fcc69adc786759243a5628ba5574bd9609d6abafe57cf",
"input": {
"top_k": 50,
"top_p": 0.95,
"prompt": "Can you solve the equation 2x + 3 = 11 for x?",
"temperature": 0.7,
"max_new_tokens": 1024
}
}' \
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": "2024-02-08T22:05:37.633664Z",
"created_at": "2024-02-08T22:01:36.455771Z",
"data_removed": false,
"error": null,
"id": "sps5aujbbs6i22qhjtqp242wcu",
"input": {
"top_k": 50,
"top_p": 0.95,
"prompt": "Can you solve the equation 2x + 3 = 11 for x?",
"temperature": 0.7,
"max_new_tokens": 1024
},
"logs": "Using seed: 921063983",
"metrics": {
"predict_time": 36.15149,
"total_time": 241.177893
},
"output": [
"",
"",
"Sure! ",
"To ",
"solve ",
"the ",
"equation ",
"",
"2x ",
"+ ",
"3 ",
"= ",
"11 ",
"for ",
"",
"x, ",
"you ",
"need ",
"to ",
"isolate ",
"x ",
"on ",
"one ",
"side ",
"of ",
"the ",
"",
"equation. ",
"\n",
"\n",
"",
"Step ",
"",
"1: ",
"",
"",
"Subtract ",
"3 ",
"from ",
"both ",
"sides ",
"of ",
"the ",
"",
"equation.\n",
"",
"",
"2x ",
"+ ",
"3 ",
"- ",
"3 ",
"= ",
"11 ",
"- ",
"3\n",
"",
"",
"2x ",
"= ",
"8\n",
"\n",
"",
"Step ",
"",
"2: ",
"Divide ",
"both ",
"sides ",
"of ",
"the ",
"equation ",
"by ",
"",
"2.\n",
"",
"",
"2x ",
"/ ",
"2 ",
"= ",
"8 ",
"/ ",
"2\n",
"",
"x ",
"= ",
"4\n",
"\n",
"",
"So ",
"the ",
"solution ",
"to ",
"the ",
"equation ",
"",
"2x ",
"+ ",
"3 ",
"= ",
"11 ",
"is ",
"x ",
"= ",
"",
"",
"4."
],
"started_at": "2024-02-08T22:05:01.482174Z",
"status": "succeeded",
"urls": {
"stream": "https://streaming-api.svc.us-central1.g.replicate.net/v1/streams/fwe4jamwn3uiyrs5dhbcvatuaibytk5hsdcngbbc7wyf23prlp4a",
"get": "https://api.replicate.com/v1/predictions/sps5aujbbs6i22qhjtqp242wcu",
"cancel": "https://api.replicate.com/v1/predictions/sps5aujbbs6i22qhjtqp242wcu/cancel"
},
"version": "25d7b93bb0ec9e8dd94fcc69adc786759243a5628ba5574bd9609d6abafe57cf"
}
Using seed: 921063983