defaultGive me a short introduction to large language model.
typetext
{
"max_new_tokens": 512,
"prompt": "Give me a short introduction to large language model.",
"repetition_penalty": 1,
"system_prompt": "You are a helpful assistant.",
"temperature": 1,
"top_k": 1,
"top_p": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_KSz**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/qwen1.5-4b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/qwen1.5-4b:5f048d18c298b8ff9a8eac1e2de9f7f948bf4ede3cd9071411098a9c24f46b73",
{
input: {
max_new_tokens: 512,
prompt: "Give me a short introduction to large language model.",
repetition_penalty: 1,
system_prompt: "You are a helpful assistant.",
temperature: 1,
top_k: 1,
top_p: 1
}
}
);
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_KSz**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/qwen1.5-4b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/qwen1.5-4b:5f048d18c298b8ff9a8eac1e2de9f7f948bf4ede3cd9071411098a9c24f46b73",
input={
"max_new_tokens": 512,
"prompt": "Give me a short introduction to large language model.",
"repetition_penalty": 1,
"system_prompt": "You are a helpful assistant.",
"temperature": 1,
"top_k": 1,
"top_p": 1
}
)
# The lucataco/qwen1.5-4b 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/qwen1.5-4b/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_KSz**********************************
This is your API token. Keep it to yourself.
Run lucataco/qwen1.5-4b 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": "lucataco/qwen1.5-4b:5f048d18c298b8ff9a8eac1e2de9f7f948bf4ede3cd9071411098a9c24f46b73",
"input": {
"max_new_tokens": 512,
"prompt": "Give me a short introduction to large language model.",
"repetition_penalty": 1,
"system_prompt": "You are a helpful assistant.",
"temperature": 1,
"top_k": 1,
"top_p": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
A large language model is a type of artificial intelligence system that is trained on a large corpus of text data to learn the patterns and relationships between words and phrases. These models are designed to be able to generate human-like responses to a wide range of prompts and questions, and are often used in applications such as chatbots, language translation, and content generation. Large language models are typically trained using deep learning techniques, which involve feeding the model large amounts of text data and adjusting its parameters to optimize its performance on a specific task. Some of the most well-known large language models include GPT-3, BERT, and RoBERTa.
{
"id": "vxxbwcbbnhyihrvwvu6zf3jcbi",
"model": "lucataco/qwen1.5-4b",
"version": "5f048d18c298b8ff9a8eac1e2de9f7f948bf4ede3cd9071411098a9c24f46b73",
"input": {
"max_new_tokens": 512,
"prompt": "Give me a short introduction to large language model.",
"repetition_penalty": 1,
"system_prompt": "You are a helpful assistant.",
"temperature": 1,
"top_k": 1,
"top_p": 1
},
"logs": "Using seed: 1072508970\nThe attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\nSetting `pad_token_id` to `eos_token_id`:151645 for open-end generation.",
"output": [
"",
"A ",
"large ",
"language ",
"model ",
"is ",
"a ",
"type ",
"of ",
"artificial ",
"intelligence ",
"system ",
"that ",
"is ",
"trained ",
"on ",
"a ",
"large ",
"corpus ",
"of ",
"text ",
"data ",
"to ",
"learn ",
"the ",
"patterns ",
"and ",
"relationships ",
"between ",
"words ",
"and ",
"",
"phrases. ",
"These ",
"models ",
"are ",
"designed ",
"to ",
"be ",
"able ",
"to ",
"generate ",
"",
"human-like ",
"responses ",
"to ",
"a ",
"wide ",
"range ",
"of ",
"prompts ",
"and ",
"",
"questions, ",
"and ",
"are ",
"often ",
"used ",
"in ",
"applications ",
"such ",
"as ",
"",
"",
"chatbots, ",
"language ",
"",
"translation, ",
"and ",
"content ",
"",
"generation. ",
"Large ",
"language ",
"models ",
"are ",
"typically ",
"trained ",
"using ",
"deep ",
"learning ",
"",
"techniques, ",
"which ",
"involve ",
"feeding ",
"the ",
"model ",
"large ",
"amounts ",
"of ",
"text ",
"data ",
"and ",
"adjusting ",
"its ",
"parameters ",
"to ",
"optimize ",
"its ",
"performance ",
"on ",
"a ",
"specific ",
"",
"task. ",
"Some ",
"of ",
"the ",
"most ",
"",
"well-known ",
"large ",
"language ",
"models ",
"include ",
"",
"",
"",
"",
"GPT-3, ",
"",
"",
"BERT, ",
"and ",
"",
"",
"",
"",
"RoBERTa."
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-13T15:18:32.942227Z",
"started_at": "2024-02-13T15:21:59.375375Z",
"completed_at": "2024-02-13T15:22:55.730684Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/vxxbwcbbnhyihrvwvu6zf3jcbi/cancel",
"get": "https://api.replicate.com/v1/predictions/vxxbwcbbnhyihrvwvu6zf3jcbi",
"stream": "https://streaming-api.svc.us-central1.g.replicate.net/v1/streams/t6pu5hctq5m5f3azw35tczfpbm6qmmgiqszocgknvt36faab4c4a"
},
"metrics": {
"predict_time": 56.355309,
"total_time": 262.788457
}
}