typetext
{
"prompt": "[INST]\nYou are an expert in all things HackerNews. Your goal is to help me write the most click worthy HackerNews title that will get the most upvotes. You will be given a USER_PROMPT, and a series of SUCCESSFUL_TITLES. You will respond with 5 suggestions for better hackernews titles.\n\nAll of your suggestions should be structured in the same format and tone as the previously successful SUCCESSFUL_TITLES. Make sure you do not include specific versions from the SUCCESSFUL_TITLES in your suggestions.\n\nUSER_PROMPT: teaching Elixir to my toddler\n\nSUCCESSFUL_TITLES: Elixir for Humans Who Know Python\nScripting with Elixir\nTeaching ChatGPT to speak my son’s invented language\nPhysical Knobs and Elixir\nUnpacking Elixir: Syntax\nThe Comprehensive Guide to Elixir's List Comprehension (2022)\nFrom Python to Elixir Machine Learning\nHow to sell Elixir again\nElixir is still safe\nUnpacking Elixir: Real-Time and Latency\nElixir for Ruby developers: the three most important differences\nShow HN: Learn Python with Minecraft\nSingle File Elixir Scripts\nUnpacking Elixir: Resilience\nUnpacking Elixir: Concurrency\nElixir – Why the dot when calling anonymous functions?\nElixir and Rust is a good mix\nOwl: A toolkit for writing command-line user interfaces in Elixir\nA Breakdown of HTTP Clients in Elixir\nVisual programming with Elixir: Learning to write binary parsers (2019)\n\nSUGGESTIONS:\n\n[/INST]\n",
"temperature": 0.75
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_4VM**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mistralai/mistral-7b-instruct-v0.1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mistralai/mistral-7b-instruct-v0.1:83b6a56e7c828e667f21fd596c338fd4f0039b46bcfa18d973e8e70e455fda70",
{
input: {
prompt: "[INST]\nYou are an expert in all things HackerNews. Your goal is to help me write the most click worthy HackerNews title that will get the most upvotes. You will be given a USER_PROMPT, and a series of SUCCESSFUL_TITLES. You will respond with 5 suggestions for better hackernews titles.\n\nAll of your suggestions should be structured in the same format and tone as the previously successful SUCCESSFUL_TITLES. Make sure you do not include specific versions from the SUCCESSFUL_TITLES in your suggestions.\n\nUSER_PROMPT: teaching Elixir to my toddler\n\nSUCCESSFUL_TITLES: Elixir for Humans Who Know Python\nScripting with Elixir\nTeaching ChatGPT to speak my son’s invented language\nPhysical Knobs and Elixir\nUnpacking Elixir: Syntax\nThe Comprehensive Guide to Elixir's List Comprehension (2022)\nFrom Python to Elixir Machine Learning\nHow to sell Elixir again\nElixir is still safe\nUnpacking Elixir: Real-Time and Latency\nElixir for Ruby developers: the three most important differences\nShow HN: Learn Python with Minecraft\nSingle File Elixir Scripts\nUnpacking Elixir: Resilience\nUnpacking Elixir: Concurrency\nElixir – Why the dot when calling anonymous functions?\nElixir and Rust is a good mix\nOwl: A toolkit for writing command-line user interfaces in Elixir\nA Breakdown of HTTP Clients in Elixir\nVisual programming with Elixir: Learning to write binary parsers (2019)\n\nSUGGESTIONS:\n\n[/INST]\n",
temperature: 0.75
}
}
);
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_4VM**********************************
This is your API token. Keep it to yourself.
import replicate
Run mistralai/mistral-7b-instruct-v0.1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mistralai/mistral-7b-instruct-v0.1:83b6a56e7c828e667f21fd596c338fd4f0039b46bcfa18d973e8e70e455fda70",
input={
"prompt": "[INST]\nYou are an expert in all things HackerNews. Your goal is to help me write the most click worthy HackerNews title that will get the most upvotes. You will be given a USER_PROMPT, and a series of SUCCESSFUL_TITLES. You will respond with 5 suggestions for better hackernews titles.\n\nAll of your suggestions should be structured in the same format and tone as the previously successful SUCCESSFUL_TITLES. Make sure you do not include specific versions from the SUCCESSFUL_TITLES in your suggestions.\n\nUSER_PROMPT: teaching Elixir to my toddler\n\nSUCCESSFUL_TITLES: Elixir for Humans Who Know Python\nScripting with Elixir\nTeaching ChatGPT to speak my son’s invented language\nPhysical Knobs and Elixir\nUnpacking Elixir: Syntax\nThe Comprehensive Guide to Elixir's List Comprehension (2022)\nFrom Python to Elixir Machine Learning\nHow to sell Elixir again\nElixir is still safe\nUnpacking Elixir: Real-Time and Latency\nElixir for Ruby developers: the three most important differences\nShow HN: Learn Python with Minecraft\nSingle File Elixir Scripts\nUnpacking Elixir: Resilience\nUnpacking Elixir: Concurrency\nElixir – Why the dot when calling anonymous functions?\nElixir and Rust is a good mix\nOwl: A toolkit for writing command-line user interfaces in Elixir\nA Breakdown of HTTP Clients in Elixir\nVisual programming with Elixir: Learning to write binary parsers (2019)\n\nSUGGESTIONS:\n\n[/INST]\n",
"temperature": 0.75
}
)
# The mistralai/mistral-7b-instruct-v0.1 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/mistralai/mistral-7b-instruct-v0.1/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_4VM**********************************
This is your API token. Keep it to yourself.
Run mistralai/mistral-7b-instruct-v0.1 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": "mistralai/mistral-7b-instruct-v0.1:83b6a56e7c828e667f21fd596c338fd4f0039b46bcfa18d973e8e70e455fda70",
"input": {
"prompt": "[INST]\\nYou are an expert in all things HackerNews. Your goal is to help me write the most click worthy HackerNews title that will get the most upvotes. You will be given a USER_PROMPT, and a series of SUCCESSFUL_TITLES. You will respond with 5 suggestions for better hackernews titles.\\n\\nAll of your suggestions should be structured in the same format and tone as the previously successful SUCCESSFUL_TITLES. Make sure you do not include specific versions from the SUCCESSFUL_TITLES in your suggestions.\\n\\nUSER_PROMPT: teaching Elixir to my toddler\\n\\nSUCCESSFUL_TITLES: Elixir for Humans Who Know Python\\nScripting with Elixir\\nTeaching ChatGPT to speak my son’s invented language\\nPhysical Knobs and Elixir\\nUnpacking Elixir: Syntax\\nThe Comprehensive Guide to Elixir\'s List Comprehension (2022)\\nFrom Python to Elixir Machine Learning\\nHow to sell Elixir again\\nElixir is still safe\\nUnpacking Elixir: Real-Time and Latency\\nElixir for Ruby developers: the three most important differences\\nShow HN: Learn Python with Minecraft\\nSingle File Elixir Scripts\\nUnpacking Elixir: Resilience\\nUnpacking Elixir: Concurrency\\nElixir – Why the dot when calling anonymous functions?\\nElixir and Rust is a good mix\\nOwl: A toolkit for writing command-line user interfaces in Elixir\\nA Breakdown of HTTP Clients in Elixir\\nVisual programming with Elixir: Learning to write binary parsers (2019)\\n\\nSUGGESTIONS:\\n\\n[/INST]\\n",
"temperature": 0.75
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
1. "Teaching Elixir to my toddler: A beginner's guide to programming in Elixir" 2. "Elixir for the young and curious: A step-by-step guide for teaching kids to code" 3. "The magic of Elixir: A beginner's journey to programming in the future" 4. "Bridging the gap: How to introduce Elixir to children and non-technical parents" 5. "A child's perspective: Learning Elixir through play and exploration"
{
"id": "aosuuqlb43zvxbsptfylyewknq",
"model": "mistralai/mistral-7b-instruct-v0.1",
"version": "83b6a56e7c828e667f21fd596c338fd4f0039b46bcfa18d973e8e70e455fda70",
"input": {
"prompt": "[INST]\nYou are an expert in all things HackerNews. Your goal is to help me write the most click worthy HackerNews title that will get the most upvotes. You will be given a USER_PROMPT, and a series of SUCCESSFUL_TITLES. You will respond with 5 suggestions for better hackernews titles.\n\nAll of your suggestions should be structured in the same format and tone as the previously successful SUCCESSFUL_TITLES. Make sure you do not include specific versions from the SUCCESSFUL_TITLES in your suggestions.\n\nUSER_PROMPT: teaching Elixir to my toddler\n\nSUCCESSFUL_TITLES: Elixir for Humans Who Know Python\nScripting with Elixir\nTeaching ChatGPT to speak my son’s invented language\nPhysical Knobs and Elixir\nUnpacking Elixir: Syntax\nThe Comprehensive Guide to Elixir's List Comprehension (2022)\nFrom Python to Elixir Machine Learning\nHow to sell Elixir again\nElixir is still safe\nUnpacking Elixir: Real-Time and Latency\nElixir for Ruby developers: the three most important differences\nShow HN: Learn Python with Minecraft\nSingle File Elixir Scripts\nUnpacking Elixir: Resilience\nUnpacking Elixir: Concurrency\nElixir – Why the dot when calling anonymous functions?\nElixir and Rust is a good mix\nOwl: A toolkit for writing command-line user interfaces in Elixir\nA Breakdown of HTTP Clients in Elixir\nVisual programming with Elixir: Learning to write binary parsers (2019)\n\nSUGGESTIONS:\n\n[/INST]\n",
"temperature": 0.75
},
"logs": "Your formatted prompt is:\n[INST] [INST]\nYou are an expert in all things HackerNews. Your goal is to help me write the most click worthy HackerNews title that will get the most upvotes. You will be given a USER_PROMPT, and a series of SUCCESSFUL_TITLES. You will respond with 5 suggestions for better hackernews titles.\nAll of your suggestions should be structured in the same format and tone as the previously successful SUCCESSFUL_TITLES. Make sure you do not include specific versions from the SUCCESSFUL_TITLES in your suggestions.\nUSER_PROMPT: teaching Elixir to my toddler\nSUCCESSFUL_TITLES: Elixir for Humans Who Know Python\nScripting with Elixir\nTeaching ChatGPT to speak my son’s invented language\nPhysical Knobs and Elixir\nUnpacking Elixir: Syntax\nThe Comprehensive Guide to Elixir's List Comprehension (2022)\nFrom Python to Elixir Machine Learning\nHow to sell Elixir again\nElixir is still safe\nUnpacking Elixir: Real-Time and Latency\nElixir for Ruby developers: the three most important differences\nShow HN: Learn Python with Minecraft\nSingle File Elixir Scripts\nUnpacking Elixir: Resilience\nUnpacking Elixir: Concurrency\nElixir – Why the dot when calling anonymous functions?\nElixir and Rust is a good mix\nOwl: A toolkit for writing command-line user interfaces in Elixir\nA Breakdown of HTTP Clients in Elixir\nVisual programming with Elixir: Learning to write binary parsers (2019)\nSUGGESTIONS: [/INST]\nDisabling loras\nNo loras were ever loaded, nothing to disable.\nNot using LoRA\nTokens: tensor([[ 1, 733, 16289, 28793, 733, 16289, 28793, 13, 1976, 460,\n396, 7583, 297, 544, 1722, 382, 21172, 25614, 28723, 3604,\n5541, 349, 298, 1316, 528, 3324, 272, 1080, 6046, 21220,\n382, 21172, 25614, 3941, 369, 622, 625, 272, 1080, 582,\n28728, 4769, 28723, 995, 622, 347, 2078, 264, 2223, 725,\n28730, 4202, 2059, 28738, 28725, 304, 264, 3518, 302, 13319,\n9476, 28765, 1248, 28730, 28738, 1153, 20335, 28723, 995, 622,\n9421, 395, 28705, 28782, 17278, 354, 1873, 14413, 263, 14290,\n15773, 28723, 13, 13, 2595, 302, 574, 17278, 1023, 347,\n28429, 297, 272, 1348, 5032, 304, 10294, 390, 272, 8361,\n6053, 13319, 9476, 28765, 1248, 28730, 28738, 1153, 20335, 28723,\n6746, 1864, 368, 511, 459, 3024, 2948, 11031, 477, 272,\n13319, 9476, 28765, 1248, 28730, 28738, 1153, 20335, 297, 574,\n17278, 28723, 13, 13, 11123, 28730, 4202, 2059, 28738, 28747,\n9432, 1744, 833, 361, 298, 586, 298, 1036, 1523, 13,\n13, 10497, 28765, 1248, 28730, 28738, 1153, 20335, 28747, 1744,\n833, 361, 354, 17442, 509, 6526, 11308, 21366, 13, 6786,\n288, 395, 1744, 833, 361, 13, 28738, 8365, 288, 23781,\n28777, 6316, 298, 4085, 586, 1966, 28809, 28713, 25972, 3842,\n13, 18191, 745, 9789, 8081, 304, 1744, 833, 361, 13,\n1733, 2860, 288, 1744, 833, 361, 28747, 7281, 9656, 13,\n1014, 1124, 1779, 7533, 495, 14555, 298, 1744, 833, 361,\n28742, 28713, 3231, 1124, 1779, 7533, 296, 325, 28750, 28734,\n28750, 28750, 28731, 13, 3400, 21366, 298, 1744, 833, 361,\n13253, 17504, 13, 5660, 298, 6112, 1744, 833, 361, 1076,\n13, 5773, 833, 361, 349, 1309, 5023, 13, 1733, 2860,\n288, 1744, 833, 361, 28747, 7960, 28733, 2098, 304, 7402,\n2090, 13, 5773, 833, 361, 354, 27127, 17892, 28747, 272,\n1712, 1080, 2278, 11090, 13, 8398, 382, 28759, 28747, 16694,\n21366, 395, 21134, 6006, 13, 12357, 6184, 1744, 833, 361,\n15548, 28713, 13, 1733, 2860, 288, 1744, 833, 361, 28747,\n1992, 309, 1640, 13, 1733, 2860, 288, 1744, 833, 361,\n28747, 1325, 16714, 13, 5773, 833, 361, 764, 4315, 272,\n12253, 739, 6852, 23267, 5572, 28804, 13, 5773, 833, 361,\n304, 399, 469, 349, 264, 1179, 6750, 13, 28762, 13982,\n28747, 330, 3921, 11153, 354, 3653, 3445, 28733, 1081, 2188,\n791, 9288, 297, 1744, 833, 361, 13, 28741, 15102, 3254,\n302, 13844, 1366, 2785, 297, 1744, 833, 361, 13, 21551,\n16292, 395, 1744, 833, 361, 28747, 17504, 298, 3324, 10136,\n940, 28713, 404, 325, 28750, 28734, 28740, 28774, 28731, 13,\n13, 4711, 28777, 4896, 920, 1702, 28735, 28747, 733, 28748,\n16289, 28793]], device='cuda:0')\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`:2 for open-end generation.\nhostname: model-83b6a56e-94fe09a4acfa2b19-gpu-a40-555b6fdf4f-tvbd4",
"output": [
"",
"",
"",
"1. ",
"",
"",
"",
"\"Teaching ",
"",
"",
"Elixir ",
"to ",
"my ",
"",
"",
"",
"toddler: ",
"A ",
"",
"",
"",
"beginner's ",
"guide ",
"to ",
"programming ",
"in ",
"",
"",
"",
"Elixir\"\n",
"",
"",
"2. ",
"",
"",
"",
"\"Elixir ",
"for ",
"the ",
"young ",
"and ",
"",
"curious: ",
"A ",
"",
"",
"",
"",
"step-by-step ",
"guide ",
"for ",
"teaching ",
"kids ",
"to ",
"",
"code\"\n",
"",
"",
"3. ",
"",
"\"The ",
"magic ",
"of ",
"",
"",
"",
"Elixir: ",
"A ",
"",
"",
"",
"beginner's ",
"journey ",
"to ",
"programming ",
"in ",
"the ",
"",
"future\"\n",
"",
"",
"4. ",
"",
"",
"",
"\"Bridging ",
"the ",
"",
"gap: ",
"How ",
"to ",
"introduce ",
"",
"",
"Elixir ",
"to ",
"children ",
"and ",
"",
"",
"",
"non-technical ",
"",
"parents\"\n",
"",
"",
"5. ",
"",
"\"A ",
"",
"",
"child's ",
"",
"perspective: ",
"Learning ",
"",
"",
"Elixir ",
"through ",
"play ",
"and ",
"",
"",
"exploration\""
],
"data_removed": false,
"error": null,
"source": "api",
"status": "succeeded",
"created_at": "2023-10-12T19:37:46.124031Z",
"started_at": "2023-10-12T19:37:46.098657Z",
"completed_at": "2023-10-12T19:37:54.932803Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/aosuuqlb43zvxbsptfylyewknq/cancel",
"get": "https://api.replicate.com/v1/predictions/aosuuqlb43zvxbsptfylyewknq"
},
"metrics": {
"predict_time": 8.834146,
"total_time": 8.808772
}
}