|
66 | 66 | "Sure! Here is how you might implement the function:\n\n```python\n{{problem}}", |
67 | 67 | " " |
68 | 68 | ), |
| 69 | + "qwen3": ( |
| 70 | + "<|im_start|>system\n" |
| 71 | + "You are a helpful AI coding assistant.<|im_end|>\n" |
| 72 | + "<|im_start|>user\n" |
| 73 | + "Complete the following Python function:\n\n{{problem}}<|im_end|>\n" |
| 74 | + "<|im_start|>assistant\n" |
| 75 | + "<think>\n\n</think>\n\nSure! Here is how you might implement the function:\n\n```python\n{{problem}}", |
| 76 | + " " |
| 77 | + ), |
69 | 78 | "deepseek": ( |
70 | 79 | "You are a helpful AI coding assistant.\n" |
71 | 80 | "<|User|>Complete the following Python function:\n\n{{problem}}" |
@@ -99,7 +108,6 @@ def main(args): |
99 | 108 | tokenizer = tokenizer |
100 | 109 | ) |
101 | 110 | sampler = ComboSampler( |
102 | | - rep_p = args.rep_p, |
103 | 111 | temperature = args.temperature, |
104 | 112 | min_p = args.min_p, |
105 | 113 | top_k = args.top_k, |
@@ -189,10 +197,9 @@ def main(args): |
189 | 197 | parser.add_argument("-e", "--eval", action = "store_true", help = "Run evaluation script on output file after sampling") |
190 | 198 | parser.add_argument("-temp", "--temperature", type = float, help = "Sampling temperature (0 for greedy), default: 0.6", default = 0.6) |
191 | 199 | parser.add_argument("-minp", "--min_p", type = float, help = "Min-p sampling, default: 0.0 (disabled)", default = 0.0) |
192 | | - parser.add_argument("-topk", "--top_k", type = float, help = "Top-k sampling, default: 0.0 (disabled)", default = 0.0) |
| 200 | + parser.add_argument("-topk", "--top_k", type = int, help = "Top-k sampling, default: 0 (disabled)", default = 0) |
193 | 201 | parser.add_argument("-topp", "--top_p", type = float, help = "Top-p sampling, default: 0.6", default = 0.6) |
194 | 202 | parser.add_argument("-templast", "--temp_last", action = "store_true", help = "Use temperature last") |
195 | | - parser.add_argument("-repp", "--rep_p", type = float, help = "Repetition penalty, default: 1.0 (disabled)", default = 1.0) |
196 | 203 | parser.add_argument("--max_tokens", type = int, default = 768, help = "Max number of tokens for each completion") |
197 | 204 | _args = parser.parse_args() |
198 | 205 | main(_args) |
0 commit comments