-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidation_prompt.py
More file actions
101 lines (96 loc) · 3.94 KB
/
Copy pathvalidation_prompt.py
File metadata and controls
101 lines (96 loc) · 3.94 KB
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
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
94
95
96
97
98
99
100
101
SAMPLE_SPECT = SAMPLE_SPECT = [
# ──────────────── 1. Deterministic / Factual Recall (Low Temp) ────────────────
{
"name": "capital_france_0.0",
"prompt": "The capital of France is ",
"gen": {"max_new_tokens": 20, "temperature": 0.0, "top_k": 1},
},
{
"name": "president_usa_0.1",
"prompt": "The current president of the United States is ",
"gen": {"max_new_tokens": 30, "temperature": 0.1, "top_k": 5},
},
{
"name": "water_formula_0.0",
"prompt": "The chemical formula for water is ",
"gen": {"max_new_tokens": 10, "temperature": 0.0, "top_k": 1},
},
# ──────────────── 2. Simple Language Fluency (Medium Temp) ────────────────
{
"name": "hello_world_0.7",
"prompt": "Hello, world! ",
"gen": {"max_new_tokens": 64, "temperature": 0.7, "top_k": 40},
},
{
"name": "weather_today",
"prompt": "The weather today is ",
"gen": {"max_new_tokens": 50, "temperature": 0.8, "top_k": 30},
},
{
"name": "continue_sentence",
"prompt": "She opened the door and saw ",
"gen": {"max_new_tokens": 70, "temperature": 0.9, "top_k": 50},
},
# ──────────────── 3. Structured Reasoning / Math (Low-Medium Temp) ────────────────
{
"name": "addition_0.1",
"prompt": "What is 123 + 456? The answer is ",
"gen": {"max_new_tokens": 20, "temperature": 0.1, "top_k": 10},
},
{
"name": "next_number",
"prompt": "The next number in the sequence 2, 4, 8, 16 is ",
"gen": {"max_new_tokens": 15, "temperature": 0.3, "top_k": 20},
},
{
"name": "days_in_year",
"prompt": "How many days are in a non-leap year? ",
"gen": {"max_new_tokens": 10, "temperature": 0.0, "top_k": 1},
},
# ──────────────── 4. Code Generation (Higher Temp, Creative) ────────────────
{
"name": "python_fib_0.95",
"prompt": (
"Write a Python function to compute the first 20 Fibonacci numbers:\n"
"def fib(n):\n "
),
"gen": {"max_new_tokens": 96, "temperature": 0.95, "top_k": 50},
},
{
"name": "hello_func_js",
"prompt": "Write a JavaScript function that prints 'Hello, World!':\nfunction hello() {\n ",
"gen": {"max_new_tokens": 60, "temperature": 0.9, "top_k": 40},
},
{
"name": "joke",
"prompt": "Tell me a joke ",
"gen": {"max_new_tokens": 100, "temperature": 0.4, "top_k": 100},
},
# ──────────────── 5. Creative / Open-Ended (High Temp) ────────────────
{
"name": "shakespeare_style",
"prompt": "ACT I. SCENE I. Verona. A public place.\nRomeo: ",
"gen": {"max_new_tokens": 80, "temperature": 0.9, "top_k": 50},
},
{
"name": "story_start",
"prompt": "Once upon a time, in a forest made of glass, ",
"gen": {"max_new_tokens": 100, "temperature": 1.0, "top_k": 60},
},
{
"name": "poem_about_ai",
"prompt": "Write a short poem about artificial intelligence:\n",
"gen": {"max_new_tokens": 90, "temperature": 0.95, "top_k": 50},
},
# ──────────────── 6. Stress Test: Repetition & Coherence ────────────────
{
"name": "repeat_test",
"prompt": "Repeat the word 'apple' five times: ",
"gen": {"max_new_tokens": 30, "temperature": 0.0, "top_k": 1},
},
{
"name": "long_coherence",
"prompt": "Explain photosynthesis in simple terms: ",
"gen": {"max_new_tokens": 120, "temperature": 0.8, "top_k": 40},
},
]