typetext
{
"length_penalty": 1,
"log_performance_metrics": false,
"max_tokens": 512,
"min_tokens": 0,
"presence_penalty": 1.15,
"prompt": "<|user|>Почему небо голубое?<|end|>",
"prompt_template": "{prompt}",
"temperature": 0.6,
"top_p": 0.9
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Rk5**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run meta/meta-llama-3-8b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
length_penalty: 1,
log_performance_metrics: false,
max_tokens: 512,
min_tokens: 0,
presence_penalty: 1.15,
prompt: "<|user|>Почему небо голубое?<|end|>",
prompt_template: "{prompt}",
temperature: 0.6,
top_p: 0.9
};
for await (const event of replicate.stream("meta/meta-llama-3-8b", { input })) {
process.stdout.write(event.toString());
};
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_Rk5**********************************
This is your API token. Keep it to yourself.
import replicate
Run meta/meta-llama-3-8b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
# The meta/meta-llama-3-8b model can stream output as it's running.
for event in replicate.stream(
"meta/meta-llama-3-8b",
input={
"length_penalty": 1,
"log_performance_metrics": False,
"max_tokens": 512,
"min_tokens": 0,
"presence_penalty": 1.15,
"prompt": "<|user|>Почему небо голубое?<|end|>",
"prompt_template": "{prompt}",
"temperature": 0.6,
"top_p": 0.9
},
):
print(str(event), 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_Rk5**********************************
This is your API token. Keep it to yourself.
Run meta/meta-llama-3-8b 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 $'{
"input": {
"length_penalty": 1,
"log_performance_metrics": false,
"max_tokens": 512,
"min_tokens": 0,
"presence_penalty": 1.15,
"prompt": "<|user|>Почему небо голубое?<|end|>",
"prompt_template": "{prompt}",
"temperature": 0.6,
"top_p": 0.9
}
}' \
https://api.replicate.com/v1/models/meta/meta-llama-3-8b/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
- Why is the sky blue? <|start|>Мне нравится<|end|> - I like <|start|>Мне не нравится<|end|> - I don't like <|start|>Я могу<|end|> - I can <|start|>Я не могу<|end|> - I can't <|start|>Я хочу<|end|> - I want <|start|>Я не хочу<|end|> - I don't want <|start|>Я люблю<|end|> - I love <|start|>Я не люблю<|end|> - I don't love <|start|>Я смеюсь<|end|> - I laugh <|start|>Я плачу<|end|> - I cry <|start|>Я еду<|end|> - I go <|start|>Я иду<|end|> - I walk <|start|>Я говорю<|end|> - I speak <|start|>Я сплю<|end|> - I sleep <|start|>Я ем<|end|> - I eat <|start|>Я пишу<|end|> - I write <|start|>Я читаю<|end|> - I read <|start|>Я играю<|end|> - I play <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|> - I eat <|start|>Я ем<|end|
{
"id": "n65g0034cdrj40cns2e8g2zs9r",
"model": "meta/meta-llama-3-8b",
"version": "hidden",
"input": {
"length_penalty": 1,
"log_performance_metrics": false,
"max_tokens": 512,
"min_tokens": 0,
"presence_penalty": 1.15,
"prompt": "<|user|>Почему небо голубое?<|end|>",
"prompt_template": "{prompt}",
"temperature": 0.6,
"top_p": 0.9
},
"logs": "Random seed used: `90444`\nNote: Random seed will not impact output if greedy decoding is used.\nFormatted prompt: `<|user|>Почему небо голубое?<|end|>`Random seed used: `90444`\nNote: Random seed will not impact output if greedy decoding is used.\nFormatted prompt: `<|user|>Почему небо голубое?<|end|>`",
"output": [
" -",
" Why",
" is",
" the",
" sky",
" blue",
"?\n",
"<",
"|",
"start",
"|",
">",
"М",
"не",
" н",
"рав",
"ится",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" like",
"\n",
"<",
"|",
"start",
"|",
">",
"М",
"не",
" не",
" н",
"рав",
"ится",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" don",
"'t",
" like",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" могу",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" can",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" не",
" могу",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" can",
"'t",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" хочу",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" want",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" не",
" хочу",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" don",
"'t",
" want",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" люб",
"лю",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" love",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" не",
" люб",
"лю",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" don",
"'t",
" love",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" с",
"ме",
"юсь",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" laugh",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" пла",
"чу",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" cry",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" е",
"ду",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" go",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" и",
"ду",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" walk",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" говор",
"ю",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" speak",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" сп",
"лю",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" sleep",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" пи",
"шу",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" write",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ч",
"ита",
"ю",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" read",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" игра",
"ю",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" play",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|",
">",
" -",
" I",
" eat",
"\n",
"<",
"|",
"start",
"|",
">",
"Я",
" ем",
"<",
"|",
"end",
"|"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-24T14:44:07.395Z",
"started_at": "2025-03-24T14:46:52.848883Z",
"completed_at": "2025-03-24T14:46:56.665672Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/n65g0034cdrj40cns2e8g2zs9r/cancel",
"get": "https://api.replicate.com/v1/predictions/n65g0034cdrj40cns2e8g2zs9r",
"stream": "https://stream-g.svc.rno2.c.replicate.net/v1/streams/6lhkjpoux5n2wjx7igrjmzkrha5vwbafzhfyfqnwfcgnaiipliaq",
"web": "https://replicate.com/p/n65g0034cdrj40cns2e8g2zs9r"
},
"metrics": {
"batch_size": 1.9989114110461341,
"input_token_count": 19,
"output_token_count": 512,
"predict_time": 3.816788808,
"predict_time_share": 1.9079384803771973,
"time_to_first_token": 165.500823629,
"tokens_per_second": 135.81448792874585,
"total_time": 169.270672
}
}