Caesar stores:
- Context/: dict from int -> str
- Generation (model_output, kernel): dict from int -> str
- Feedback: dict from int -> (____)
- curr_state
- curr_iteration
- start
- generate kernel / code (query llm)
- compile: check can compile
- check corre
- perf: check profiler performance
- finish
class CompileConfig: # define
class TransitionConfig: start : -> generate : -> compile : -> (T/F) correct : -> (T/F) profile:
start --> generate generate --> start
compile[1] --> correct compile[2] ->
- Start --> Gen (Prompt)
def
Skeleton State Machine (launched as a process)
Input:
- Problem
Prompt(Problem, __) -> Inference -> Parse Result to extract Code -> Build the Cache -> Eval (GPU) -> depends on Eval -> Prompt(Porblem, Eval)
Global Struct:
- Round #
- Current overall prompt (as formatted string).
- On init, this starts as initial problem statement.
Main Loop:
- Read the current state, figure out what to do:
- if Round # > max, end.
- A bunch of state cases
- Inference
- Finish case, should return a new state.
Storage:
- generations
- context / feedback store in a local file system """