peter65374 / openbuddy-llemma-34b-gguf
This is a cog implementation of "openbuddy-llemma-34b" 4-bit quantization model.
Prediction
peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200ID6wbstc3bdcz4r43qp2d7p57lvuStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- debug
- top_k
- 40
- top_p
- 0.95
- prompt
- 如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?
- do_sample
- num_beams
- 1
- temperature
- 0.7
- padding_mode
- max_new_tokens
- 1024
- prompt_template
- You are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages. User: Hi Assistant: Hello, how can I help you?</s> User: {prompt} Assistant:
- presence_penalty
- 0
- frequency_penalty
- 0
- repetition_penalty
- 1.1
{ "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 1024, "prompt_template": "You are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages.\nUser: Hi\nAssistant: Hello, how can I help you?</s>\nUser: {prompt}\nAssistant:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run peter65374/openbuddy-llemma-34b-gguf using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200", { input: { debug: true, top_k: 40, top_p: 0.95, prompt: "如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?", do_sample: true, num_beams: 1, temperature: 0.7, padding_mode: true, max_new_tokens: 1024, prompt_template: "You are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages.\nUser: Hi\nAssistant: Hello, how can I help you?</s>\nUser: {prompt}\nAssistant:", presence_penalty: 0, frequency_penalty: 0, repetition_penalty: 1.1 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run peter65374/openbuddy-llemma-34b-gguf using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200", input={ "debug": True, "top_k": 40, "top_p": 0.95, "prompt": "如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?", "do_sample": True, "num_beams": 1, "temperature": 0.7, "padding_mode": True, "max_new_tokens": 1024, "prompt_template": "You are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages.\nUser: Hi\nAssistant: Hello, how can I help you?</s>\nUser: {prompt}\nAssistant:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 } ) # The peter65374/openbuddy-llemma-34b-gguf 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/peter65374/openbuddy-llemma-34b-gguf/api#output-schema print(item, end="")
To learn more, take a look at the guide on getting started with Python.
Run peter65374/openbuddy-llemma-34b-gguf 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": "peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200", "input": { "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 1024, "prompt_template": "You are a helpful high school Math tutor. If you don\'t know the answer to a question, please don\'t share false information. You can speak fluently in many languages.\\nUser: Hi\\nAssistant: Hello, how can I help you?</s>\\nUser: {prompt}\\nAssistant:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/peter65374/openbuddy-llemma-34b-gguf@sha256:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200 \ -i 'debug=true' \ -i 'top_k=40' \ -i 'top_p=0.95' \ -i 'prompt="如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?"' \ -i 'do_sample=true' \ -i 'num_beams=1' \ -i 'temperature=0.7' \ -i 'padding_mode=true' \ -i 'max_new_tokens=1024' \ -i $'prompt_template="You are a helpful high school Math tutor. If you don\'t know the answer to a question, please don\'t share false information. You can speak fluently in many languages.\\nUser: Hi\\nAssistant: Hello, how can I help you?</s>\\nUser: {prompt}\\nAssistant:"' \ -i 'presence_penalty=0' \ -i 'frequency_penalty=0' \ -i 'repetition_penalty=1.1'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/peter65374/openbuddy-llemma-34b-gguf@sha256:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 1024, "prompt_template": "You are a helpful high school Math tutor. If you don\'t know the answer to a question, please don\'t share false information. You can speak fluently in many languages.\\nUser: Hi\\nAssistant: Hello, how can I help you?</s>\\nUser: {prompt}\\nAssistant:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
根据题目中给出的水果与数字对应关系,我们可以列出一个表格来进行分析: | 水果 | 数字 | | :-----: | :--: | | 西瓜 | 1 | | 菠菜 | a | | 萝卜 | b | | 香蕉 | 2 | | 西红柿 | c | | 葡萄 | 3 | 从这个表格中,我们可以看出数字与水果之间并没有一种确定的对应关系。因此,无法通过给出的信息确定土豆所对应的数字或者字母。如果题目中提供了更多信息,我们可以进行进一步的分析和推理。{ "completed_at": "2023-10-29T08:55:02.253388Z", "created_at": "2023-10-29T08:53:01.749275Z", "data_removed": false, "error": null, "id": "6wbstc3bdcz4r43qp2d7p57lvu", "input": { "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 1024, "prompt_template": "You are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages.\nUser: Hi\nAssistant: Hello, how can I help you?</s>\nUser: {prompt}\nAssistant:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 }, "logs": "Your formatted prompt is:\nYou are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages.\nUser: Hi\nAssistant: Hello, how can I help you?</s>\nUser: 如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么?\nAssistant:\nInference starting...\nafter initialization, first token took 0.384\n1:\n2:根\n3:据\n4:题\n5:目\n6:中\n7:给\n8:出\n9:的\n10:水\n11:果\n12:与\n13:数\n14:字\n15:对\n16:应\n17:关\n18:系\n19:,\n20:我\n21:们\n22:可\n23:以\n24:列\n25:出\n26:一\n27:个\n28:表\n29:格\n30:来\n31:进\n32:行\n33:分\n34:析\n35::\n36:\n37:\n38:|\n39:\n40:水\n41:果\n42:\n43: |\n44:\n45:数\n46:字\n47: |\n48:\n49:|\n50: :\n51:-----\n52::\n53: |\n54: :\n55:--\n56::\n57: |\n58:\n59:|\n60:\n61:西\n62:瓜\n63:\n64: |\n65:\n66:1\n67:\n68: |\n69:\n70:|\n71:\n72:菠\n73:菜\n74:\n75: |\n76:\n77: a\n78:\n79: |\n80:\n81:|\n82:\n83:萝\n84:卜\n85:\n86: |\n87:\n88: b\n89:\n90: |\n91:\n92:|\n93:\n94:香\n95:蕉\n96:\n97: |\n98:\n99:2\n100:\n101: |\n102:\n103:|\n104:\n105:西\n106:红\n107:柿\n108: |\n109:\n110: c\n111:\n112: |\n113:\n114:|\n115:\n116:葡\n117:萄\n118:\n119: |\n120:\n121:3\n122:\n123: |\n124:\n125:\n126:从\n127:这\n128:个\n129:表\n130:格\n131:中\n132:,\n133:我\n134:们\n135:可\n136:以\n137:看\n138:出\n139:数\n140:字\n141:与\n142:水\n143:果\n144:之\n145:间\n146:并\n147:没\n148:有\n149:一\n150:种\n151:确\n152:定\n153:的\n154:对\n155:应\n156:关\n157:系\n158:。\n159:因\n160:此\n161:,\n162:无\n163:法\n164:通\n165:过\n166:给\n167:出\n168:的\n169:信\n170:息\n171:确\n172:定\n173:土\n174:豆\n175:所\n176:对\n177:应\n178:的\n179:数\n180:字\n181:或\n182:者\n183:字\n184:母\n185:。\n186:如\n187:果\n188:题\n189:目\n190:中\n191:提\n192:供\n193:了\n194:更\n195:多\n196:信\n197:息\n198:,\n199:我\n200:们\n201:可\n202:以\n203:进\n204:行\n205:进\n206:一\n207:步\n208:的\n209:分\n210:析\n211:和\n212:推\n213:理\n214:。\n215:\nllama_print_timings: load time = 380.20 ms\nllama_print_timings: sample time = 110.95 ms / 216 runs ( 0.51 ms per token, 1946.88 tokens per second)\nllama_print_timings: prompt eval time = 380.11 ms / 108 tokens ( 3.52 ms per token, 284.13 tokens per second)\nllama_print_timings: eval time = 8179.60 ms / 215 runs ( 38.04 ms per token, 26.28 tokens per second)\nllama_print_timings: total time = 9112.99 ms\nFinal output: 根据题目中给出的水果与数字对应关系,我们可以列出一个表格来进行分析:\n| 水果 | 数字 |\n| :-----: | :--: |\n| 西瓜 | 1 |\n| 菠菜 | a |\n| 萝卜 | b |\n| 香蕉 | 2 |\n| 西红柿 | c |\n| 葡萄 | 3 |\n从这个表格中,我们可以看出数字与水果之间并没有一种确定的对应关系。因此,无法通过给出的信息确定土豆所对应的数字或者字母。如果题目中提供了更多信息,我们可以进行进一步的分析和推理。\nGenerated in 9.114473944995552 seconds.\nTokens per second: 23.59\nTokens per second not including time to first token: 24.51\ncur memory: 0\nmax allocated: 0\npeak memory: 0", "metrics": { "predict_time": 9.178418, "total_time": 120.504113 }, "output": [ " ", "根", "据", "题", "目", "中", "给", "出", "的", "水", "果", "与", "数", "字", "对", "应", "关", "系", ",", "我", "们", "可", "以", "列", "出", "一", "个", "表", "格", "来", "进", "行", "分", "析", ":", "\n", "\n", "|", " ", "水", "果", " ", " |", " ", "数", "字", " |", "\n", "|", " :", "-----", ":", " |", " :", "--", ":", " |", "\n", "|", " ", "西", "瓜", " ", " |", " ", "1", " ", " |", "\n", "|", " ", "菠", "菜", " ", " |", " ", " a", " ", " |", "\n", "|", " ", "萝", "卜", " ", " |", " ", " b", " ", " |", "\n", "|", " ", "香", "蕉", " ", " |", " ", "2", " ", " |", "\n", "|", " ", "西", "红", "柿", " |", " ", " c", " ", " |", "\n", "|", " ", "葡", "萄", " ", " |", " ", "3", " ", " |", "\n", "\n", "从", "这", "个", "表", "格", "中", ",", "我", "们", "可", "以", "看", "出", "数", "字", "与", "水", "果", "之", "间", "并", "没", "有", "一", "种", "确", "定", "的", "对", "应", "关", "系", "。", "因", "此", ",", "无", "法", "通", "过", "给", "出", "的", "信", "息", "确", "定", "土", "豆", "所", "对", "应", "的", "数", "字", "或", "者", "字", "母", "。", "如", "果", "题", "目", "中", "提", "供", "了", "更", "多", "信", "息", ",", "我", "们", "可", "以", "进", "行", "进", "一", "步", "的", "分", "析", "和", "推", "理", "。", "\n" ], "started_at": "2023-10-29T08:54:53.074970Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/6wbstc3bdcz4r43qp2d7p57lvu", "cancel": "https://api.replicate.com/v1/predictions/6wbstc3bdcz4r43qp2d7p57lvu/cancel" }, "version": "5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200" }
Generated inYour formatted prompt is: You are a helpful high school Math tutor. If you don't know the answer to a question, please don't share false information. You can speak fluently in many languages. User: Hi Assistant: Hello, how can I help you?</s> User: 如果西瓜是1,菠菜是a,萝卜是b,香蕉是2,西红柿是c,葡萄是3,那么土豆是什么? Assistant: Inference starting... after initialization, first token took 0.384 1: 2:根 3:据 4:题 5:目 6:中 7:给 8:出 9:的 10:水 11:果 12:与 13:数 14:字 15:对 16:应 17:关 18:系 19:, 20:我 21:们 22:可 23:以 24:列 25:出 26:一 27:个 28:表 29:格 30:来 31:进 32:行 33:分 34:析 35:: 36: 37: 38:| 39: 40:水 41:果 42: 43: | 44: 45:数 46:字 47: | 48: 49:| 50: : 51:----- 52:: 53: | 54: : 55:-- 56:: 57: | 58: 59:| 60: 61:西 62:瓜 63: 64: | 65: 66:1 67: 68: | 69: 70:| 71: 72:菠 73:菜 74: 75: | 76: 77: a 78: 79: | 80: 81:| 82: 83:萝 84:卜 85: 86: | 87: 88: b 89: 90: | 91: 92:| 93: 94:香 95:蕉 96: 97: | 98: 99:2 100: 101: | 102: 103:| 104: 105:西 106:红 107:柿 108: | 109: 110: c 111: 112: | 113: 114:| 115: 116:葡 117:萄 118: 119: | 120: 121:3 122: 123: | 124: 125: 126:从 127:这 128:个 129:表 130:格 131:中 132:, 133:我 134:们 135:可 136:以 137:看 138:出 139:数 140:字 141:与 142:水 143:果 144:之 145:间 146:并 147:没 148:有 149:一 150:种 151:确 152:定 153:的 154:对 155:应 156:关 157:系 158:。 159:因 160:此 161:, 162:无 163:法 164:通 165:过 166:给 167:出 168:的 169:信 170:息 171:确 172:定 173:土 174:豆 175:所 176:对 177:应 178:的 179:数 180:字 181:或 182:者 183:字 184:母 185:。 186:如 187:果 188:题 189:目 190:中 191:提 192:供 193:了 194:更 195:多 196:信 197:息 198:, 199:我 200:们 201:可 202:以 203:进 204:行 205:进 206:一 207:步 208:的 209:分 210:析 211:和 212:推 213:理 214:。 215: llama_print_timings: load time = 380.20 ms llama_print_timings: sample time = 110.95 ms / 216 runs ( 0.51 ms per token, 1946.88 tokens per second) llama_print_timings: prompt eval time = 380.11 ms / 108 tokens ( 3.52 ms per token, 284.13 tokens per second) llama_print_timings: eval time = 8179.60 ms / 215 runs ( 38.04 ms per token, 26.28 tokens per second) llama_print_timings: total time = 9112.99 ms Final output: 根据题目中给出的水果与数字对应关系,我们可以列出一个表格来进行分析: | 水果 | 数字 | | :-----: | :--: | | 西瓜 | 1 | | 菠菜 | a | | 萝卜 | b | | 香蕉 | 2 | | 西红柿 | c | | 葡萄 | 3 | 从这个表格中,我们可以看出数字与水果之间并没有一种确定的对应关系。因此,无法通过给出的信息确定土豆所对应的数字或者字母。如果题目中提供了更多信息,我们可以进行进一步的分析和推理。 Generated in 9.114473944995552 seconds. Tokens per second: 23.59 Tokens per second not including time to first token: 24.51 cur memory: 0 max allocated: 0 peak memory: 0
Prediction
peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200IDmizwqotbsag63suhmhkkmdnkaeStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- debug
- top_k
- 40
- top_p
- 0.95
- prompt
- Problem statement: "一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?" Correct solution: "我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。 先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。 先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。 所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。" Student’s solution: "(4/10)*(6/9) = 24/90 = 4/15" --- Given the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.
- do_sample
- num_beams
- 1
- temperature
- 0.7
- padding_mode
- max_new_tokens
- 2149
- prompt_template
- You are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information. Homework Assessment: {prompt} Math Tutor:
- presence_penalty
- 0
- frequency_penalty
- 0
- repetition_penalty
- 1.1
{ "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "Problem statement: \"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\"\n\nCorrect solution: \"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\"\n\nStudent’s solution: \"(4/10)*(6/9) = 24/90 = 4/15\"\n---\nGiven the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 2149, "prompt_template": "You are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information.\nHomework Assessment: {prompt}\nMath Tutor:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run peter65374/openbuddy-llemma-34b-gguf using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200", { input: { debug: true, top_k: 40, top_p: 0.95, prompt: "Problem statement: \"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\"\n\nCorrect solution: \"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\"\n\nStudent’s solution: \"(4/10)*(6/9) = 24/90 = 4/15\"\n---\nGiven the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.", do_sample: true, num_beams: 1, temperature: 0.7, padding_mode: true, max_new_tokens: 2149, prompt_template: "You are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information.\nHomework Assessment: {prompt}\nMath Tutor:", presence_penalty: 0, frequency_penalty: 0, repetition_penalty: 1.1 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run peter65374/openbuddy-llemma-34b-gguf using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200", input={ "debug": True, "top_k": 40, "top_p": 0.95, "prompt": "Problem statement: \"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\"\n\nCorrect solution: \"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\"\n\nStudent’s solution: \"(4/10)*(6/9) = 24/90 = 4/15\"\n---\nGiven the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.", "do_sample": True, "num_beams": 1, "temperature": 0.7, "padding_mode": True, "max_new_tokens": 2149, "prompt_template": "You are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information.\nHomework Assessment: {prompt}\nMath Tutor:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 } ) # The peter65374/openbuddy-llemma-34b-gguf 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/peter65374/openbuddy-llemma-34b-gguf/api#output-schema print(item, end="")
To learn more, take a look at the guide on getting started with Python.
Run peter65374/openbuddy-llemma-34b-gguf 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": "peter65374/openbuddy-llemma-34b-gguf:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200", "input": { "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "Problem statement: \\"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\\"\\n\\nCorrect solution: \\"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\\"\\n\\nStudent’s solution: \\"(4/10)*(6/9) = 24/90 = 4/15\\"\\n---\\nGiven the above correct solution and student\'s solution, identify the mistakes in the student\'s solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 2149, "prompt_template": "You are a knowledgeable high school Math tutor. You are multilingual. If you don\'t know the answer to a question, please admit it rather than sharing false information.\\nHomework Assessment: {prompt}\\nMath Tutor:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/peter65374/openbuddy-llemma-34b-gguf@sha256:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200 \ -i 'debug=true' \ -i 'top_k=40' \ -i 'top_p=0.95' \ -i $'prompt="Problem statement: \\"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\\"\\n\\nCorrect solution: \\"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\\"\\n\\nStudent’s solution: \\"(4/10)*(6/9) = 24/90 = 4/15\\"\\n---\\nGiven the above correct solution and student\'s solution, identify the mistakes in the student\'s solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese."' \ -i 'do_sample=true' \ -i 'num_beams=1' \ -i 'temperature=0.7' \ -i 'padding_mode=true' \ -i 'max_new_tokens=2149' \ -i $'prompt_template="You are a knowledgeable high school Math tutor. You are multilingual. If you don\'t know the answer to a question, please admit it rather than sharing false information.\\nHomework Assessment: {prompt}\\nMath Tutor:"' \ -i 'presence_penalty=0' \ -i 'frequency_penalty=0' \ -i 'repetition_penalty=1.1'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/peter65374/openbuddy-llemma-34b-gguf@sha256:5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "Problem statement: \\"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\\"\\n\\nCorrect solution: \\"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\\"\\n\\nStudent’s solution: \\"(4/10)*(6/9) = 24/90 = 4/15\\"\\n---\\nGiven the above correct solution and student\'s solution, identify the mistakes in the student\'s solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 2149, "prompt_template": "You are a knowledgeable high school Math tutor. You are multilingual. If you don\'t know the answer to a question, please admit it rather than sharing false information.\\nHomework Assessment: {prompt}\\nMath Tutor:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
你的解答有误。在题目中,从盒子里不放回地抽出两个球,所以第一次抽出红球后,剩下 3 个红球和 6 个蓝球,而不是原来的数量。同样地,如果第一次抽出蓝球,那么第二次抽出红球时,还剩下 4 个红球和 5 个蓝球。因此,你需要重新计算两种情况下的概率并相加。{ "completed_at": "2023-10-29T09:15:03.994529Z", "created_at": "2023-10-29T09:14:54.406872Z", "data_removed": false, "error": null, "id": "mizwqotbsag63suhmhkkmdnkae", "input": { "debug": true, "top_k": 40, "top_p": 0.95, "prompt": "Problem statement: \"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\"\n\nCorrect solution: \"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\"\n\nStudent’s solution: \"(4/10)*(6/9) = 24/90 = 4/15\"\n---\nGiven the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.", "do_sample": true, "num_beams": 1, "temperature": 0.7, "padding_mode": true, "max_new_tokens": 2149, "prompt_template": "You are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information.\nHomework Assessment: {prompt}\nMath Tutor:", "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 1.1 }, "logs": "Your formatted prompt is:\nYou are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information.\nHomework Assessment: Problem statement: \"一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?\"\nCorrect solution: \"我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。\n先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。\n先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。\n所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。\"\nStudent’s solution: \"(4/10)*(6/9) = 24/90 = 4/15\"\n---\nGiven the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese.\nMath Tutor:\nInference starting...\nLlama.generate: prefix-match hit\nafter initialization, first token took 0.877\n1:\n2:你\n3:的\n4:解\n5:答\n6:有\n7:误\n8:。\n9:在\n10:题\n11:目\n12:中\n13:,\n14:从\n15:盒\n16:子\n17:里\n18:不\n19:放\n20:回\n21:地\n22:抽\n23:出\n24:两\n25:个\n26:球\n27:,\n28:所\n29:以\n30:第\n31:一\n32:次\n33:抽\n34:出\n35:红\n36:球\n37:后\n38:,\n39:剩\n40:下\n41:\n42:3\n43:\n44:个\n45:红\n46:球\n47:和\n48:\n49:6\n50:\n51:个\n52:蓝\n53:球\n54:,\n55:而\n56:不\n57:是\n58:原\n59:来\n60:的\n61:数\n62:量\n63:。\n64:同\n65:样\n66:地\n67:,\n68:如\n69:果\n70:第\n71:一\n72:次\n73:抽\n74:出\n75:蓝\n76:球\n77:,\n78:那\n79:么\n80:第\n81:二\n82:次\n83:抽\n84:出\n85:红\n86:球\n87:时\n88:,\n89:还\n90:剩\n91:下\n92:\n93:4\n94:\n95:个\n96:红\n97:球\n98:和\n99:\n100:5\n101:\n102:个\n103:蓝\n104:球\n105:。\n106:因\n107:此\n108:,\n109:你\n110:需\n111:要\n112:重\n113:新\n114:计\n115:算\n116:两\n117:种\n118:情\n119:况\n120:下\n121:的\n122:概\n123:率\n124:并\n125:相\n126:加\n127:。\n128:\nllama_print_timings: load time = 987.77 ms\nllama_print_timings: sample time = 70.08 ms / 129 runs ( 0.54 ms per token, 1840.65 tokens per second)\nllama_print_timings: prompt eval time = 872.73 ms / 365 tokens ( 2.39 ms per token, 418.23 tokens per second)\nllama_print_timings: eval time = 5046.11 ms / 128 runs ( 39.42 ms per token, 25.37 tokens per second)\nllama_print_timings: total time = 6250.76 ms\nFinal output: 你的解答有误。在题目中,从盒子里不放回地抽出两个球,所以第一次抽出红球后,剩下 3 个红球和 6 个蓝球,而不是原来的数量。同样地,如果第一次抽出蓝球,那么第二次抽出红球时,还剩下 4 个红球和 5 个蓝球。因此,你需要重新计算两种情况下的概率并相加。\nGenerated in 6.25258188508451 seconds.\nTokens per second: 20.47\nTokens per second not including time to first token: 23.62\ncur memory: 0\nmax allocated: 0\npeak memory: 0", "metrics": { "predict_time": 9.715093, "total_time": 9.587657 }, "output": [ " ", "你", "的", "解", "答", "有", "误", "。", "在", "题", "目", "中", ",", "从", "盒", "子", "里", "不", "放", "回", "地", "抽", "出", "两", "个", "球", ",", "所", "以", "第", "一", "次", "抽", "出", "红", "球", "后", ",", "剩", "下", " ", "3", " ", "个", "红", "球", "和", " ", "6", " ", "个", "蓝", "球", ",", "而", "不", "是", "原", "来", "的", "数", "量", "。", "同", "样", "地", ",", "如", "果", "第", "一", "次", "抽", "出", "蓝", "球", ",", "那", "么", "第", "二", "次", "抽", "出", "红", "球", "时", ",", "还", "剩", "下", " ", "4", " ", "个", "红", "球", "和", " ", "5", " ", "个", "蓝", "球", "。", "因", "此", ",", "你", "需", "要", "重", "新", "计", "算", "两", "种", "情", "况", "下", "的", "概", "率", "并", "相", "加", "。", "\n" ], "started_at": "2023-10-29T09:14:54.279436Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/mizwqotbsag63suhmhkkmdnkae", "cancel": "https://api.replicate.com/v1/predictions/mizwqotbsag63suhmhkkmdnkae/cancel" }, "version": "5ebb3f4327fb859c1f8197e473b9dbcf2c4d41a91cf6ea10225eb40c49161200" }
Generated inYour formatted prompt is: You are a knowledgeable high school Math tutor. You are multilingual. If you don't know the answer to a question, please admit it rather than sharing false information. Homework Assessment: Problem statement: "一个盒子里有4个红球和6个蓝球。从盒子里不放回地抽出两个球。求一个球是红色,另一个球是蓝色的概率是多少?" Correct solution: "我们可以先抽出红球,然后抽出蓝球,也可以先抽出蓝球,然后抽出红球。所以,我们需要把这两种情况的概率加起来。 先抽出红球,然后抽出蓝球的概率是 (4/10)*(6/9) = 24/90 = 4/15。 先抽出蓝球,然后抽出红球的概率是 (6/10)*(4/9) = 24/90 = 4/15。 所以,一个球是红色,另一个球是蓝色的概率是 4/15 + 4/15 = 8/15。" Student’s solution: "(4/10)*(6/9) = 24/90 = 4/15" --- Given the above correct solution and student's solution, identify the mistakes in the student's solution and and provide guidance. Don‘t give final answer to student directly. Respond in Chinese. Math Tutor: Inference starting... Llama.generate: prefix-match hit after initialization, first token took 0.877 1: 2:你 3:的 4:解 5:答 6:有 7:误 8:。 9:在 10:题 11:目 12:中 13:, 14:从 15:盒 16:子 17:里 18:不 19:放 20:回 21:地 22:抽 23:出 24:两 25:个 26:球 27:, 28:所 29:以 30:第 31:一 32:次 33:抽 34:出 35:红 36:球 37:后 38:, 39:剩 40:下 41: 42:3 43: 44:个 45:红 46:球 47:和 48: 49:6 50: 51:个 52:蓝 53:球 54:, 55:而 56:不 57:是 58:原 59:来 60:的 61:数 62:量 63:。 64:同 65:样 66:地 67:, 68:如 69:果 70:第 71:一 72:次 73:抽 74:出 75:蓝 76:球 77:, 78:那 79:么 80:第 81:二 82:次 83:抽 84:出 85:红 86:球 87:时 88:, 89:还 90:剩 91:下 92: 93:4 94: 95:个 96:红 97:球 98:和 99: 100:5 101: 102:个 103:蓝 104:球 105:。 106:因 107:此 108:, 109:你 110:需 111:要 112:重 113:新 114:计 115:算 116:两 117:种 118:情 119:况 120:下 121:的 122:概 123:率 124:并 125:相 126:加 127:。 128: llama_print_timings: load time = 987.77 ms llama_print_timings: sample time = 70.08 ms / 129 runs ( 0.54 ms per token, 1840.65 tokens per second) llama_print_timings: prompt eval time = 872.73 ms / 365 tokens ( 2.39 ms per token, 418.23 tokens per second) llama_print_timings: eval time = 5046.11 ms / 128 runs ( 39.42 ms per token, 25.37 tokens per second) llama_print_timings: total time = 6250.76 ms Final output: 你的解答有误。在题目中,从盒子里不放回地抽出两个球,所以第一次抽出红球后,剩下 3 个红球和 6 个蓝球,而不是原来的数量。同样地,如果第一次抽出蓝球,那么第二次抽出红球时,还剩下 4 个红球和 5 个蓝球。因此,你需要重新计算两种情况下的概率并相加。 Generated in 6.25258188508451 seconds. Tokens per second: 20.47 Tokens per second not including time to first token: 23.62 cur memory: 0 max allocated: 0 peak memory: 0
Want to make some of these yourself?
Run this model