typetext
{
"max_new_tokens": 4096,
"prompt": "请问目前最先进的机器学习算法有哪些?",
"temperature": 1,
"top_k": 50,
"top_p": 1
}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 ieit-yuan/yuan2.0-2b-mars using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ieit-yuan/yuan2.0-2b-mars:fc193b6a37ab65602586d0f6979971ecee3c79cc0d8ebf95ed5a93d1f68a440a",
{
input: {
max_new_tokens: 4096,
prompt: "请问目前最先进的机器学习算法有哪些?",
temperature: 1,
top_k: 50,
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_Rk5**********************************
This is your API token. Keep it to yourself.
import replicate
Run ieit-yuan/yuan2.0-2b-mars using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ieit-yuan/yuan2.0-2b-mars:fc193b6a37ab65602586d0f6979971ecee3c79cc0d8ebf95ed5a93d1f68a440a",
input={
"max_new_tokens": 4096,
"prompt": "请问目前最先进的机器学习算法有哪些?",
"temperature": 1,
"top_k": 50,
"top_p": 1
}
)
print(output)
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 ieit-yuan/yuan2.0-2b-mars 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": "ieit-yuan/yuan2.0-2b-mars:fc193b6a37ab65602586d0f6979971ecee3c79cc0d8ebf95ed5a93d1f68a440a",
"input": {
"max_new_tokens": 4096,
"prompt": "请问目前最先进的机器学习算法有哪些?",
"temperature": 1,
"top_k": 50,
"top_p": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
目前最先进的机器学习算法包括:卷积神经网络(Convolutional Neural Network,CNN)、循环神经网络(Recurrent Neural Network,RNN)、长短时记忆网络(Long Short-Term Memory,LSTM)、生成对抗网络(Generative Adversarial Networks,GAN)和强化学习(Reinforcement Learning,RL)等。这些算法在不同的任务和应用场景中都取得了优异的表现,被广泛应用于计算机视觉、自然语言处理、语音识别、推荐系统等领域。
{
"id": "hvy9m7hk0drge0cf18pbm4gqcw",
"model": "ieit-yuan/yuan2.0-2b-mars",
"version": "fc193b6a37ab65602586d0f6979971ecee3c79cc0d8ebf95ed5a93d1f68a440a",
"input": {
"max_new_tokens": 4096,
"prompt": "请问目前最先进的机器学习算法有哪些?",
"temperature": 1,
"top_k": 50,
"top_p": 1
},
"logs": "",
"output": "目前最先进的机器学习算法包括:卷积神经网络(Convolutional Neural Network,CNN)、循环神经网络(Recurrent Neural Network,RNN)、长短时记忆网络(Long Short-Term Memory,LSTM)、生成对抗网络(Generative Adversarial Networks,GAN)和强化学习(Reinforcement Learning,RL)等。这些算法在不同的任务和应用场景中都取得了优异的表现,被广泛应用于计算机视觉、自然语言处理、语音识别、推荐系统等领域。",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-04-23T08:56:59.907Z",
"started_at": "2024-04-23T08:56:59.927694Z",
"completed_at": "2024-04-23T08:57:06.345442Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/hvy9m7hk0drge0cf18pbm4gqcw/cancel",
"get": "https://api.replicate.com/v1/predictions/hvy9m7hk0drge0cf18pbm4gqcw",
"web": "https://replicate.com/p/hvy9m7hk0drge0cf18pbm4gqcw"
},
"metrics": {
"predict_time": 6.417748,
"total_time": 6.438442
}
}